[VOL-2282]
Python 3 compatibility fixes and reorg
Moved the VOLTHA 1.x testCaseUtils.py to this repo, used by OLT.robot
Change-Id: I6936421e0d3155ad79c74e28058b8c0865daf107
diff --git a/src/test/cord-api/Framework/utils/onosUtils.py b/src/test/cord-api/Framework/utils/onosUtils.py
index 06420a6..ac07dc2 100644
--- a/src/test/cord-api/Framework/utils/onosUtils.py
+++ b/src/test/cord-api/Framework/utils/onosUtils.py
@@ -12,9 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import absolute_import
+
import paramiko
-def onos_command_execute(host, portNum, cmd, user='karaf', passwd='karaf'):
+
+def onos_command_execute(host, portNum, cmd, user="karaf", passwd="karaf"):
"""
:param host: onos-cord or onos-fabric
:param portNum: 8102 or 8101
@@ -34,6 +37,7 @@
finally:
client.close()
+
def get_compute_node_ip(compute_node):
"""
:param compute_node: one compute node information from output of 'cordvtn-nodes'
@@ -42,4 +46,4 @@
for line in compute_node.splitlines():
columns = line.split()
if len(columns) >= 2:
- return columns[2].split("/")[0]
\ No newline at end of file
+ return columns[2].split("/")[0]