X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FQemuUtils.py;h=6fad6ed8b78597a328546c38a4154f1931ccaf42;hb=1999c2ecc15760a57bdf34498635432ddb0321e0;hp=ff3a00f730479c5cbe41ec0bf5de18f6748066da;hpb=ff8ba5fd5fd066332b4b109caad09e5dbb86b853;p=csit.git diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index ff3a00f730..6fad6ed8b7 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. +# Copyright (c) 2019 Cisco and/or its affiliates. # 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: @@ -23,7 +23,7 @@ from distutils.version import StrictVersion from robot.api import logger from resources.libraries.python.ssh import SSH, SSHTimeout -from resources.libraries.python.constants import Constants +from resources.libraries.python.Constants import Constants from resources.libraries.python.DUTSetup import DUTSetup from resources.libraries.python.topology import NodeType, Topology @@ -213,7 +213,10 @@ class QemuUtils(object): self._ssh = SSH() self._ssh.connect(node) self._vm_info['host'] = node['host'] - + if node['port'] != 22: + self._vm_info['host_port'] = node['port'] + self._vm_info['host_username'] = node['username'] + self._vm_info['host_password'] = node['password'] arch = Topology.get_node_arch(node) self._qemu_opt['qemu_bin'] = 'qemu-system-{arch}'.format(arch=arch)