diff options
author | Haibin Huang <haibin.huang@intel.com> | 2019-05-16 11:51:20 +0000 |
---|---|---|
committer | Haibin Huang <haibin.huang@intel.com> | 2019-05-16 11:53:47 +0000 |
commit | 48dc6812243324d8ec45dece818fdfa2b996d094 (patch) | |
tree | 284ef57eedcd91827b40bb113a5559cce854490d /test/hpa_automation | |
parent | 56c1b328b0c982efa3bc42ba78656c062553be8e (diff) |
Add vnfm register for vfc
Change-Id: I942c5740b30c7ca9fdd9af2c8cfa7f38af258cbf
Issue-ID: INT-795
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Diffstat (limited to 'test/hpa_automation')
-rwxr-xr-x | test/hpa_automation/tosca/hpa_automation.py | 31 | ||||
-rwxr-xr-x | test/hpa_automation/tosca/vcpe_config.json | 16 |
2 files changed, 39 insertions, 8 deletions
diff --git a/test/hpa_automation/tosca/hpa_automation.py b/test/hpa_automation/tosca/hpa_automation.py index ff53303bc..c9ff5932d 100755 --- a/test/hpa_automation/tosca/hpa_automation.py +++ b/test/hpa_automation/tosca/hpa_automation.py @@ -77,6 +77,22 @@ def register_all_clouds(parameters): for cloud_region, cloud_region_values in cloud_dictionary.iteritems(): register_cloud_helper(cloud_region, cloud_region_values, parameters) +def register_vnfm_helper(vnfm_key, values, parameters): + #Create vnfm + vnfm_create_string = 'oclip vnfm-create -b {} -c {} -e {} -v {} -g {} -x {} -i {} -j {} -q {} \ + -m {} -u {} -p {}'.format(vnfm_key, values.get("type"), values.get("vendor"), \ + values.get("version"), values.get("url"), values.get("vim-id"), \ + values.get("user-name"), values.get("user-password"), values.get("vnfm-version"), \ + parameters["aai_url"], parameters["aai_username"], parameters["aai_password"]) + + os.system(vnfm_create_string) + +def register_vnfm(parameters): + vnfm_params = parameters["vnfm_params"] + for vnfm_key, vnfm_values in vnfm_params.iteritems(): + register_vnfm_helper(vnfm_key, vnfm_values, parameters) + + #VNF Deployment Section def add_policies(parameters): resource_string = (os.popen("oclip get-resource-module-name -u {} -p {} -m {} |grep {}".format(\ @@ -162,17 +178,20 @@ set_open_cli_env(parameters) # 2.Create cloud complex create_complex(parameters) -# 3.FIXME:Because SDC internal API will change without notice, so I will maually design VNF and Service. +# 3.Register all clouds +register_all_clouds(parameters) + +# 4.Register vnfm +register_vnfm(parameters) + +# 5.FIXME:Because SDC internal API will change without notice, so I will maually design VNF and Service. # SDC output data model is not align with VFC, we use an workaround method # We just do run time automation -# 4.Register all clouds -register_all_clouds(parameters) - -# 5.add_policies function not currently working, using curl commands +# 6.add_policies function not currently working, using curl commands # add_policies(parameters) -# 6. VFC part +# 7. VFC part vnf_onboard_output = onboard_vnf(parameters) print vnf_onboard_output ns_onboard_out = onboard_ns(parameters) diff --git a/test/hpa_automation/tosca/vcpe_config.json b/test/hpa_automation/tosca/vcpe_config.json index bfdbb0d6b..1277461ff 100755 --- a/test/hpa_automation/tosca/vcpe_config.json +++ b/test/hpa_automation/tosca/vcpe_config.json @@ -1,14 +1,14 @@ { "open_cli_product" : "onap-dublin", "open_cli_home" : "/root/cli/deployment/zip/target/deployunzip", - "aai_url" : "https://10.12.6.235:30233", + "aai_url" : "https://10.12.5.224:30233", "aai_username" : "AAI", "aai_password" : "AAI", "sdc_catalog_url" : "http://10.12.6.235:30205", "sdc_password" : "demo123456!", "sdc_creator" : "cs0008", - "multicloud_url" : "http://10.12.6.235:30280", + "multicloud_url" : "http://10.12.5.224:30280", "policy_url" : "https://10.12.6.235:30240", "policy_username" : "testpdp", "policy_password" : "alpha123", @@ -135,5 +135,17 @@ } } ], + "vnfm_params":{ + "GVNFMDRIVER":{ + "type": "gvnfmdriver", + "vendor": "vfc", + "version": "v1.0", + "url": "http://msb-iag:80/", + "vim-id": "CloudOwner_ONAP-POD-01-Rail-07", + "user-name": "admin", + "user-password": "admin", + "vnfm-version": "v1.0" + } + }, "sdc-controller-id": "2" } |