[VOL-2282]

Run robot tests with Python 3

- Remove HTTP and database robot libraries that aren't used
- Make robot lint treat warnings as errors
- Reformat robot tests to pass lint, and other minor fixes
- Lint/reformat of python code
- Add yaml and json linting
- Clean up Makefile
- Assume the KUBECONFIG and VOLTCONFIG env vars are defined

Change-Id: Ibf0a6b525802ed907efc38b34c8e3b99b2044bf1
diff --git a/tests/functional/K8S_SystemTest.robot b/tests/functional/K8S_SystemTest.robot
index dcf47c5..ce0de14 100644
--- a/tests/functional/K8S_SystemTest.robot
+++ b/tests/functional/K8S_SystemTest.robot
@@ -19,11 +19,11 @@
 
 *** Variables ***
 ${timeout}        120s
-${desired_ETCD_cluster_size}        3
-${minimal_ETCD_cluster_size}        2
-${namespace}        voltha
-${ETCD_resources}        etcdclusters.etcd.database.coreos.com
-${ETCD_name}       voltha-etcd-cluster
+${desired_ETCD_cluster_size}    3
+${minimal_ETCD_cluster_size}    2
+${namespace}      voltha
+${ETCD_resources}    etcdclusters.etcd.database.coreos.com
+${ETCD_name}      voltha-etcd-cluster
 ${ETCD_pod_label_key}    etcd_cluster
 ${common_pod_label_key}    app
 ${rwcore_pod_label_value}    rw-core
@@ -34,38 +34,41 @@
 Scale Down ETCD Cluster
     [Documentation]    Scale Down the ETCD cluster to minimal size, skip test if current cluster size < 3
     [Tags]    scaledown    ETCDdown
-    ${current_size}=   Get ETCD Running Size    voltha
+    ${current_size}=    Get ETCD Running Size    voltha
     Pass Execution If    '${current_size}' != '${desired_ETCD_cluster_size}'
     ...    'Skip the test if the cluster size smaller than minimal size 3'
     # The minimal cluster size after scale down
     # based on https://github.com/ETCD-io/ETCD/blob/master/Documentation/faq.md#what-is-failure-tolerance
     Scale ETCD    ${namespace}    ${minimal_ETCD_cluster_size}
-    Wait Until Keyword Succeeds    ${timeout}    2s    Validate ETCD Size   ${namespace}    ${minimal_ETCD_cluster_size}
     Wait Until Keyword Succeeds    ${timeout}    2s
-    ...    Check Expected Running Pods Number By Label    ${namespace}   ${ETCD_pod_label_key}    ${ETCD_name}    2
+    ...    Validate ETCD Size    ${namespace}    ${minimal_ETCD_cluster_size}
+    Wait Until Keyword Succeeds    ${timeout}    2s
+    ...    Check Expected Running Pods Number By Label    ${namespace}
+    ...    ${ETCD_pod_label_key}    ${ETCD_name}    2
 
 Scale Up ETCD Cluster
     [Documentation]    Recover the ETCD cluster by scaling up its size
     [Tags]    scaleup    ETCDup
-    ${current_size}=   Get ETCD Running Size    voltha
+    ${current_size}=    Get ETCD Running Size    voltha
     Pass Execution If    '${current_size}' != '${minimal_ETCD_cluster_size}'
     ...    'Skip the test if the cluster size smaller than minimal size 3'
     Scale ETCD    ${namespace}    ${desired_ETCD_cluster_size}
     # We scale up the size to 3, the recommended size of ETCD cluster.
-    Wait Until Keyword Succeeds    ${timeout}    2s    Validate ETCD Size   ${namespace}    ${desired_ETCD_cluster_size}
+    Wait Until Keyword Succeeds    ${timeout}    2s
+    ...    Validate ETCD Size    ${namespace}    ${desired_ETCD_cluster_size}
 
 ETCD Failure Test
     [Documentation]    Failure Scenario Test: ETCD Crash
     [Tags]    FailureTest
     Delete K8s Pods By Label    ${namespace}    ${ETCD_pod_label_key}    ${ETCD_name}
