Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/22965
to review the following change.
Change subject: BindingXMLRPC cleanup: Inline getServerInfo
......................................................................
BindingXMLRPC cleanup: Inline getServerInfo
Inlining getServerInfo because:
1) It's used exactly once
2) I'd like to avoid people using it at all. It only works
if there's exactly one client, and only for one command
at a time. It works for the purposes it's used, but if
(code) users expect it to work for all cases they'd be
in for a surprise
Change-Id: I9f19630f995c2fe9fb3e3c11e4027f22f98722ba
Signed-off-by: Assaf Muller <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/22835
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/BindingXMLRPC.py
1 file changed, 3 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/22965/1
diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index 20aaee1..57f5ac9 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -81,16 +81,6 @@
self._thread.join()
return {'status': doneCode}
- def getServerInfo(self):
- """
- Return the IP address and last client information
- """
- last = self.server.lastClient
- lastserver = self.server.lastServerIP
- return {'management_ip': self.serverIP,
- 'lastClient': last,
- 'lastClientIface': getIfaceByIP(lastserver)}
-
def _getKeyCertFilenames(self):
"""
Get the locations of key and certificate files.
@@ -313,7 +303,9 @@
def getCapabilities(self):
api = API.Global()
ret = api.getCapabilities()
- ret['info'].update(self.getServerInfo())
+ ret['info']['management_ip'] = self.serverIP
+ ret['info']['lastClient'] = self.server.lastClient
+ ret['info']['lastClientIface'] = getIfaceByIP(self.server.lastServerIP)
return ret
def getHardwareInfo(self):
--
To view, visit http://gerrit.ovirt.org/22965
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f19630f995c2fe9fb3e3c11e4027f22f98722ba
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches