diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-04-08 22:57:27 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2021-04-22 14:11:08 +0000 |
commit | bc4fb1fd1e0b761001aef0ac1fb30ac9c57a55af (patch) | |
tree | bd50326247d7cd0ab2d0b0593fca624e44b229c9 /heat | |
parent | 93667243032b24a12cf835af7a24b5d28821a774 (diff) |
vFW CNF updates after integration tests
Issue-ID: INT-1868
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Change-Id: I450ec3ef9ce9b8cbde29f3345777bb655d5719d1
(cherry picked from commit eb783d034c7c8b953c51621560dc7f35b3db192e)
Diffstat (limited to 'heat')
-rwxr-xr-x | heat/vFW_CNF_CDS/automation/config.py | 37 | ||||
-rwxr-xr-x | heat/vFW_CNF_CDS/automation/onap_settings.py | 3 | ||||
-rw-r--r-- | heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json | 4 |
3 files changed, 39 insertions, 5 deletions
diff --git a/heat/vFW_CNF_CDS/automation/config.py b/heat/vFW_CNF_CDS/automation/config.py index a7aae02c..5732d4b4 100755 --- a/heat/vFW_CNF_CDS/automation/config.py +++ b/heat/vFW_CNF_CDS/automation/config.py @@ -16,6 +16,12 @@ # ============LICENSE_END========================================================= class Config: + SCENARIO = 1 + # 1 - default configuration values like set below + # 2 - extra ssh service that comes from the profile + # 3 - extra ssh service that comes from config + verification of the CNF status + # change requires new onboarding + #### REGION DETAILS #### COMPLEX_ID = "complex" CLOUD_OWNER = "k8sCloudOwner" @@ -24,6 +30,7 @@ class Config: HYPERVISOR_TYPE = "k8s" TENANT_NAME = "kud-1" K8S_NAMESPACE = "vfirewall" + K8S_VERSION = "1.18.9" CUSTOMER_RESOURCE_DEFINITIONS = [] # Uncomment, if you want to run on non KUD k8s cluster # CUSTOMER_RESOURCE_DEFINITIONS = ["crds/crd1", @@ -44,15 +51,16 @@ class Config: RELEASE_NAME = "vfw-1" VENDOR = "vendor_cnf" - SERVICENAME = "vfw_k8s_demo_CNF" + SERVICENAME = "vfw_k8s_demo_CNF_KUD" + "_" + str(SCENARIO) VSPNAME = "VSP_" + SERVICENAME VFNAME = "VF_" + SERVICENAME - SERVICE_INSTANCE_NAME = "INSTANCE_" + SERVICENAME + SERVICE_INSTANCE_NAME = "INSTANCE_" + SERVICENAME + "_1" SDNC_ARTIFACT_NAME = "vnf" # INSERT PARAMS FOR VNF HERE AS "name" : "value" PAIR VNF_PARAM_LIST = { - "k8s-rb-profile-namespace": K8S_NAMESPACE + "k8s-rb-profile-namespace": K8S_NAMESPACE, + "k8s-rb-profile-k8s-version": K8S_VERSION } VF_MODULE_PREFIX = "" @@ -87,3 +95,26 @@ class Config: PROJECT = "Project-Demonstration" PLATFORM = "test" LINE_OF_BUSINESS = "LOB-Demonstration" + + ######## SCENARIOS ############# + + ######## 1 ############# + if SCENARIO == 1: + SKIP_POST_INSTANTIATION = True + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-name"] = PROFILE_NAME + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-source"] = PROFILE_SOURCE + ######## 2 ############# + elif SCENARIO == 2: + SKIP_POST_INSTANTIATION = True + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-name"] = "vfw-cnf-cds-vpkg-profile" + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-source"] = "vfw-cnf-cds-vpkg-profile" + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["vpg-management-port"] = "31922" + ######## 3 ############# + elif SCENARIO == 3: + SKIP_POST_INSTANTIATION = False + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-name"] = PROFILE_NAME + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-profile-source"] = PROFILE_SOURCE + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-config-template-name"] = "ssh-service-config" + VF_MODULE_PARAM_LIST[VF_MODULE_PREFIX + "vpkg"]["k8s-rb-config-name"] = "ssh-service-config" + else: + raise Exception("Not Implemented Scenario") diff --git a/heat/vFW_CNF_CDS/automation/onap_settings.py b/heat/vFW_CNF_CDS/automation/onap_settings.py index 6580b49d..dda6006c 100755 --- a/heat/vFW_CNF_CDS/automation/onap_settings.py +++ b/heat/vFW_CNF_CDS/automation/onap_settings.py @@ -25,3 +25,6 @@ DMAAP_URL = "http://dmaap.api.simpledemo.onap.org:3904" # uncomment if socks is used #OnapService.set_proxy({'http': 'socks5h://127.0.0.1:8081', 'https': 'socks5h://127.0.0.1:8081'}) + +# execute in the shell to apply these settings +# export ONAP_PYTHON_SDK_SETTINGS="onap_settings" diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json index 23ae1649..53d11972 100644 --- a/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json +++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/data_types.json @@ -52,8 +52,8 @@ "properties": { "vpg-management-port": { "description": "SSH external port of optional ssh service for vPKG.", - "type": "string", - "default": "0" + "type": "integer", + "default": 0 }, "k8s-rb-profile-namespace": { "description": "K8s namespace to create helm chart for specified profile", |