-     Wait Until Keyword Succeeds    ${timeout}    2s
-     ...    Pods Does Not Exist By Label   ${namespace}   ${ETCD_pod_label_key}    ${ETCD_name}
-     Wait Until Keyword Succeeds    ${timeout}    2s
-     ...    Pods Does Not Ready By Label   ${namespace}   ${common_pod_label_key}    ${rwcore_pod_label_value}
-     Wait Until Keyword Succeeds    ${timeout}    2s
-     ...    Pods Does Not Ready By Label   ${namespace}   ${common_pod_label_key}    ${ofagent_pod_label_value}
-     Wait Until Keyword Succeeds    ${timeout}    2s
-     ...    Pods Does Not Ready By Label   ${namespace}   ${common_pod_label_key}    ${adapter_openolt_pod_label_value}
+    Wait Until Keyword Succeeds    ${timeout}    2s
+    ...    Pods Do Not Exist By Label    ${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}
+    Wait Until Keyword Succeeds    ${timeout}    2s
+    ...    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}
 
 *** Keywords ***
 Get ETCD Running Size
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 737cc39..49e9edb 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -11,7 +11,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
 # FIXME Can we use the same test against BBSim and Hardware?
 
 *** Settings ***
@@ -41,17 +40,17 @@
 ${KUBERNETES_YAML}    ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
 ${HELM_CHARTS_DIR}    ~/helm-charts
 ${VOLTHA_POD_NUM}    8
-${NAMESPACE}   voltha
+${NAMESPACE}      voltha
 # 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
+${RESTART_POD_NAME}    radius
 ${timeout}        60s
 ${of_id}          0
 ${logical_id}     0
 ${has_dataplane}    True
 ${external_libs}    True
 ${teardown_device}    False
-${scripts}    ../../scripts
+${scripts}        ../../scripts
 
 *** Test Cases ***
 Sanity E2E Test for OLT/ONU on POD
@@ -60,7 +59,7 @@
     [Tags]    sanity    test1
     [Teardown]    NONE
     Run Keyword If    ${has_dataplane}    Clean Up Linux
-    Wait Until Keyword Succeeds    ${timeout}   2s    Perform Sanity Test
+    Wait Until Keyword Succeeds    ${timeout}    2s    Perform Sanity Test
     Run Keyword and Ignore Error    Collect Logs
 
 Test Disable and Enable ONU
@@ -71,59 +70,59 @@
     [Tags]    functional    DisableEnableONU    released
     [Setup]    None
     [Teardown]    None
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
         ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
         ...    ${of_id}
         Disable Device    ${onu_device_id}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping    False    ${dst['dp_iface_ip_qinq']}    
-        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s
+        ...    Check Ping    False    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Enable Device    ${onu_device_id}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
         ...    Validate Subscriber DHCP Allocation    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping    True    ${dst['dp_iface_ip_qinq']}    
-        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
-        Run Keyword and Ignore Error   Get Device Output from Voltha    ${onu_device_id}
-        Run Keyword and Ignore Error   Collect Logs
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s
+        ...    Check Ping    True    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
+        Run Keyword and Ignore Error    Get Device Output from Voltha    ${onu_device_id}
+        Run Keyword and Ignore Error    Collect Logs
     END
-    Run Keyword and Ignore Error   Collect Logs
+    Run Keyword and Ignore Error    Collect Logs
 
 Test Subscriber Delete and Add
     [Documentation]    Validates E2E Ping Connectivity and object states for the given scenario:
     ...    Assuming that all the ONUs are authenticated/DHCP/pingable
