aboutsummaryrefslogtreecommitdiffstats
path: root/test/vcpe/vcpe.py
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2019-04-30 14:28:07 -0400
committerYang Xu <yang.xu3@huawei.com>2019-04-30 14:33:43 -0400
commit0e319ef66c3172ae1aef36151b32b8bf9ceacf74 (patch)
tree34441d85f7ea340ccd0f97b102f981720811eb9e /test/vcpe/vcpe.py
parent3fc7a4cea10f8f85498675f29f54c367c4a36bc4 (diff)
Add allotted resource subcategory BRG in SDC
Change-Id: I1c361215ba086afe7444a5c457ba08aedf9fddcd Issue-ID: INT-847 Signed-off-by: Yang Xu <yang.xu3@huawei.com>
Diffstat (limited to 'test/vcpe/vcpe.py')
-rwxr-xr-xtest/vcpe/vcpe.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py
index f9c1778da..375a04e12 100755
--- a/test/vcpe/vcpe.py
+++ b/test/vcpe/vcpe.py
@@ -183,10 +183,22 @@ def init_so_sdnc():
vgw_vfmod_name_index= 0
vcpecommon.save_object(vgw_vfmod_name_index, vcpecommon.vgw_vfmod_name_index_file)
-def download_vcpe_service_templates():
+
+def init():
vcpecommon = VcpeCommon()
+ init_sdc(vcpecommon)
+ download_vcpe_service_templates(vcpecommon)
+
+
+def init_sdc(vcpecommon):
sdc = sdcutils.SdcUtils(vcpecommon)
- sdc.get_service_list()
+ sdc.create_allotted_resource_subcategory('BRG')
+
+
+def download_vcpe_service_templates(vcpecommon):
+ sdc = sdcutils.SdcUtils(vcpecommon)
+ sdc.download_vcpe_service_template()
+
def tmp_sniro():
logger = logging.getLogger(__name__)
@@ -197,10 +209,12 @@ def tmp_sniro():
# Setting up SNIRO
config_sniro(vcpecommon, svc_instance_uuid['gmux'], svc_instance_uuid['brg'])
+
def test():
vcpecommon = VcpeCommon()
print("oom-k8s-04 public ip: %s" % (vcpecommon.get_vm_public_ip_by_nova('oom-k8s-04')))
+
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG, format='%(message)s')
@@ -220,9 +234,7 @@ if __name__ == '__main__':
if sys.argv[1] == 'sdc':
print('Under development')
elif sys.argv[1] == 'init':
- if 'y' == raw_input('Ready to add customer service data to SDNC and SO DBs? This is needed only once.'
- 'y/n: ').lower():
- download_vcpe_service_templates()
+ init()
init_so_sdnc()
elif sys.argv[1] == 'infra':
if 'y' == raw_input('Ready to deploy infrastructure? y/n: ').lower():