[ovs-dev] [PATCH 3/4] xenserver: Allow use first class datamodel field for controller IP

Ian Campbell Ian.Campbell at citrix.com
Mon Apr 12 21:19:11 UTC 2010


On Mon, 2010-04-12 at 17:56 +0100, Ben Pfaff wrote:
> 
> > @@ -222,14 +226,15 @@ class VSwitchControllerDialogue(Dialogue):
> >      def SetController(self, ip):
> >          self.hostsInPool = 0
> >          self.hostsUpdated = 0
> > -        Task.Sync(lambda s: self._modifyPoolConfig(s,
> "vSwitchController", ip))
> > +        Task.Sync(lambda s: self._modifyPoolConfig(s, ip or ""))
> 
> I don't know what the 'or ""' is intended to catch. 

If ip == None then it causes us to pass in "" instead. ip can be None
when this routine is called from deleteController() and in this case
setting the controller to "" is correct from xapi's PoV.

I guess I could have propagated the "" out to the caller, don't remember
why I didn't.

Ian.





More information about the dev mailing list