-    ...    Delete a subscriber and  validate that the pings do not succeed
+    ...    Delete a subscriber and validate that the pings do not succeed
     ...    Re-add the subscriber and validate that the pings are successful
     [Tags]    functional    SubAddDelete    released
     [Setup]    None
     [Teardown]    None
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
         ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
         ...    ${of_id}
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-remove-subscriber-access ${of_id} ${onu_port}
         Sleep    10s
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping    False    ${dst['dp_iface_ip_qinq']}
-        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s
+        ...    Check Ping    False    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} ${onu_port}
         Sleep    10s
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
         ...    Validate Subscriber DHCP Allocation    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping    True    ${dst['dp_iface_ip_qinq']}
-        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
-        Run Keyword and Ignore Error   Get Device Output from Voltha    ${onu_device_id}
-        Run Keyword and Ignore Error   Collect Logs
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s
+        ...    Check Ping    True    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
+        Run Keyword and Ignore Error    Get Device Output from Voltha    ${onu_device_id}
+        Run Keyword and Ignore Error    Collect Logs
     END
-    Run Keyword and Ignore Error   Collect Logs
+    Run Keyword and Ignore Error    Collect Logs
 
 Check OLT/ONU Authentication After Radius Pod Restart
     [Documentation]    After radius restart, triggers reassociation, checks status and
@@ -132,50 +131,48 @@
     ...    teardown from previous test or uncomment 'Teardown    None'.
     ...    Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
     [Tags]    functional    RadiusRestart    released
