VOL-2125: Fix Lint "Line it too long" in voltha-system-tests
All Lint "Line it too long" issues have been fixed
From hereon, all Lint issues should be addressed
Change-Id: If8d29382c875c580e22ab1a69d9217fb37288644
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
index c2067ae..765a31b 100644
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -29,13 +29,15 @@
Lookup Service IP
[Arguments] ${namespace} ${name}
[Documentation] Uses kubeclt to resolve a service name to an IP
- ${rc} ${ip}= Run and Return Rc and Output kubectl get svc -n ${namespace} ${name} -o jsonpath={.spec.clusterIP}
+ ${rc} ${ip}= Run and Return Rc and Output
+ ... kubectl get svc -n ${namespace} ${name} -o jsonpath={.spec.clusterIP}
Should Be Equal as Integers ${rc} 0
[Return] ${ip}
Lookup Service PORT
[Arguments] ${namespace} ${name}
[Documentation] Uses kubeclt to resolve a service name to an PORT
- ${rc} ${port}= Run and Return Rc and Output kubectl get svc -n ${namespace} ${name} -o jsonpath={.spec.ports[0].port}
+ ${rc} ${port}= Run and Return Rc and Output
+ ... kubectl get svc -n ${namespace} ${name} -o jsonpath={.spec.ports[0].port}
Should Be Equal as Integers ${rc} 0
[Return] ${port}
diff --git a/libraries/onos.robot b/libraries/onos.robot
index 0647ada..67ae0af 100644
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -90,13 +90,15 @@
Verify Eapol Flows Added
[Arguments] ${ip} ${port} ${expected_flows}
[Documentation] Matches for number of eapol flows based on number of onus
- ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port} flows -s -f ADDED | grep eapol | grep IN_PORT | wc -l
+ ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ... flows -s -f ADDED | grep eapol | grep IN_PORT | wc -l
Should Contain ${eapol_flows_added} ${expected_flows}
Verify Eapol Flows Added For ONU
[Arguments] ${ip} ${port} ${onu_port}
[Documentation] Verifies if the Eapol Flows are added in ONOS for the ONU
- ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port} flows -s -f ADDED | grep eapol | grep IN_PORT:${onu_port}
+ ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ... flows -s -f ADDED | grep eapol | grep IN_PORT:${onu_port}
Should Not Be Empty ${eapol_flows_added}
Verify ONU in AAA-Users
@@ -123,5 +125,6 @@
[Arguments] ${ip} ${port} ${onu_port}
[Documentation] Verifies that the specified subscriber is found in DHCP allocations
##TODO: Enhance the keyword to include DHCP allocated address is not 0.0.0.0
- ${allocations}= Execute ONOS CLI Command ${ip} ${port} dhcpl2relay-allocations | grep DHCPACK | grep ${onu_port}
- Should Not Be Empty ${allocations} ONU port ${onu_port} not found in dhcpl2relay-allocations
+ ${allocations}= Execute ONOS CLI Command ${ip} ${port}
+ ... dhcpl2relay-allocations | grep DHCPACK | grep ${onu_port}
+ Should Not Be Empty ${allocations} ONU port ${onu_port} not found in dhcpl2relay-allocations
diff --git a/libraries/utils.robot b/libraries/utils.robot
index e303379..db67643 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -31,4 +31,5 @@
# check voltctl and kubectl configured
${voltctl_rc}= Run And Return RC ${VOLTCTL_CONFIG}; voltctl device list
${kubectl_rc}= Run And Return RC ${KUBECTL_CONFIG}; kubectl get pods
- Run Keyword If ${voltctl_rc} != 0 or ${kubectl_rc} != 0 FATAL ERROR VOLTCTL and KUBECTL not configured. Please configure before executing tests.
+ Run Keyword If ${voltctl_rc} != 0 or ${kubectl_rc} != 0 FATAL ERROR
+ ... VOLTCTL and KUBECTL not configured. Please configure before executing tests.
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index d72a4fc..5600f06 100644
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -30,7 +30,8 @@
[Arguments] ${ip} ${port}
[Documentation] Creates a device in VOLTHA
#create/preprovision device
- ${rc} ${device_id}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device create -t openolt -H ${ip}:${port}
+ ${rc} ${device_id}= Run and Return Rc and Output
+ ... ${VOLTCTL_CONFIG}; voltctl device create -t openolt -H ${ip}:${port}
Should Be Equal As Integers ${rc} 0
[Return] ${device_id}
@@ -68,7 +69,8 @@
Should Be Equal As Integers ${rc2} 0
Validate Device
- [Arguments] ${serial_number} ${admin_state} ${oper_status} ${connect_status} ${onu_reasons}=${EMPTY} ${onu}=False
+ [Arguments] ${serial_number} ${admin_state} ${oper_status} ${connect_status} ${onu_reasons}=${EMPTY}
+ ... ${onu}=False
[Documentation] Parses the output of "voltctl device list" and inspects device ${serial_number}
... Arguments are matched for device states of: "admin_state", "oper_status", and "connect_status"
${output}= Run ${VOLTCTL_CONFIG}; voltctl device list -o json
@@ -86,8 +88,10 @@
END
Should Be Equal ${astate} ${admin_state} Device ${serial_number} admin_state != ENABLED values=False
Should Be Equal ${opstatus} ${oper_status} Device ${serial_number} oper_status != ACTIVE values=False
- Should Be Equal ${cstatus} ${connect_status} Device ${serial_number} connect_status != REACHABLE values=False
- Run Keyword If '${onu}' == 'True' Should Contain ${onu_reasons} ${mib_state} Device ${serial_number} mib_state incorrect values=False
+ Should Be Equal ${cstatus} ${connect_status} Device ${serial_number} connect_status != REACHABLE
+ ... values=False
+ Run Keyword If '${onu}' == 'True' Should Contain ${onu_reasons} ${mib_state}
+ ... Device ${serial_number} mib_state incorrect values=False
Get Device ID From SN
[Arguments] ${serial_number}
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index e347a71..70c08c8 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -65,36 +65,40 @@
... REACHABLE onu=True onu_reasons=${onu_reasons}
${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 True ${src['dp_iface_name']}
- ... wpa_supplicant.conf ${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 True
+ ... ${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}
-
- 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']}
-
- Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
+ 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']}
+ Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
+ ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
END
*** Keywords ***
Setup Suite
[Documentation] Setup the whole test suite
# BBSim sanity test doesn't need these imports from other repositories
- Run Keyword If ${external_libs} Import Library ${CURDIR}/../../../voltha/tests/atests/common/testCaseUtils.py
- Run Keyword If ${external_libs} Import Resource ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/Subscriber.robot
- Run Keyword If ${external_libs} Import Resource ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/OLT.robot
- Run Keyword If ${external_libs} Import Resource ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/DHCP.robot
- Run Keyword If ${external_libs} Import Resource ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/Kubernetes.robot
+ Run Keyword If ${external_libs} Import Library
+ ... ${CURDIR}/../../../voltha/tests/atests/common/testCaseUtils.py
+ Run Keyword If ${external_libs} Import Resource
+ ... ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/Subscriber.robot
+ Run Keyword If ${external_libs} Import Resource
+ ... ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/OLT.robot
+ Run Keyword If ${external_libs} Import Resource
+ ... ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/DHCP.robot
+ Run Keyword If ${external_libs} Import Resource
+ ... ${CURDIR}/../../../cord-tester/src/test/cord-api/Framework/Kubernetes.robot
Set Global Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG}
Set Global Variable ${export_kubeconfig} export KUBECONFIG=${KUBERNETES_CONF}
Set Global Variable ${VOLTCTL_CONFIG} export VOLTCONFIG=%{VOLTCONFIG}