diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-03-24 19:15:31 +0100 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-03-28 22:21:25 +0200 |
commit | 06bf0ac45889ffe00fc6e27e68ffa15c2f519e6f (patch) | |
tree | ecf4c17542c62ee6c0433edcbccac5707370a8f1 /heat/vFW_CNF_CDS/automation/instantiate.py | |
parent | d2c5f361fa3a246dfa23c2c582ec498322a97282 (diff) |
Real vFW CNF config-assign and config-deploy
Implementation of vFW CNF config-assign and config-deploy with
utilization of CDS native components for configuration API
Change-Id: I016b186e1fcad0bf1285292f2e93e12a1d96b63e
Issue-ID: INT-1868
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/automation/instantiate.py')
-rwxr-xr-x | heat/vFW_CNF_CDS/automation/instantiate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/heat/vFW_CNF_CDS/automation/instantiate.py b/heat/vFW_CNF_CDS/automation/instantiate.py index 7363c479..bfc68aa1 100755 --- a/heat/vFW_CNF_CDS/automation/instantiate.py +++ b/heat/vFW_CNF_CDS/automation/instantiate.py @@ -146,7 +146,12 @@ for vnf in service.vnfs: profile_name = Config.VF_MODULE_PARAM_LIST[vf_module_label]["k8s-rb-profile-name"] try: profile = definition.get_profile_by_name(profile_name) - if profile.namespace != Config.VF_MODULE_PARAM_LIST[vf_module_label]["k8s-rb-profile-namespace"]: + namespace = None + if "k8s-rb-profile-namespace" in Config.VNF_PARAM_LIST: + namespace = Config.VNF_PARAM_LIST["k8s-rb-profile-namespace"] + if "k8s-rb-profile-namespace" in Config.VF_MODULE_PARAM_LIST[vf_module_label]: + namespace = Config.VF_MODULE_PARAM_LIST[vf_module_label]["k8s-rb-profile-namespace"] + if namespace != None and profile.namespace != namespace: profile.delete() logger.info("Profile: " + profile_name + " for " + vf_module.name + " deleted") else: |