-    [Setup]   None
-    [Teardown]   None
+    [Setup]    None
+    [Teardown]    None
     Wait Until Keyword Succeeds    ${timeout}    15s    Restart Pod    ${NAMESPACE}    ${RESTART_POD_NAME}
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-
-
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
-        ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
-        ...    ${of_id}
-        Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate Authentication After Reassociate
-        ...    True    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}
+        ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Get ONU Port in ONOS    ${src['onu']}    ${of_id}
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Verify Eapol Flows Added For ONU    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Validate Authentication After Reassociate    True    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify ONU in AAA-Users    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}     ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate DHCP and Ping    True
-        ...    True    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
-        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
-        ...    ${dst['dp_iface_name']}    ${dst['ip']}    ${dst['user']}    ${dst['pass']}    ${dst['container_type']}
-        ...    ${dst['container_name']}
+        ...    ${ONOS_SSH_PORT}    ${onu_port}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Validate DHCP and Ping    True    True    ${src['dp_iface_name']}
+        ...    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}
+        ...    ${src['container_type']}    ${src['container_name']}
+        ...    ${dst['dp_iface_name']}    ${dst['ip']}    ${dst['user']}
+        ...    ${dst['pass']}    ${dst['container_type']}    ${dst['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Run Keyword And Continue On Failure
         ...    Validate Subscriber DHCP Allocation    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword and Ignore Error   Get Device Output from Voltha    ${onu_device_id}
-        Run Keyword and Ignore Error   Collect Logs
+        Run Keyword and Ignore Error    Get Device Output from Voltha    ${onu_device_id}
+        Run Keyword and Ignore Error    Collect Logs
     END
-    Run Keyword and Ignore Error   Collect Logs
+    Run Keyword and Ignore Error    Collect Logs
 
 Check DHCP attempt fails when subscriber is not added
     [Documentation]    Validates when removed subscriber access, DHCP attempt, ping fails and
     ...    when again added subscriber access, DHCP attempt, ping succeeds
-    ...    Assuming that test1 or sanity test  was executed where all the ONUs are authenticated/DHCP/pingable
+    ...    Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable
     [Tags]    functional    SubsRemoveDHCP    released
     [Setup]    None
     [Teardown]    None
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-		
-	${onu_device_id}=    Get Device ID From SN    ${src['onu']}
+        ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
         ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
         ...    ${of_id}
         Run Keyword And Ignore Error    Login And Run Command On Remote System    killall dhclient    ${src['ip']}
@@ -184,13 +181,14 @@
         ...    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-remove-subscriber-access ${of_id} ${onu_port}
-        Sleep   5s
+        Sleep    5s
         Run Keyword And Ignore Error    Login And Run Command On Remote System    ps -ef | grep dhclient    ${src['ip']}
         ...    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
-	Run Keyword If    ${has_dataplane}    Wait Until Keyword Succeeds    ${timeout}    2s
-	...    Delete IP Addresses from Interface on Remote Host    ${src['dp_iface_name']}    ${src['ip']}
-	...    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
-        Run Keyword And Ignore Error    Login And Run Command On Remote System    ifconfig | grep -A 10 ens    ${src['ip']}
+        Run Keyword If    ${has_dataplane}    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Delete IP Addresses from Interface on Remote Host    ${src['dp_iface_name']}    ${src['ip']}
+        ...    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
+        Run Keyword And Ignore Error    Login And Run Command On Remote System
+        ...    ifconfig | grep -A 10 ens    ${src['ip']}
         ...    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate DHCP and Ping    False
         ...    False    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
@@ -210,11 +208,11 @@
 
 Check ONU adapter crash not forcing authentication again
     [Documentation]    After ONU adapter restart, checks wpa log for 'authentication started'
-    ...    message count to make sure auth not started again and validates EAP status and  ping.
+    ...    message count to make sure auth not started again and validates EAP status and ping.
     ...    Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable
     [Tags]    functional    ONUAdaptCrash    notready
-    [Setup]   None
-    [Teardown]   None
+    [Setup]    None
+    [Teardown]    None
     @{before_list}=    Create List
     @{after_list}=    Create List
     FOR    ${I}    IN RANGE    0    ${num_onus}
@@ -226,7 +224,7 @@
         ${before}=    Run Keyword If    ${has_dataplane}    Check Remote File Contents For WPA Logs
         ...    True    /tmp/wpa.log    authentication started    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
-	Append To List    ${before_list}    ${before}
+        Append To List    ${before_list}    ${before}
     END
     Wait Until Keyword Succeeds    ${timeout}    15s    Restart Pod    ${NAMESPACE}    adapter-open-onu
     Wait Until Keyword Succeeds    ${timeout}    2s    Validate Pod Status    ${podName}    ${NAMESPACE}
@@ -240,34 +238,34 @@
         ${after}=    Run Keyword If    ${has_dataplane}    Check Remote File Contents For WPA Logs
         ...    True    /tmp/wpa.log    authentication started    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
-	Append To List    ${after_list}    ${after}
-	${output}=    Run Keyword If    ${has_dataplane}    Login And Run Command On Remote System
-	...    wpa_cli status | grep SUCCESS    ${src['ip']}    ${src['user']}    ${src['pass']}
-	...    ${src['container_type']}    ${src['container_name']}
-	Should Contain    ${output}    SUCCESS
-	Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping
+        Append To List    ${after_list}    ${after}
+        ${output}=    Run Keyword If    ${has_dataplane}    Login And Run Command On Remote System
+        ...    wpa_cli status | grep SUCCESS    ${src['ip']}    ${src['user']}    ${src['pass']}
+        ...    ${src['container_type']}    ${src['container_name']}
+        Should Contain    ${output}    SUCCESS
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Wait Until Keyword Succeeds    60s    2s    Check Ping
         ...    True    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}
-        ...    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
+        ...    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
     END
     Lists Should Be Equal    ${after_list}    ${before_list}
     Log    ${after_list}
     Log    ${before_list}
-    Run Keyword and Ignore Error   Collect Logs
+    Run Keyword and Ignore Error    Collect Logs
 
 Test Disable and Enable ONU scenario for ATT workflow
     [Documentation]    Validates E2E Ping Connectivity and object states for the given scenario:
     ...    Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
     ...    Perform disable on the ONUs, call volt-remove-subscriber and validate that the pings do not succeed
-    ...    Perform enable on the ONUs, authentication check, volt-add-subscriber-access and validate that the pings are successful
+    ...    Perform enable on the ONUs, authentication check, volt-add-subscriber-access and
+    ...    validate that the pings are successful
     ...    VOL-2284
     [Tags]    functional    ATT_DisableEnableONU
     [Setup]    None
     #[Teardown]    None
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
         ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
         ...    ${of_id}
@@ -275,17 +273,20 @@
         Sleep    5s
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-remove-subscriber-access ${of_id} ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    60s    2s    Check Ping    False    ${dst['dp_iface_ip_qinq']}
-        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}   ${src['container_type']}    ${src['container_name']}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Wait Until Keyword Succeeds    60s    2s    Check Ping
+        ...    False    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         ...    ELSE    sleep    60s
         Enable Device    ${onu_device_id}
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate Authentication After Reassociate
-        ...    True    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Validate Authentication After Reassociate    True
+        ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify ONU in AAA-Users    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}     ${onu_port}
+        ...    ${ONOS_SSH_PORT}    ${onu_port}
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} ${onu_port}
         Sleep    10s
