Change in vdsm[master]: migration: simplify the remote port handling

fromani at redhat.com fromani at redhat.com
Mon Jun 23 09:42:17 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: migration: simplify the remote port handling
......................................................................

migration: simplify the remote port handling

the current code in _setupVdsConnection is a fancy
way to get the management_port from the BindingXMLRPC
internals.

This unnecessarily makes the coupling stricter, and
moreover is already done by vdscli.cannonizeHostPort.

Moreover, we already have support in place to let
the client (Engine) specify the destination port.

This patch cleans up the remote port handling
in _setupVdsConnection just by leveraging the
default behaviour already implemented.

Change-Id: Iee19377c6387738d7c4d4a898b6e716a1eeb884c
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/29048/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 7863274..100623a 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -88,9 +88,8 @@
 
         # FIXME: The port will depend on the binding being used.
         # This assumes xmlrpc
-        hostPort = vdscli.cannonizeHostPort(
-            self._dst, self._vm.cif.bindings['xmlrpc'].serverPort)
-        self.remoteHost, self.remotePort = hostPort.rsplit(':', 1)
+        hostPort = vdscli.cannonizeHostPort(self._dst)
+        self.remoteHost, _ = hostPort.rsplit(':', 1)
 
         if config.getboolean('vars', 'ssl'):
             self.destServer = vdscli.connect(


-- 
To view, visit http://gerrit.ovirt.org/29048
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee19377c6387738d7c4d4a898b6e716a1eeb884c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list