creating voltctl and onos test libraries
creating voltha physical pod build JF

Change-Id: I26cb4f15c2f00c0a9bb951e75dcb35cbcd89cea7
diff --git a/Jenkinsfile-voltha-build b/Jenkinsfile-voltha-build
new file mode 100644
index 0000000..21eb2d8
--- /dev/null
+++ b/Jenkinsfile-voltha-build
@@ -0,0 +1,149 @@
+// Copyright 2017-present Open Networking Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// 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.
+
+node ("${TestNodeName}") {
+    timeout (100) {
+        try {
+            stage ("Parse deployment configuration file") {
+                sh returnStdout: true, script: "rm -rf helm-repo-tools ${configBaseDir}"
+                sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/helm-repo-tools"
+                sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
+                sh returnStdout: true, script: "git clone https://github.com/ciena/kind-voltha.git"
+                deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+            }
+            stage('Clean up') {
+                timeout(10) {
+                    sh returnStdout: true, script: """
+                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                    cd kind-voltha/
+                    DEPLOY_K8S=no ./voltha down
+                    """
+                    timeout(5) {
+                        waitUntil {
+                            helm_deleted = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            helm ls -q | grep -E -v 'docker-registry|mavenrepo|ponnet' | wc -l
+                            """
+                            return helm_deleted.toInteger() == 0
+                        }
+                    }
+                    timeout(5) {
+                        waitUntil {
+                            kubectl_deleted = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods --all-namespaces --no-headers | grep -E -v 'kube-system|docker-registry|mavenrepo|ponnet' | wc -l
+                            """
+                            return kubectl_deleted.toInteger() == 0
+                        }
+                    }
+                }
+            }
+            stage('Install Voltha') {
+                timeout(10) {
+                    sh returnStdout: true, script: """
+                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                    cd kind-voltha/
+                    EXTRA_HELM_FLAGS='-f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/voltha/${configFileName}.yml' WITH_RADIUS=y WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no ONOS_TAG=voltha-2.1 ./voltha up
+                    """
+                }
+            }
+
+            if ( params.reinstallOlt ) {
+                stage('Reinstall OLT software') {
+                    for(int i=0; i < deployment_config.olts.size(); i++) {
+                        sh returnStdout: true, script: """
+                        sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --remove asfvolt16 && dpkg --purge asfvolt16'
+                        """
+                        timeout(5) {
+                            waitUntil {
+                                olt_sw_present = sh returnStdout: true, script: """
+                                sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --list | grep asfvolt16 | wc -l'
+                                """
+                                return olt_sw_present.toInteger() == 0
+                            }
+                        }
+                        sh returnStdout: true, script: """
+                        sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} "dpkg --install ${oltDebVersion}"
+                        """
+                        timeout(5) {
+                            waitUntil {
+                                olt_sw_present = sh returnStdout: true, script: """
+                                sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --list | grep asfvolt16 | wc -l'
+                                """
+                                return olt_sw_present.toInteger() == 1
+                            }
+                        }
+                        // If the OLT is connected to a 40G switch interface, set the NNI port to be downgraded
+                        if ("${deployment_config.olts[i].fortygig}" != null && "${deployment_config.olts[i].fortygig}" == 'true') {
+                            sh returnStdout: true, script: """
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'echo "port ce128 sp=40000" >> /broadcom/qax.soc'
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '/opt/bcm68620/svk_init.sh'
+                            """
+                        }
+                    }
+                }
+                stage('Restart OLT processes') {
+                    for(int i=0; i < deployment_config.olts.size(); i++) {
+                        timeout(5) {
+                            sh returnStdout: true, script: """
+                            ssh-keyscan -H ${deployment_config.olts[i].ip} >> ~/.ssh/known_hosts
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service bal_core_dist stop' || true
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service openolt stop' || true
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '> /var/log/bal_core_dist.log'
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '> /var/log/openolt.log'
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service bal_core_dist start &'
+                            sleep 5
+                            sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service openolt start &'
+                            """
+                        }
+                        timeout(15) {
+                            waitUntil {
+                                onu_discovered = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'cat /var/log/openolt.log | grep \"oper_state: up\" | wc -l'"
+                                return onu_discovered.toInteger() > 0
+                            }
+                        }
+                    }
+                }
+            }
+            if ( params.configurePod ) {
+                stage('Configure ONOS Netcfg') {
+                    timeout(1) {
+                        waitUntil {
+                            sh returnStdout: true, script: """
+                            curl -w '\n%{http_code}' --fail -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @voltha-system-tests/tests/data/${configFileName}-onos-netcfg.json
+                            """
+                        }
+                    }
+                }
+                stage('Push Tech-Profile') {
+                    timeout(1) {
+                        waitUntil {
+                            sh returnStdout: true, script: """
+                            kubectl exec -it $(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk ‘NR==1{print $1}‘) -n voltha /bin/sh
+                            cat voltha-system-tests/tests/data/${configFileName}-${techProfile}.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/xgspon/64
+                            """
+                        }
+                    }
+                }
+            }
+            currentBuild.result = 'SUCCESS'
+        } catch (err) {
+            currentBuild.result = 'FAILURE'
+            step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
+            throw err
+        }
+        echo "RESULT: ${currentBuild.result}"
+    }
+}
+
diff --git a/libraries/onos.robot b/libraries/onos.robot
new file mode 100644
index 0000000..8719819
--- /dev/null
+++ b/libraries/onos.robot
@@ -0,0 +1,69 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+
+# onos common functions
+
+*** Settings ***
+Documentation     Library for various utilities
+Library           SSHLibrary
+Library           HttpLibrary.HTTP
+Library           String
+Library           DateTime
+Library           Process
+Library           Collections
+Library           RequestsLibrary
+Library           OperatingSystem
+
+*** Keywords ***
+Execute ONOS Command
+    [Arguments]    ${host}    ${port}    ${cmd}
+    [Documentation]    Establishes an ssh connection to the onos contoller and executes a command
+    ${conn_id}=    SSHLibrary.Open Connection    ${host}    port=${port}    prompt=onos>    timeout=300s
+    SSHLibrary.Login    karaf    karaf
+    ${output}=    SSHLibrary.Execute Command    ${cmd}
+    SSHLibrary.Close Connection
+    [Return]    ${output}
+
+Validate OLT Device in ONOS
+    [Documentation]    Checks if olt has been connected to ONOS
+    [Arguments]    ${serial_number}
+    ${resp}=    Get Request    ONOS    onos/v1/devices
+    ${jsondata}=    To Json    ${resp.content}
+    Should Not Be Empty    ${jsondata['devices']}
+    ${length}=    Get Length    ${jsondata['devices']}
+    @{serial_numbers}=    Create List
+    : FOR    ${INDEX}    IN RANGE    0    ${length}
+    \    ${value}=    Get From List    ${jsondata['devices']}    ${INDEX}
+    \    ${sn}=    Get From Dictionary    ${value}    serial
+    \    ${of_id}=    Get From Dictionary    ${value}    id
+    Should Be Equal As Strings    ${sn}    ${serial_number}
+    Set Suite Variable    ${of_id}
+
+Verify Eapol Flows Added
+    [Arguments]    ${expected_onus}
+    [Documentation]    Matches for number of eapol flows based on number of onus
+    ${eapol_flows_added}=    Execute ONOS Command    flows -s -f ADDED | grep eapol | wc -l
+    Should Contain    ${eapol_flows_added}    ${expected_onus}
+
+Verify Number of AAA-Users
+    [Arguments]    ${expected_onus}
+    [Documentation]    Matches for number of aaa-users authorized based on number of onus
+    ${aaa_users}=    Execute ONOS Command    aaa-users | grep AUTHORIZED | wc -l
+    Should Contain    ${aaa_users}    ${expected_onus}
+
+Validate DHCP Allocations
+    [Arguments]    ${expected_onus}
+    [Documentation]    Matches for number of dhcpacks based on number of onus
+    ${allocations}=    Execute ONOS Command    dhcpl2relay-allocations | grep DHCPACK | wc -l
+    Should Contain    ${allocations}    ${expected_onus}
\ No newline at end of file
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 7b9768b..db67643 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -26,62 +26,6 @@
 Library           OperatingSystem
 
 *** Keywords ***