@@ -307,17 +308,17 @@
     [Setup]    NONE
     [Teardown]    NONE
     ${waitforRestart}    Set Variable    120s
-    ${podStatusOutput}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE}
+    ${podStatusOutput}=    Run    kubectl get pods -n ${NAMESPACE}
     Log    ${podStatusOutput}
-    ${countBforRestart}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+    ${countBforRestart}=    Run    kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
     ${podName}    Set Variable     adapter-open-olt
     Restart Pod    ${NAMESPACE}    ${podName}
     Wait Until Keyword Succeeds    ${waitforRestart}    2s    Validate Pod Status    ${podName}    ${NAMESPACE}
     ...    Running
     Repeat Sanity Test
-    ${podStatusOutput}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE}
+    ${podStatusOutput}=    Run    kubectl get pods -n ${NAMESPACE}
     Log    ${podStatusOutput}
-    ${countAfterRestart}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+    ${countAfterRestart}=    Run    kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
     Should Be Equal As Strings    ${countAfterRestart}    ${countBforRestart}
     Log to console    Pod ${podName} restarted and sanity checks passed successfully
 
@@ -365,22 +366,20 @@
     [Documentation]    Deploys an device instance and waits for it to authenticate. After
     ...    authentication is successful the rw-core deployment is scaled to 0 instances to
     ...    simulate a POD crash. The test then scales the rw-core back to a single instance
-    ...    and configures ONOS for access. The test succeeds if the device is able to 
+    ...    and configures ONOS for access. The test succeeds if the device is able to
     ...    complete the DHCP sequence.
     [Tags]    bbsim    rwcore-restart
     [Setup]    Clear All Devices Then Create New Device
     ${of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS    ${olt_serial_number}
     Set Global Variable    ${of_id}
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
         ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
         ...    ${of_id}
-
         # Bring up the device and verify it authenticates
-        Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device        ENABLED    ACTIVE    REACHABLE
+        Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device    ENABLED    ACTIVE    REACHABLE
         ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
@@ -388,27 +387,26 @@
         ...    ${src['dp_iface_name']}    wpa_supplicant.conf    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify ONU in AAA-Users    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}     ${onu_port}
-
+        ...    ${ONOS_SSH_PORT}    ${onu_port}
         # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
         Scale K8s Deployment    voltha    voltha-rw-core    0
         Wait Until Keyword Succeeds    ${timeout}    2s    Pod Does Not Exist    voltha    voltha-rw-core
         # Ensure the ofagent POD goes "not-ready" as expected
-        Wait Until keyword Succeeds    ${timeout}    2s    Check Expected Available Deployment Replicas    voltha    voltha-ofagent    0
+        Wait Until keyword Succeeds    ${timeout}    2s
+        ...    Check Expected Available Deployment Replicas    voltha    voltha-ofagent    0
         # Scale up the core deployment and make sure both it and the ofagent deployment are back
         Scale K8s Deployment    voltha    voltha-rw-core    1
