[VOL-4355] Fixed hardcoded namespace values
Change-Id: I90894ab10ddcb57d9b59123479240fc9c3c7d967
diff --git a/libraries/onu_utilities.robot b/libraries/onu_utilities.robot
index ff71952..593a964 100755
--- a/libraries/onu_utilities.robot
+++ b/libraries/onu_utilities.robot
@@ -183,7 +183,7 @@
Verify MIB Template Data Available
[Documentation] This keyword verifies MIB Template Data stored in etcd
- ${namespace}= Set Variable default
+ [Arguments] ${namespace}=default
${podname}= Set Variable etcd
${commandget} Catenate
... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/omci_mibs/go_templates/'
@@ -192,7 +192,7 @@
Delete MIB Template Data
[Documentation] This keyword deletes MIB Template Data stored in etcd
- ${namespace}= Set Variable default
+ [Arguments] ${namespace}=default
${podname}= Set Variable etcd
${commanddel} Catenate
... /bin/sh -c 'ETCDCTL_API=3 etcdctl del --prefix service/voltha/omci_mibs/go_templates/'
@@ -205,9 +205,8 @@
Set Tech Profile
[Documentation] This keyword sets the passed TechProfile for the test
- [Arguments] ${TechProfile}
+ [Arguments] ${TechProfile} ${namespace}=default
Log To Console \nTechProfile:${TechProfile}
- ${namespace}= Set Variable default
${podname}= Set Variable etcd
${label}= Set Variable app.kubernetes.io/name=${podname}
${src}= Set Variable ${data_dir}/TechProfile-${TechProfile}.json
@@ -223,8 +222,8 @@
Remove Tech Profile
[Documentation] This keyword removes TechProfile
+ [Arguments] ${namespace}=default
Log To Console \nTechProfile:${TechProfile}
- ${namespace}= Set Variable default
${podname}= Set Variable etcd
${command} Catenate
... /bin/sh -c 'ETCDCTL_API=3 etcdctl del --prefix service/voltha/technology_profiles/XGS-PON/64'
@@ -287,9 +286,9 @@
Validate Resource Instances Used Gem Ports
[Documentation] This keyword validates resource instances data stored in etcd.
... It checks checks the number of gemport-ids which has matched with used Tech Profile
- [Arguments] ${nbofgemports} ${defaultkvstoreprefix}=voltha_voltha
+ [Arguments] ${nbofgemports} ${namespace}=default ${defaultkvstoreprefix}=voltha_voltha
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
- ${etcddata}= Get ONU Go Adapter ETCD Data ${kvstoreprefix}
+ ${etcddata}= Get ONU Go Adapter ETCD Data namespace=${namespace} defaultkvstoreprefix=${kvstoreprefix}
#prepare result for json convert
${result}= Prepare ONU Go Adapter ETCD Data For Json ${etcddata}
${jsondata}= To Json ${result}
@@ -301,7 +300,8 @@
# When testing multi-tcont this may need some adjustment.
Exit For Loop If not ('uni_config' in $value)
${tp_path}= Get From Dictionary ${value['uni_config'][0]['PersTpPathMap']} 64
- ${resourcedata}= Get Resource Instances ETCD Data ${tp_path} ${kvstoreprefix}
+ ${resourcedata}= Get Resource Instances ETCD Data ${tp_path} namespace=${namespace}
+ ... defaultkvstoreprefix=${kvstoreprefix}
log ${resourcedata}
${decoderesult}= volthatools.Tech Profile Decode Resource Instance ${resourcedata} return_default=true
log ${decoderesult}
@@ -313,8 +313,7 @@
Get Resource Instances ETCD Data
[Documentation] This keyword delivers Resource Instances Data stored in etcd
- [Arguments] ${tppath} ${defaultkvstoreprefix}=voltha_voltha
- ${namespace}= Set Variable default
+ [Arguments] ${tppath} ${namespace}=default ${defaultkvstoreprefix}=voltha_voltha
${podname}= Set Variable etcd
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
${commandget}= Catenate
@@ -330,10 +329,10 @@
... It checks unique of serial_number and combination of pon, onu and uni in tp_path.
... Furthermore it evaluates the values of onu_id and uni_id with values read from tp_path.
... Number of etcd entries has to match with the passed number.
- [Arguments] ${nbofetcddata}=${num_all_onus} ${defaultkvstoreprefix}=voltha_voltha
+ [Arguments] ${namespace}=default ${nbofetcddata}=${num_all_onus} ${defaultkvstoreprefix}=voltha_voltha
... ${without_prefix}=True ${without_pm_data}=True
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
- ${etcddata}= Get ONU Go Adapter ETCD Data ${kvstoreprefix} ${without_prefix} ${without_pm_data}
+ ${etcddata}= Get ONU Go Adapter ETCD Data ${namespace} ${kvstoreprefix} ${without_prefix} ${without_pm_data}
#prepare result for json convert
${result}= Prepare ONU Go Adapter ETCD Data For Json ${etcddata}
${jsondata}= To Json ${result}
@@ -369,10 +368,10 @@
... Furthermore it returns a list of all set_vid.
... In case of a passed dictionary containing set_vids these will be checked for to
... current set-vid depending on setvidequal (True=equal, False=not equal).
- [Arguments] ${nbofcookieslice}=1 ${reqmatchvid}=4096 ${prevvlanrules}=${NONE} ${setvidequal}=False
- ... ${defaultkvstoreprefix}=voltha_voltha ${without_prefix}=True ${without_pm_data}=True
+ [Arguments] ${namespace}=default ${nbofcookieslice}=1 ${reqmatchvid}=4096 ${prevvlanrules}=${NONE}
+ ... ${setvidequal}=False ${defaultkvstoreprefix}=voltha_voltha ${without_prefix}=True ${without_pm_data}=True
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
- ${etcddata}= Get ONU Go Adapter ETCD Data ${kvstoreprefix} ${without_prefix} ${without_pm_data}
+ ${etcddata}= Get ONU Go Adapter ETCD Data ${namespace} ${kvstoreprefix} ${without_prefix} ${without_pm_data}
#prepare result for json convert
${result}= Prepare ONU Go Adapter ETCD Data For Json ${etcddata}
${jsondata}= To Json ${result}
@@ -409,8 +408,8 @@
Get ONU Go Adapter ETCD Data
[Documentation] This keyword delivers openonu-go-adapter Data stored in etcd
- [Arguments] ${defaultkvstoreprefix}=voltha_voltha ${without_prefix}=True ${without_pm_data}=True
- ${namespace}= Set Variable default
+ [Arguments] ${namespace}=default ${defaultkvstoreprefix}=voltha_voltha ${without_prefix}=True
+ ... ${without_pm_data}=True
${podname}= Set Variable etcd
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
${commandget}= Catenate
@@ -484,8 +483,7 @@
Delete ONU Go Adapter ETCD Data
[Documentation] This keyword deletes openonu-go-adapter Data stored in etcd
- [Arguments] ${defaultkvstoreprefix}=voltha_voltha ${validate}=False
- ${namespace}= Set Variable default
+ [Arguments] ${namespace}=default ${defaultkvstoreprefix}=voltha_voltha ${validate}=False
${podname}= Set Variable etcd
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
${commandget}= Catenate
@@ -493,7 +491,7 @@
${result}= Exec Pod In Kube ${namespace} ${podname} ${commandget}
log ${result}
Run Keyword If ${validate} Wait Until Keyword Succeeds ${timeout} 1s
- ... Validate Onu Data In Etcd 0 without_pm_data=False
+ ... Validate Onu Data In Etcd namespace=${namespace} nbofetcddata=0 without_pm_data=False
[Return] ${result}
Wait for Ports in ONOS for all OLTs
diff --git a/tests/bbsim/Voltha_BBSimTests.robot b/tests/bbsim/Voltha_BBSimTests.robot
index c29b2cc..47643ba 100755
--- a/tests/bbsim/Voltha_BBSimTests.robot
+++ b/tests/bbsim/Voltha_BBSimTests.robot
@@ -34,6 +34,7 @@
*** Variables ***
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index d9cba37..85055f2 100755
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${STACK_NAME} voltha
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
diff --git a/tests/dt-workflow/Voltha_DT_MultiOLT_Tests.robot b/tests/dt-workflow/Voltha_DT_MultiOLT_Tests.robot
index 8a92269..07b137e 100644
--- a/tests/dt-workflow/Voltha_DT_MultiOLT_Tests.robot
+++ b/tests/dt-workflow/Voltha_DT_MultiOLT_Tests.robot
@@ -41,6 +41,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index d088bb4..a84c4af 100755
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/K8S_SystemTest.robot b/tests/functional/K8S_SystemTest.robot
index f04cc3c..ba14607 100644
--- a/tests/functional/K8S_SystemTest.robot
+++ b/tests/functional/K8S_SystemTest.robot
@@ -28,7 +28,7 @@
${timeout} 120s
${desired_ETCD_cluster_size} 3
${minimal_ETCD_cluster_size} 2
-${namespace} voltha
+${NAMESPACE} voltha
${INFRA_NAMESPACE} default
${ETCD_resources} statefulsets
${ETCD_name} etcd
@@ -86,11 +86,11 @@
#Wait Until Keyword Succeeds ${timeout} 2s
#... Pods Do Not Exist By Label ${INFRA_NAMESPACE} ${ETCD_pod_label_key} ${ETCD_name}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Pods Are Ready By Label ${namespace} ${common_pod_label_key} ${rwcore_pod_label_value}
+ ... Pods Are Ready By Label ${NAMESPACE} ${common_pod_label_key} ${rwcore_pod_label_value}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Pods Are Ready By Label ${namespace} ${common_pod_label_key} ${ofagent_pod_label_value}
+ ... Pods Are Ready By Label ${NAMESPACE} ${common_pod_label_key} ${ofagent_pod_label_value}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Pods Are Ready By Label ${namespace} ${common_pod_label_key} ${adapter_openolt_pod_label_value}
+ ... Pods Are Ready By Label ${NAMESPACE} ${common_pod_label_key} ${adapter_openolt_pod_label_value}
*** Keywords ***
Get ETCD Replica Count
diff --git a/tests/functional/Voltha_ErrorScenarios.robot b/tests/functional/Voltha_ErrorScenarios.robot
index be8bae1..dd60016 100755
--- a/tests/functional/Voltha_ErrorScenarios.robot
+++ b/tests/functional/Voltha_ErrorScenarios.robot
@@ -41,6 +41,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index cfae5ee..df92503 100755
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -43,8 +43,7 @@
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
${STACK_NAME} voltha
-${DEFAULTSPACE} default
-${INFRA_NAMESPACE} infra
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/Voltha_MultiOLT_Tests.robot b/tests/functional/Voltha_MultiOLT_Tests.robot
index be29c0e..f16beb2 100755
--- a/tests/functional/Voltha_MultiOLT_Tests.robot
+++ b/tests/functional/Voltha_MultiOLT_Tests.robot
@@ -41,7 +41,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
-${DEFAULTSPACE} default
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/Voltha_ONOSHATests.robot b/tests/functional/Voltha_ONOSHATests.robot
index 0100f1e..5924981 100644
--- a/tests/functional/Voltha_ONOSHATests.robot
+++ b/tests/functional/Voltha_ONOSHATests.robot
@@ -40,8 +40,8 @@
${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
-${NAMESPACE} default
-${INFRA_NAMESPACE} infra
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index f58f9b3..11f47a1 100755
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/functional/Voltha_StartContainerPODTests.robot b/tests/functional/Voltha_StartContainerPODTests.robot
index e0c69c4..ce1bef1 100755
--- a/tests/functional/Voltha_StartContainerPODTests.robot
+++ b/tests/functional/Voltha_StartContainerPODTests.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/openonu-go-adapter/Voltha_ONUFlowChecks.robot b/tests/openonu-go-adapter/Voltha_ONUFlowChecks.robot
index 8bccdc4..ad700d2 100755
--- a/tests/openonu-go-adapter/Voltha_ONUFlowChecks.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUFlowChecks.robot
@@ -35,7 +35,8 @@
Resource ../../libraries/onu_utilities.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
@@ -107,8 +108,8 @@
${techprofile}= Set Variable If "${techprofile}"=="1T1GEM" default ${techprofile}
Set Suite Variable ${techprofile}
Run Keyword If "${techprofile}"=="default" Log To Console \nTechProfile:default (1T1GEM)
- ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
- ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
+ ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM ${INFRA_NAMESPACE}
+ ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM ${INFRA_NAMESPACE}
... ELSE Fail The TechProfile (${techprofile}) is not valid!
${switch_type}= Get Variable Value ${web_power_switch.type}
Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
@@ -126,17 +127,18 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix}
+ ... without_pm_data=False
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
- Remove Tech Profile
+ Remove Tech Profile ${INFRA_NAMESPACE}
Validate Etcd Vlan Rules Added Subscriber
[Documentation] This keyword validates Vlan rules of openonu-go-adapter Data stored in etcd.
... It checks the match_vid (=4096) and set_vid when subscriber are added.
[Arguments] ${onu_tags_dict} ${reqmatchvid}=4096 ${defaultkvstoreprefix}=voltha_voltha
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
- ${etcddata}= Get ONU Go Adapter ETCD Data ${kvstoreprefix} True True
+ ${etcddata}= Get ONU Go Adapter ETCD Data ${INFRA_NAMESPACE} ${kvstoreprefix} True True
#prepare result for json convert
${result}= Prepare ONU Go Adapter ETCD Data For Json ${etcddata}
${jsondata}= To Json ${result}
@@ -178,7 +180,7 @@
... It checks the match_vid (=4096) and set_vid when subscriber are removed.
[Arguments] ${reqmatchvid}=4096 ${defaultkvstoreprefix}=voltha_voltha
${kvstoreprefix}= Get Kv Store Prefix ${defaultkvstoreprefix}
- ${etcddata}= Get ONU Go Adapter ETCD Data ${kvstoreprefix} True True
+ ${etcddata}= Get ONU Go Adapter ETCD Data ${INFRA_NAMESPACE} ${kvstoreprefix} True True
#prepare result for json convert
${result}= Prepare ONU Go Adapter ETCD Data For Json ${etcddata}
${jsondata}= To Json ${result}
diff --git a/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
index 1a2ebf7..07a44c9 100755
--- a/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
@@ -34,7 +34,8 @@
Resource ../../variables/variables.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 300s
${of_id} 0
${logical_id} 0
@@ -101,13 +102,13 @@
${techprofile}= Set Variable If "${techprofile}"=="1T1GEM" default ${techprofile}
Set Suite Variable ${techprofile}
Run Keyword If "${techprofile}"=="default" Log To Console \nTechProfile:default (1T1GEM)
- ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
- ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
+ ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM ${INFRA_NAMESPACE}
+ ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM ${INFRA_NAMESPACE}
... ELSE Fail The TechProfile (${techprofile}) is not valid!
# delete etcd MIB Template Data
- Delete MIB Template Data
+ Delete MIB Template Data ${INFRA_NAMESPACE}
# delete etcd onu data
- Delete ONU Go Adapter ETCD Data validate=True
+ Delete ONU Go Adapter ETCD Data namespace=${INFRA_NAMESPACE} validate=True
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
@@ -117,7 +118,8 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix}
+ ... without_pm_data=False
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
- Remove Tech Profile
+ Remove Tech Profile ${INFRA_NAMESPACE}
diff --git a/tests/openonu-go-adapter/Voltha_ONUOmciGetTest.robot b/tests/openonu-go-adapter/Voltha_ONUOmciGetTest.robot
index 4c4953a..e401f11 100755
--- a/tests/openonu-go-adapter/Voltha_ONUOmciGetTest.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUOmciGetTest.robot
@@ -34,7 +34,8 @@
Resource ../../libraries/power_switch.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
diff --git a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
index 3b34d8f..4198f98 100755
--- a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
@@ -38,7 +38,8 @@
Resource ../../variables/variables.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
@@ -177,9 +178,9 @@
Log ${LogInfo} console=yes
Common Test Suite Setup
# delete etcd MIB Template Data
- Delete MIB Template Data
+ Delete MIB Template Data ${INFRA_NAMESPACE}
# delete etcd onu data
- Delete ONU Go Adapter ETCD Data validate=True
+ Delete ONU Go Adapter ETCD Data namespace=${INFRA_NAMESPACE} validate=True
Teardown Suite
@@ -190,9 +191,9 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Run Keyword If ${usekill2restart} Restart Pod By Label ${namespace} app adapter-open-onu
+ Run Keyword If ${usekill2restart} Restart Pod By Label ${NAMESPACE} app adapter-open-onu
Run Keyword Unless ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s
- ... Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ ... Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix} without_pm_data=False
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
@@ -205,7 +206,7 @@
Run Keyword If ${has_dataplane} Sleep 60s
#restart open-onu pod to reset crash loop back off mechansim of kubenetes
Run Keyword If "${firsttest}"=="False" and "${usekill2restart}"=="True"
- ... Restart Pod By Label ${namespace} app adapter-open-onu
+ ... Restart Pod By Label ${NAMESPACE} app adapter-open-onu
Run Keyword If "${firsttest}"=="False" Sleep 35s
${firsttest} Set Variable False
Set Suite Variable ${firsttest}
@@ -238,7 +239,7 @@
Delete MIB Template Data
# check etcd data are empty
Run Keyword If ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s
- ... Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ ... Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix} without_pm_data=False
Sleep 5s
Do Reconcile In Determined State
@@ -262,8 +263,8 @@
Enable Device ${olt_device_id}
END
Current State Test All Onus ${expected_onu_reason}
- Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace}
- ... ELSE Restart And Check Onu Adaptor ${namespace}
+ Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${NAMESPACE}
+ ... ELSE Restart And Check Onu Adaptor ${NAMESPACE}
Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT
... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT
... ELSE Perform Sanity Test
@@ -297,8 +298,8 @@
Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock
... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock
... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates}
- Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace}
- ... ELSE Restart And Check Onu Adaptor ${namespace}
+ Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${NAMESPACE}
+ ... ELSE Restart And Check Onu Adaptor ${NAMESPACE}
Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock
... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock
... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates}
@@ -331,8 +332,8 @@
Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT
... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT
... ELSE Perform Sanity Test
- Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace}
- ... ELSE Restart And Check Onu Adaptor ${namespace}
+ Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${NAMESPACE}
+ ... ELSE Restart And Check Onu Adaptor ${NAMESPACE}
Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber}
... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber}
... ELSE Perform Sanity Test ${suppressaddsubscriber}
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 9f085d1..8001c96 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -34,7 +34,8 @@
Resource ../../variables/variables.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
@@ -109,7 +110,7 @@
[Tags] functionalOnuGo CheckTechProfileOnuGo
[Setup] Start Logging ONUCheckTechProfile
Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
- ... Do Check Tech Profile
+ ... Do Check Tech Profile ${INFRA_NAMESPACE}
... ELSE Pass Execution ${skip_message} skipped
[Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
... AND Stop Logging ONUCheckTechProfile
@@ -163,7 +164,7 @@
[Tags] functionalOnuGo PowerOffPowerOnOnuGo
[Setup] Start Logging PowerOffPowerOnONUDevice
Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
- ... Do Power Off Power On Onu Device
+ ... Do Power Off Power On Onu Device ${NAMESPACE}
... ELSE Pass Execution ${skip_message} skipped
[Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
... AND Stop Logging PowerOffPowerOnONUDevice
@@ -200,8 +201,8 @@
${techprofile}= Set Variable If "${techprofile}"=="1T1GEM" default ${techprofile}
Set Suite Variable ${techprofile}
Run Keyword If "${techprofile}"=="default" Log To Console \nTechProfile:default (1T1GEM)
- ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
- ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
+ ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM ${INFRA_NAMESPACE}
+ ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM ${INFRA_NAMESPACE}
... ELSE Fail The TechProfile (${techprofile}) is not valid!
# map the passed onu state to reached and make it visible for test suite
${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}=
@@ -212,9 +213,9 @@
Set Suite Variable ${onu_state_nb}
Set Suite Variable ${onu_state}
# delete etcd MIB Template Data
- Delete MIB Template Data
+ Delete MIB Template Data ${INFRA_NAMESPACE}
# delete etcd onu data
- Delete ONU Go Adapter ETCD Data validate=True
+ Delete ONU Go Adapter ETCD Data namespace=${INFRA_NAMESPACE} validate=True
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
@@ -224,10 +225,11 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix}
+ ... without_pm_data=False
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
- Remove Tech Profile
+ Remove Tech Profile ${INFRA_NAMESPACE}
Setup Test
[Documentation] Pre-test Setup
@@ -318,12 +320,12 @@
Do Onu Etcd Data Check
[Documentation] Check Onu data stored in etcd
- Validate Onu Data In Etcd defaultkvstoreprefix=${kvstoreprefix}
+ Validate Onu Data In Etcd namespace=${INFRA_NAMESPACE} defaultkvstoreprefix=${kvstoreprefix}
Do Onu Flow Check
[Documentation] This keyword iterate all OLTs and performs Do Onu Flow Checks Per OLT
# Check and store vlan rules
- ${firstvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd
+ ${firstvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd ${INFRA_NAMESPACE}
... defaultkvstoreprefix=${kvstoreprefix}
FOR ${J} IN RANGE 0 ${num_olts}
${olt_serial_number}= Set Variable ${list_olts}[${J}][sn]
@@ -348,8 +350,8 @@
#check for previous state is kept (normally omci-flows-pushed)
Sleep 10s
Run Keyword And Continue On Failure Current State Test All Onus ${state2test}
- ${secondvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd nbofcookieslice=3
- ... prevvlanrules=${firstvlanrules} defaultkvstoreprefix=${kvstoreprefix}
+ ${secondvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd namespace=${INFRA_NAMESPACE}
+ ... nbofcookieslice=3 prevvlanrules=${firstvlanrules} defaultkvstoreprefix=${kvstoreprefix}
FOR ${J} IN RANGE 0 ${num_olts}
${olt_serial_number}= Set Variable ${list_olts}[${J}][sn]
${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
@@ -361,12 +363,13 @@
Run Keyword If ${print2console} Log \r\nStart State Test All Onus. console=yes
Run Keyword And Continue On Failure Current State Test All Onus ${state2test}
Run Keyword If ${print2console} Log \r\nFinished State Test All Onus. console=yes
- Run Keyword And Continue On Failure Validate Vlan Rules In Etcd prevvlanrules=${firstvlanrules}
+ Run Keyword And Continue On Failure Validate Vlan Rules In Etcd namespace=${INFRA_NAMESPACE}
+ ... prevvlanrules=${firstvlanrules}
... setvidequal=True defaultkvstoreprefix=${kvstoreprefix}
Do Check Tech Profile
[Documentation] This keyword checks the loaded TechProfile
- ${namespace}= Set Variable default
+ [Arguments] ${namespace}=default
${podname}= Set Variable etcd
${commandget} Catenate
... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64'
@@ -385,7 +388,8 @@
${num_of_expected_matches}= Set Variable If "${techprofile}"!="default" or ${length}>0 1 0
Should Be Equal As Integers ${num_of_expected_matches} ${num_of_count_matches}
... TechProfile (${TechProfile}) not loaded correctly: found(${num_of_count_matches}) expected(${num_of_expected_matches})
- Validate Resource Instances Used Gem Ports ${num_gem_ports} defaultkvstoreprefix=${kvstoreprefix}
+ Validate Resource Instances Used Gem Ports ${num_gem_ports} namespace=${namespace}
+ ... defaultkvstoreprefix=${kvstoreprefix}
Do Disable Enable Onu Test
[Documentation] This keyword disables/enables all onus and checks the states.
@@ -409,6 +413,7 @@
Do Power Off Power On Onu Device
[Documentation] This keyword power off/on all onus and checks the states.
+ [Arguments] ${namespace}=voltha
Power Off ONU Device ${namespace}
Sleep 5s
${alternativeonustates}= Create List omci-flows-deleted
diff --git a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
index 3b86bbc..db6f8a4 100755
--- a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
@@ -36,7 +36,8 @@
Resource ../../variables/variables.robot
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
@@ -90,7 +91,7 @@
Log ${LogInfo} console=yes
Common Test Suite Setup
# delete etcd MIB Template Data
- Delete MIB Template Data
+ Delete MIB Template Data ${INFRA_NAMESPACE}
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
@@ -102,7 +103,7 @@
Run Keyword If ${teardown_device} Delete All Devices and Verify
Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
# delete etcd MIB Template Data (for repeating test)
- Delete MIB Template Data
+ Delete MIB Template Data ${INFRA_NAMESPACE}
Close All ONOS SSH Connections
Perform ONU MIB Template Data Test
@@ -115,18 +116,18 @@
# Start first Onu
${src}= Set Variable ${hosts.src[${0}]}
Log \r\nONU ${src['onu']}: startup with MIB upload cycle and storage of template data to etcd. console=yes
- ${bbsim_pod}= Get Pod Name By Label ${namespace} release bbsim0
- Power On ONU ${namespace} ${bbsim_pod} ${src['onu']}
+ ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release bbsim0
+ Power On ONU ${NAMESPACE} ${bbsim_pod} ${src['onu']}
${timeStart}= Get Current Date
${firstonustartup}= Get ONU Startup Duration ${firstonu} ${timeStart}
# check MIB Template data stored in etcd
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 3s
- ... Verify MIB Template Data Available
+ ... Verify MIB Template Data Available ${INFRA_NAMESPACE}
# Start second Onu
${src}= Set Variable ${hosts.src[${1}]}
Log ONU ${src['onu']}: startup without MIB upload cycle by using of template data of etcd. console=yes
- ${bbsim_pod}= Get Pod Name By Label ${namespace} release bbsim0
- Power On ONU ${namespace} ${bbsim_pod} ${src['onu']}
+ ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release bbsim0
+ Power On ONU ${NAMESPACE} ${bbsim_pod} ${src['onu']}
${timeStart}= Get Current Date
${secondonustartup}= Get ONU Startup Duration ${secondonu} ${timeStart}
# compare both durations, second onu should be at least 3 times faster
diff --git a/tests/pm-data/Voltha_ONUPMTests.robot b/tests/pm-data/Voltha_ONUPMTests.robot
index 4346925..b3d3151 100755
--- a/tests/pm-data/Voltha_ONUPMTests.robot
+++ b/tests/pm-data/Voltha_ONUPMTests.robot
@@ -45,7 +45,8 @@
*** Variables ***
-${namespace} voltha
+${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${timeout} 60s
${of_id} 0
${logical_id} 0
diff --git a/tests/software-upgrades/ONOS_AppsUpgrade.robot b/tests/software-upgrades/ONOS_AppsUpgrade.robot
index b4e3596..d5fd158 100755
--- a/tests/software-upgrades/ONOS_AppsUpgrade.robot
+++ b/tests/software-upgrades/ONOS_AppsUpgrade.robot
@@ -41,6 +41,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/software-upgrades/ONU_Upgrade.robot b/tests/software-upgrades/ONU_Upgrade.robot
index e6911b2..39c952e 100755
--- a/tests/software-upgrades/ONU_Upgrade.robot
+++ b/tests/software-upgrades/ONU_Upgrade.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
index 8017348..4ae876c 100755
--- a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
+++ b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
index c1d4885..ec52e55 100755
--- a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
+++ b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
${STACK_NAME} voltha
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
diff --git a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
index 3f4bafc..7097d13 100755
--- a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
+++ b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
diff --git a/tests/tt-workflow/Voltha_TT_PODTests.robot b/tests/tt-workflow/Voltha_TT_PODTests.robot
index 6f4b76b..807d2a4 100755
--- a/tests/tt-workflow/Voltha_TT_PODTests.robot
+++ b/tests/tt-workflow/Voltha_TT_PODTests.robot
@@ -42,6 +42,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
+${INFRA_NAMESPACE} default
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius