Updated ONOS Apps Upgrade Test for Apps Log Collection

Change-Id: Ie7fc592ce9304589085b571dd8da3b7eac282792
diff --git a/tests/software-upgrades/ONOS_AppsUpgrade.robot b/tests/software-upgrades/ONOS_AppsUpgrade.robot
index 64135e8..67b3ea3 100644
--- a/tests/software-upgrades/ONOS_AppsUpgrade.robot
+++ b/tests/software-upgrades/ONOS_AppsUpgrade.robot
@@ -79,6 +79,13 @@
     Wait Until Keyword Succeeds    ${timeout}    2s    Perform Sanity Test
     ${onos_url}=    Set Variable    http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT}
     ${num_apps_under_test}=    Get Length    ${list_onos_apps_under_test}
+    # Set log level to DEBUG for all apps under test
+    FOR    ${J}    IN RANGE    0    ${num_apps_under_test}
+        ${app_ut}=    Set Variable    ${list_onos_apps_under_test}[${J}][app]
+        Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Execute ONOS CLI Command on open connection    ${onos_ssh_connection}
+        ...    log:set DEBUG ${app_ut}
+    END
     FOR    ${I}    IN RANGE    0    ${num_apps_under_test}
         ${app}=    Set Variable    ${list_onos_apps_under_test}[${I}][app]
         ${version}=    Set Variable    ${list_onos_apps_under_test}[${I}][version]
@@ -108,6 +115,13 @@
     [Documentation]    Set up the test suite
     Common Test Suite Setup
     Create ONOS Apps Under Test List
+    ${onos_ssh_connection}    Open ONOS SSH Connection    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+    Set Suite Variable    ${onos_ssh_connection}
+
+Teardown Suite
+    [Documentation]    Replaces the Suite Teardown in utils.robot.
+    ...    Cleans up and checks all ONU ports disabled in ONOS.
+    Close All ONOS SSH Connections
 
 Verify ONOS Apps Active Except App Under Test
     [Documentation]    Verifies all the apps defined in input yaml are active except for the app under test