-        Wait Until Keyword Succeeds    ${timeout}    2s    Check Expected Available Deployment Replicas    voltha    voltha-rw-core    1
-        Wait Until Keyword Succeeds    ${timeout}    2s    Check Expected Available Deployment Replicas    voltha    voltha-ofagent    1
-
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Check Expected Available Deployment Replicas    voltha    voltha-rw-core    1
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Check Expected Available Deployment Replicas    voltha    voltha-ofagent    1
         # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
         # so restart the port forwarding for the API service
         Restart VOLTHA Port Foward    voltha-api-minimal
-
         # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
         # represents system connectivity being restored
         Wait Until Keyword Succeeds    ${timeout}    2s    Device Is Available In ONOS
         ...    http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT}    ${of_id}
-
         # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
         Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
         ...    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} ${onu_port}
@@ -437,40 +435,37 @@
     ${olt_device_id}=    Create Device    ${olt_ip}    ${OLT_PORT}
     Set Suite Variable    ${olt_device_id}
     #validate olt states
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN
-    ...    ${EMPTY}    ${olt_device_id}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${EMPTY}    ${olt_device_id}
     Enable Device    ${olt_device_id}
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    ENABLED    ACTIVE    REACHABLE
-    ...    ${olt_serial_number}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Validate OLT Device    ENABLED    ACTIVE    REACHABLE    ${olt_serial_number}
     ${logical_id}=    Get Logical Device ID From SN    ${olt_serial_number}
     Set Suite Variable    ${logical_id}
 
 Delete All Devices and Verify
     [Documentation]    Remove any devices from VOLTHA and ONOS
-
     # Clear devices from VOLTHA
     Disable Devices In Voltha    Root=true
     Wait Until Keyword Succeeds    ${timeout}    2s    Test Devices Disabled In Voltha    Root=true
     Delete Devices In Voltha    Root=true
     Wait Until Keyword Succeeds    ${timeout}    2s    Test Empty Device List
-
     # Clear devices from ONOS
     Remove All Devices From ONOS
     ...    http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT}
 
 Clear All Devices Then Create New Device
     [Documentation]    Remove any devices from VOLTHA and ONOS
-
     # Remove all devices from voltha and nos
     Delete All Devices and Verify
-
     # Execute normal test Setup Keyword
     Setup
 
 Teardown
     [Documentation]    kills processes and cleans up interfaces on src+dst servers
     Run Keyword If    ${has_dataplane}    Clean Up Linux
-    Run Keyword If    ${external_libs}    Log Kubernetes Containers Logs Since Time    ${datetime}    ${container_list}
+    Run Keyword If    ${external_libs}    Log Kubernetes Containers
+    ...    Logs Since Time    ${datetime}    ${container_list}
 
 Collect Logs
     [Documentation]    Collect Logs from voltha and onos cli for various commands
@@ -504,12 +499,14 @@
 
 Delete Device and Verify
     [Documentation]    Disable -> Delete devices via voltctl and verify its removed
-    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
+    ${rc}    ${output}=    Run and Return Rc and Output
+    ...    ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
     Should Be Equal As Integers    ${rc}    0
     Sleep    5s
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    DISABLED    UNKNOWN    REACHABLE
-    ...    ${olt_serial_number}
-    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Validate OLT Device    DISABLED    UNKNOWN    REACHABLE    ${olt_serial_number}
+    ${rc}    ${output}=    Run and Return Rc and Output
+    ...    ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id}
     Should Be Equal As Integers    ${rc}    0
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device Removed    ${olt_device_id}
 
@@ -518,30 +515,27 @@
     ...    Sanity test performs authentication, dhcp and pings for all the ONUs given for the POD
     ...    This keyword can be used to call in any other tests where sanity check is required
     ...    and avoids duplication of code.
