summaryrefslogtreecommitdiffstats
path: root/test/hpa_automation/tosca
diff options
context:
space:
mode:
Diffstat (limited to 'test/hpa_automation/tosca')
-rwxr-xr-xtest/hpa_automation/tosca/hpa_automation.py31
-rwxr-xr-xtest/hpa_automation/tosca/vcpe_config.json16
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"
}