Change in vdsm[master]: Add a backward reference their master device for Vlan, Bond ...

asegurap at redhat.com asegurap at redhat.com
Mon May 20 06:39:16 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Add a backward reference their master device for Vlan, Bond and Nic
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

Thanks for the patch Mark. I was thinking about doing this and seeing that you did it yourself validates my idea. Very good indeed!

....................................................
File vdsm/netmodels.py
Line 38:         self.state = state
Line 39:         self.master = None
Line 40:         self.configurator = configurator
Line 41: 
Line 42:     def setMaster(self, master):
I like the idea of having the master, but I believe that it is more pythonic to set the device directly instead of making setter. I'd also add the possibility to set the master on __init__
Line 43:         self.master = master
Line 44: 
Line 45:     def configure(self, network=None, bridge=None, bonding=None, vlan=None,
Line 46:                   **opts):


Line 116:         self.ip = ipconfig
Line 117:         self.mtu = mtu
Line 118:         self.state = state
Line 119:         for port in ports:
Line 120:             port.setMaster(self)
port.master = self
Line 121:         self.ports = ports
Line 122:         self.forwardDelay = forwardDelay
Line 123:         self.stp = stp
Line 124:         self.configurator = configurator


Line 157:         self.ip = ipconfig
Line 158:         self.master = None
Line 159:         if slaves:
Line 160:             for slave in slaves:
Line 161:                 slave.setMaster(self)
slave.master = self
Line 162:             self.slaves = slaves
Line 163:         else:
Line 164:             raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'Missing required '
Line 165:                                      'nics for bonding device.')


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba8958549a301c9faac70a32cbafdf320128c85a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list