-
     ${of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS    ${olt_serial_number}
     Set Global Variable    ${of_id}
-
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
         ...    ENABLED    ACTIVE    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=omci-flows-pushed
-
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
-        ${onu_port}=    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
-        ...    ${of_id}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU
-        ...    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword If    ${has_dataplane}      Run Keyword And Continue On Failure    Validate Authentication    True
+        ${onu_port}=    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Get ONU Port in ONOS    ${src['onu']}    ${of_id}
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Verify Eapol Flows Added For ONU    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate Authentication    True
         ...    ${src['dp_iface_name']}    wpa_supplicant.conf    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s    Verify ONU in AAA-Users
-        ...    ${k8s_node_ip}    ${ONOS_SSH_PORT}     ${onu_port}
-        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} ${onu_port}
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
+        ...    Verify ONU in AAA-Users    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
+        ...    Execute ONOS CLI Command    ${k8s_node_ip}    ${ONOS_SSH_PORT}
+        ...    volt-add-subscriber-access ${of_id} ${onu_port}
         Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate DHCP and Ping    True
         ...    True    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
         ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
@@ -549,8 +543,8 @@
         ...    ${dst['container_name']}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
         ...    Validate Subscriber DHCP Allocation    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword and Ignore Error   Get Device Output from Voltha    ${onu_device_id}
-        Run Keyword and Ignore Error   Collect Logs
+        Run Keyword and Ignore Error    Get Device Output from Voltha    ${onu_device_id}
+        Run Keyword and Ignore Error    Collect Logs
     END
 
 Repeat Sanity Test
@@ -568,19 +562,22 @@
 
 
         ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
-        ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${src['onu']}
-        ...    ${of_id}
-        Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}    ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate Authentication After Reassociate
+        ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Get ONU Port in ONOS    ${src['onu']}    ${of_id}
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Verify Eapol Flows Added For ONU    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Validate Authentication After Reassociate
         ...    True    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}
         ...    ${src['container_type']}    ${src['container_name']}
-        Wait Until Keyword Succeeds    ${timeout}    2s    Verify ONU in AAA-Users    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}     ${onu_port}
-        Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}
-        ...    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} ${onu_port}
-        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure    Validate DHCP and Ping    True
-        ...    True    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Verify ONU in AAA-Users    ${k8s_node_ip}    ${ONOS_SSH_PORT}     ${onu_port}
+        Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Execute ONOS CLI Command    ${k8s_node_ip}    ${ONOS_SSH_PORT}
+        ...    volt-add-subscriber-access ${of_id} ${onu_port}
+        Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
+        ...    Validate DHCP and Ping    True    True
+        ...    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
         ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         ...    ${dst['dp_iface_name']}    ${dst['ip']}    ${dst['user']}    ${dst['pass']}    ${dst['container_type']}
         ...    ${dst['container_name']}
diff --git a/tests/functional/Voltha_ScaleFunctionalTests.robot b/tests/functional/Voltha_ScaleFunctionalTests.robot
index f60b4dd..1bda666 100644
--- a/tests/functional/Voltha_ScaleFunctionalTests.robot
+++ b/tests/functional/Voltha_ScaleFunctionalTests.robot
@@ -13,8 +13,8 @@
 # limitations under the License.
 
 *** Settings ***
-Documentation    Test suite that engages a larger number of ONU at the same which makes it a more realistic test
-...    It is addaptable to either BBSim or Real H/W using a configuration file
+Documentation     Test suite that engages a larger number of ONU at the same time to test scale
+...               It is compatible with either BBSim or real H/W using a configuration file
 Suite Setup       Setup Suite
 Suite Teardown    Teardown Suite
 Library           Collections
@@ -30,10 +30,10 @@
 Resource          ../../variables/variables.robot
 
 *** Variables ***
-${timeout}         60s
+${timeout}        60s
 ${long_timeout}    420
-${of_id}           0
-${logical_id}      0
+${of_id}          0
+${logical_id}     0
 ${has_dataplane}    True
 ${external_libs}    True
 ${teardown_device}    False