-Execute ONOS Command
-    [Arguments]    ${cmd}
-    [Documentation]    Establishes an ssh connection to the onos contoller and executes a command
-    ${conn_id}=    SSHLibrary.Open Connection    localhost    port=8101    prompt=onos>    timeout=300s
-    SSHLibrary.Login    karaf    karaf
-    ${output}=    SSHLibrary.Execute Command    ${cmd}
-    SSHLibrary.Close Connection
-    [Return]    ${output}
-
-Validate Device
-    [Arguments]    ${serial_number}    ${admin_state}    ${oper_status}    ${connect_status}
-    [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
-    ${jsondata}=    To Json    ${output}
-    Log    ${jsondata}
-    ${length}=    Get Length    ${jsondata}
-    : FOR    ${INDEX}    IN RANGE    0    ${length}
-    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
-    \    ${astate}=    Get From Dictionary    ${value}    adminstate
-    \    ${opstatus}=    Get From Dictionary    ${value}    operstatus
-    \    ${cstatus}=    Get From Dictionary    ${value}    connectstatus
-    \    ${sn}=    Get From Dictionary    ${value}    serialnumber
-    \    Run Keyword If    '${sn}' == '${serial_number}'    Exit For Loop
-    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
-
-Get Device ID From SN
-    [Arguments]    ${serial_number}
-    [Documentation]    Gets the device id by matching for ${serial_number}
-    ${output}=    Run    ${VOLTCTL_CONFIG}; voltctl device list -o json
-    ${jsondata}=    To Json    ${output}
-    Log    ${jsondata}
-    ${length}=    Get Length    ${jsondata}
-    : FOR    ${INDEX}    IN RANGE    0    ${length}
-    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
-    \    ${id}=    Get From Dictionary    ${value}    id
-    \    ${sn}=    Get From Dictionary    ${value}    serialnumber
-    \    Run Keyword If    '${sn}' == '${serial_number}'    Exit For Loop
-    [Return]    ${id}
-
-Validate Device Removed
-    [Arguments]    ${id}
-    [Documentation]    Verifys that device, ${serial_number}, has been removed
-    ${output}=    Run    ${VOLTCTL_CONFIG}; voltctl device list -o json
-    ${jsondata}=    To Json    ${output}
-    Log    ${jsondata}
-    ${length}=    Get Length    ${jsondata}
-    @{ids}=    Create List
-    : FOR    ${INDEX}    IN RANGE    0    ${length}
-    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
-    \    ${device_id}=    Get From Dictionary    ${value}    id
-    \    Append To List    ${ids}    ${device_id}
-    List Should Not Contain Value    ${ids}    ${id}
-
 Check CLI Tools Configured
     [Documentation]    Tests that use 'voltctl' and 'kubectl' should execute this keyword in suite setup
     # check voltctl and kubectl configured
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
new file mode 100644
index 0000000..cd4604c
--- /dev/null
+++ b/libraries/voltctl.robot
@@ -0,0 +1,91 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+
+# voltctl common functions
+
+*** Settings ***
+Documentation     Library for various utilities
+Library           SSHLibrary
+Library           HttpLibrary.HTTP
+Library           String
+Library           DateTime
+Library           Process
+Library           Collections
+Library           RequestsLibrary
+Library           OperatingSystem
+
+*** Keywords ***
+Create Device
+    [Arguments]    ${ip}    ${port}
+    [Documentation]    Parses the output of "voltctl device list" and inspects device ${serial_number}
+    #create/preprovision device
+    ${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}
+
+Enable Device
+    [Arguments]    ${device_id}
+    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device enable ${device_id}
+    Should Be Equal As Integers    ${rc}    0
+
+Validate Device
+    [Arguments]    ${serial_number}    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_reason}    ${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
+    ${jsondata}=    To Json    ${output}
+    Log    ${jsondata}
+    ${length}=    Get Length    ${jsondata}
+    : FOR    ${INDEX}    IN RANGE    0    ${length}
+    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
+    \    ${astate}=    Get From Dictionary    ${value}    adminstate
+    \    ${opstatus}=    Get From Dictionary    ${value}    operstatus
+    \    ${cstatus}=    Get From Dictionary    ${value}    connectstatus
+    \    ${sn}=    Get From Dictionary    ${value}    serialnumber
+    \    ${mib_state}=    Get From Dictionary    ${value}    reason
+    \    Run Keyword If    '${sn}' == '${serial_number}'    Exit For Loop
+    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 Be Equal    ${mib_state}    ${onu_reason}    Device ${serial_number} mib_state incorrect    values=False
+
+
+Get Device ID From SN
+    [Arguments]    ${serial_number}
+    [Documentation]    Gets the device id by matching for ${serial_number}
+    ${output}=    Run    ${VOLTCTL_CONFIG}; voltctl device list -o json
+    ${jsondata}=    To Json    ${output}
+    Log    ${jsondata}
+    ${length}=    Get Length    ${jsondata}
+    : FOR    ${INDEX}    IN RANGE    0    ${length}
+    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
+    \    ${id}=    Get From Dictionary    ${value}    id
+    \    ${sn}=    Get From Dictionary    ${value}    serialnumber
+    \    Run Keyword If    '${sn}' == '${serial_number}'    Exit For Loop
+    [Return]    ${id}
+
+Validate Device Removed
+    [Arguments]    ${id}
+    [Documentation]    Verifys that device, ${serial_number}, has been removed
+    ${output}=    Run    ${VOLTCTL_CONFIG}; voltctl device list -o json
+    ${jsondata}=    To Json    ${output}
+    Log    ${jsondata}
+    ${length}=    Get Length    ${jsondata}
+    @{ids}=    Create List
+    : FOR    ${INDEX}    IN RANGE    0    ${length}
+    \    ${value}=    Get From List    ${jsondata}    ${INDEX}
+    \    ${device_id}=    Get From Dictionary    ${value}    id
+    \    Append To List    ${ids}    ${device_id}
+    List Should Not Contain Value    ${ids}    ${id}
\ No newline at end of file
diff --git a/tests/sanity/sanity.robot b/tests/sanity/sanity.robot
index 6452be6..1f84059 100644
--- a/tests/sanity/sanity.robot
+++ b/tests/sanity/sanity.robot
@@ -18,6 +18,8 @@
 ...               Assumes voltha-go, go-based onu/olt adapters, and bbsim are installed
 ...               voltctl and kubectl should be configured prior to running these tests
 Library           OperatingSystem
+Resource          ${CURDIR}/../../libraries/onos.robot
+Resource          ${CURDIR}/../../libraries/voltctl.robot
 Resource          ${CURDIR}/../../libraries/utils.robot
 Resource          ${CURDIR}/../../variables/variables.robot
 Suite Setup       Setup
@@ -35,17 +37,14 @@
     ...    re-validate deployment
     [Tags]    sanity
     #create/preprovision device
-    ${rc}    ${olt_device_id}=    Run and Return Rc and Output
-    ...    ${VOLTCTL_CONFIG}; voltctl device create -t openolt -H ${BBSIM_IP}:${BBSIM_PORT}
-    Should Be Equal As Integers    ${rc}    0
+    ${olt_device_id}=    Create Device    ${BBSIM_IP}    ${BBSIM_PORT}
     Set Suite Variable    ${olt_device_id}
     #enable device
-    ${rc}    ${output}=    Run and Return Rc and Output    ${VOLTCTL_CONFIG}; voltctl device enable ${olt_device_id}
-    Should Be Equal As Integers    ${rc}    0
+    Enable Device    ${olt_device_id}
     #validate olt states
     Wait Until Keyword Succeeds    60s    5s    Validate Device    ${BBSIM_OLT_SN}    ENABLED    ACTIVE    REACHABLE
     #validate onu states
-    Wait Until Keyword Succeeds    60s    5s    Validate Device    ${BBSIM_ONU_SN}    ENABLED    ACTIVE    REACHABLE
+    Wait Until Keyword Succeeds    60s    5s    Validate Device    ${BBSIM_ONU_SN}    ENABLED    ACTIVE    REACHABLE    onu=True    onu_reason=tech-profile-config-download-success
     #get onu device id
     ${onu_device_id}=    Get Device ID From SN    ${BBSIM_ONU_SN}
     Set Suite Variable    ${onu_device_id}
@@ -53,7 +52,7 @@
 Validate OLT Connected to ONOS
     [Documentation]    Verifies the BBSIM-OLT device is activated in onos
     [Tags]    sanity
-    Wait Until Keyword Succeeds    ${timeout}    5s    BBSIM OLT Device in ONOS
+    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device in ONOS    ${BBSIM_OLT_SN}
 
 Check EAPOL Flows in ONOS
     [Documentation]    Validates eapol flows for the onu are pushed from voltha
@@ -71,7 +70,7 @@
     ##     TODO: this works fine with 1 onu, but with multiple onus, we need to ensure this is executes
     ...    prior to to dhclient starting. possible start a process after first test case to just attempt
     ...    "volt-add-subscriber-access" to all onus periodically?
-    ${output}=    Execute ONOS Command    volt-add-subscriber-access ${of_id} 16
+    ${output}=    Execute ONOS Command    ${server_ip}    ${ONOS_SSH_PORT}    volt-add-subscriber-access ${of_id} 16
     Log    ${output}
 
 Validate DHCP Assignment in ONOS
@@ -110,36 +109,4 @@
 
 Teardown
     [Documentation]    Delete all http sessions
-    Delete All Sessions
-
-BBSIM OLT Device in ONOS
-    [Documentation]    Checks if bbsim olt has been connected to ONOS
-    ${resp}=    Get Request    ONOS    onos/v1/devices
-    ${jsondata}=    To Json    ${resp.content}
-    Should Not Be Empty    ${jsondata['devices']}
-    ${length}=    Get Length    ${jsondata['devices']}
-    @{serial_numbers}=    Create List
-    : FOR    ${INDEX}    IN RANGE    0    ${length}
-    \    ${value}=    Get From List    ${jsondata['devices']}    ${INDEX}
-    \    ${sn}=    Get From Dictionary    ${value}    serial
-    \    ${of_id}=    Get From Dictionary    ${value}    id
-    Should Be Equal As Strings    ${sn}    ${BBSIM_OLT_SN}
-    Set Suite Variable    ${of_id}
-
-Verify Eapol Flows Added
-    [Arguments]    ${expected_onus}
-    [Documentation]    Matches for number of eapol flows based on number of onus
-    ${eapol_flows_added}=    Execute ONOS Command    flows -s -f ADDED | grep eapol | wc -l
-    Should Contain    ${eapol_flows_added}    ${expected_onus}
-
-Verify Number of AAA-Users
-    [Arguments]    ${expected_onus}
-    [Documentation]    Matches for number of aaa-users authorized based on number of onus
-    ${aaa_users}=    Execute ONOS Command    aaa-users | grep AUTHORIZED | wc -l
-    Should Contain    ${aaa_users}    ${expected_onus}
-
-Validate DHCP Allocations
-    [Arguments]    ${expected_onus}
-    [Documentation]    Matches for number of dhcpacks based on number of onus
-    ${allocations}=    Execute ONOS Command    dhcpl2relay-allocations | grep DHCPACK | wc -l
-    Should Contain    ${allocations}    ${expected_onus}
\ No newline at end of file
+    Delete All Sessions
\ No newline at end of file
diff --git a/variables/variables.robot b/variables/variables.robot
index e518ba6..5c43f27 100644
--- a/variables/variables.robot
+++ b/variables/variables.robot
@@ -18,4 +18,5 @@
 ${BBSIM_DEVICE_ID}      of:0000626273696d76
 ${BBSIM_OLT_SN}         BBSIMOLT000
 ${BBSIM_ONU_SN}         BBSM00000001
-${ONOS_REST_PORT}       8181
\ No newline at end of file
+${ONOS_REST_PORT}       8181
+${ONOS_SSH_PORT}        8101
\ No newline at end of file