Change in vdsm[master]: net: Fix internal setupNetworks api usage

edwardh at redhat.com edwardh at redhat.com
Tue Feb 16 10:36:49 UTC 2016


Edward Haas has uploaded a new change for review.

Change subject: net: Fix internal setupNetworks api usage
......................................................................

net: Fix internal setupNetworks api usage

setupNetworks api defines 2 args and an unlimited number of kwargs.
The code used in the global api to proxy the request to supervdsm used
3 args (the last being a dict).

To be consistent and avoid multipe conversions on the way, the 3rd
argument should be expanded to kwargs.

This patch is a preperation for removing the bridging that exist at
supervdsm api and exporting setupNetworks api dynamically.

Change-Id: I96e2b7be3251a1c20111034e4cc6a4b746dde269
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M vdsm/API.py
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/53572/1

diff --git a/vdsm/API.py b/vdsm/API.py
index 479c00b..7894c7e 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1502,7 +1502,8 @@
             self._cif._netConfigDirty = True
 
             with self._rollback() as rollbackCtx:
-                supervdsm.getProxy().setupNetworks(networks, bondings, options)
+                supervdsm.getProxy().setupNetworks(networks, bondings,
+                                                   **options)
 
             if rollbackCtx['status'] != doneCode:
                 _after_network_setup_fail(networks, bondings, options)
@@ -1535,9 +1536,10 @@
                 # config holds the difference between RunningConfig on disk and
                 # the one in memory with the addition of {'remove': True}
                 # hence, the next call to setupNetworks will perform a cleanup.
-                supervdsm.getProxy().setupNetworks(
-                    config.networks, config.bonds, {'inRollback': True,
-                                                    'connectivityCheck': 0})
+                supervdsm.getProxy().setupNetworks(config.networks,
+                                                   config.bonds,
+                                                   inRollback=True,
+                                                   connectivityCheck=0)
             except Exception:
                 self.log.error('Memory rollback failed.', exc_info=True)
             finally:


-- 
To view, visit https://gerrit.ovirt.org/53572
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96e2b7be3251a1c20111034e4cc6a4b746dde269
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>


More information about the vdsm-patches mailing list