diff options
Diffstat (limited to 'test/vcpe')
-rwxr-xr-x | test/vcpe/preload.py | 10 | ||||
-rwxr-xr-x | test/vcpe/soutils.py | 4 | ||||
-rw-r--r-- | test/vcpe/tests/test_imports.py | 2 | ||||
-rwxr-xr-x | test/vcpe/vcpe.py | 10 | ||||
-rwxr-xr-x | test/vcpe/vcpecommon.py | 14 |
5 files changed, 20 insertions, 20 deletions
diff --git a/test/vcpe/preload.py b/test/vcpe/preload.py index 08b34ecf5..6517fe5d8 100755 --- a/test/vcpe/preload.py +++ b/test/vcpe/preload.py @@ -102,9 +102,9 @@ class Preload: self.logger.info('Preloading network ' + network_role) self.logger.info('template_file:' + template_file) if 'networkgra' in template_file: - return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_gra_url) + return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_gra_url) else: - return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_url) + return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_url) def preload(self, template_file, replace_dict, url): self.logger.debug('tempalte_file:'+ template_file) @@ -165,10 +165,10 @@ class Preload: '${suffix}': name_suffix} replace_dict.update(common_dict) self.logger.info('Preloading VF Module ' + vfmodule_name) - if gra_api_flag: - return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_gra_url) + if gra_api_flag: + return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_gra_url) else: - return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_vnf_url) + return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_vnf_url) def preload_all_networks(self, template_file, name_suffix): common_dict = {'${' + k + '}': v for k, v in self.vcpecommon.common_preload_config.items()} diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py index 8d2e56d12..63100128e 100755 --- a/test/vcpe/soutils.py +++ b/test/vcpe/soutils.py @@ -121,7 +121,7 @@ class SoUtils: def generate_vnf_or_network_request(self, req_type, instance_name, vnf_or_network_model, service_instance_id, service_model): if self.vcpecommon.gra_api_flag: - self.testApi = 'GR_API' + self.testApi = 'GR_API' req_details = { 'modelInfo': vnf_or_network_model, 'cloudConfiguration': {"lcpCloudRegionId": self.vcpecommon.os_region_name, @@ -139,7 +139,7 @@ class SoUtils: def generate_vfmodule_request(self, instance_name, vfmodule_model, service_instance_id, service_model, vnf_instance_id, vnf_model): if self.vcpecommon.gra_api_flag: - self.testApi = 'GR_API' + self.testApi = 'GR_API' req_details = { 'modelInfo': vfmodule_model, 'cloudConfiguration': {"lcpCloudRegionId": self.vcpecommon.os_region_name, diff --git a/test/vcpe/tests/test_imports.py b/test/vcpe/tests/test_imports.py index 4587495d4..728c29375 100644 --- a/test/vcpe/tests/test_imports.py +++ b/test/vcpe/tests/test_imports.py @@ -15,4 +15,4 @@ import vcpecommon # are included in setuptools configuration def test_imports(): - pass + pass diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py index 9ecda81d2..aa924bca6 100755 --- a/test/vcpe/vcpe.py +++ b/test/vcpe/vcpe.py @@ -137,11 +137,11 @@ def deploy_infra(): vnf_template_file = vcpecommon.find_file(keyword_vnf, 'json', 'preload_templates') gra_template_file = vcpecommon.find_file(keyword_gra, 'json', 'preload_templates') if vcpecommon.gra_api_flag: - svc_instance_uuid[keyword] = create_one_service(vcpecommon, csar_file, gra_template_file, preload_dict, - name_suffix, heatbridge) + svc_instance_uuid[keyword] = create_one_service(vcpecommon, csar_file, gra_template_file, preload_dict, + name_suffix, heatbridge) else: - svc_instance_uuid[keyword] = create_one_service(vcpecommon, csar_file, vnf_template_file, preload_dict, - name_suffix, heatbridge) + svc_instance_uuid[keyword] = create_one_service(vcpecommon, csar_file, vnf_template_file, preload_dict, + name_suffix, heatbridge) if not svc_instance_uuid[keyword]: sys.exit(1) @@ -310,7 +310,7 @@ if __name__ == '__main__': init_so_sdnc() elif args.mode == 'infra': #if 'y' == raw_input('Ready to deploy infrastructure? y/n: ').lower(): - deploy_infra() + deploy_infra() elif args.mode == 'customer': if 'y' == raw_input('Ready to deploy customer service? y/n: ').lower(): deploy_custom_service() diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py index 932766f30..8eeb68e9a 100755 --- a/test/vcpe/vcpecommon.py +++ b/test/vcpe/vcpecommon.py @@ -207,13 +207,13 @@ class VcpeCommon: # to conform to openstack cli client self.cloud = {} for k in os_cloud: - if isinstance(os_cloud[k],dict): - for sub_k in os_cloud[k]: - os_setting_name = '--os-' + sub_k.replace('_','-') - self.cloud[os_setting_name] = os_cloud[k][sub_k] - else: - os_setting_name = '--os-' + k.replace('_','-') - self.cloud[os_setting_name] = os_cloud[k] + if isinstance(os_cloud[k],dict): + for sub_k in os_cloud[k]: + os_setting_name = '--os-' + sub_k.replace('_','-') + self.cloud[os_setting_name] = os_cloud[k][sub_k] + else: + os_setting_name = '--os-' + k.replace('_','-') + self.cloud[os_setting_name] = os_cloud[k] def heatbridge(self, openstack_stack_name, svc_instance_uuid): """ |