@@ -50,13 +50,13 @@
     ${olt_device_id}=    Create Device    ${olt_ip}    ${OLT_PORT}
     Set Global Variable    ${olt_device_id}
     #validate olt states
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device   PREPROVISIONED    UNKNOWN    UNKNOWN  ${EMPTY}
-    ...    ${olt_device_id}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ... Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${EMPTY}    ${olt_device_id}
     #enable device
     Enable Device    ${olt_device_id}
     #validate olt states
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device   ENABLED    ACTIVE    REACHABLE    ${EMPTY}
-    ...    ${olt_device_id}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ... Validate OLT Device    ENABLED    ACTIVE    REACHABLE    ${EMPTY}    ${olt_device_id}
 
 ONU Discovery
     [Documentation]    Discover lists of ONUS, their Serial Numbers and device id
@@ -67,12 +67,13 @@
     Build ONU SN List    ${List_ONU_Serial}
     Log    ${List_ONU_Serial}
     #validate onu states
-    Wait Until Keyword Succeeds    ${long_timeout}    20s    Validate ONU Devices    ENABLED    ACTIVE    REACHABLE
-    ...    ${List_ONU_Serial}
+    Wait Until Keyword Succeeds    ${long_timeout}    20s
+    ...    Validate ONU Devices    ENABLED    ACTIVE    REACHABLE    ${List_ONU_Serial}
 
 Validate Device's Ports and Flows
     [Documentation]    Verify Ports and Flows listed for OLT and ONUs
-    ...    For OLT we validate the port types and numbers and for flows we simply verify that their numbers > 0
+    ...    For OLT we validate the port types and numbers and for flows we simply
+    ...    verify that their numbers > 0
     ...    For each ONU, we validate the port types and numbers for each and for flows.
     ...    For flows they should be == 0 at this stage
     [Tags]    active
@@ -83,7 +84,8 @@
     #validate onu port types
     Validate ONU Port Types    ${List_ONU_Serial}    PON_ONU    ETHERNET_UNI
     #validate onu flows
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate ONU Flows    ${List_ONU_Serial}    ${num_onu_flows}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Validate ONU Flows    ${List_ONU_Serial}    ${num_onu_flows}
 
 Validate Logical Device
     [Documentation]    Verify that logical device exists and then verify its ports and flows
@@ -118,7 +120,8 @@
     ...    kills processes and cleans up interfaces on src+dst servers
     Run Keyword If    ${external_libs}    Get ONOS Status    ${k8s_node_ip}
     Run Keyword If    ${has_dataplane}    Clean Up Linux
-    Run Keyword If    ${external_libs}    Log Kubernetes Containers Logs Since Time    ${datetime}    ${container_list}
+    Run Keyword If    ${external_libs}
+    ...    Log Kubernetes Containers Logs Since Time    ${datetime}    ${container_list}
     Run Keyword If    ${teardown_device}    Delete Device and Verify
     Run Keyword If    ${teardown_device}    Test Empty Device List
     Run Keyword If    ${teardown_device}    Execute ONOS CLI Command    ${k8s_node_ip}    ${ONOS_SSH_PORT}
@@ -145,10 +148,12 @@
 
 Delete Device and Verify
     [Documentation]    Disable -> Delete devices via voltctl and verify its removed
-    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
+    ${rc}    ${output}=    Run and Return Rc and Output
+    ...    ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
     Should Be Equal As Integers    ${rc}    0
-    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    DISABLED    UNKNOWN    REACHABLE
-    ...    ${olt_serial_number}
-    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id}
+    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Validate OLT Device    DISABLED    UNKNOWN    REACHABLE    ${olt_serial_number}
+    ${rc}    ${output}=    Run and Return Rc and Output
+    ...    ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id}
     Should Be Equal As Integers    ${rc}    0
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device Removed    ${olt_device_id}