On Sat, Feb 07, 2015 at 06:33:08AM +0000, Jason Kölker wrote: > On Sat, Feb 7, 2015 at 5:34 AM, Ben Pfaff <b...@nicira.com> wrote: > > On Thu, Feb 05, 2015 at 04:32:57AM +0000, Jason Kölker wrote: > >> With XenServer only 1 manager is configured in the pool, which may not > >> be the first manager returned from `get-manager` as it returns in > >> lexicographical order. > >> > >> V2: Fixes vswitchCurrentControllers() to always return a list > >> > >> Signed-off-by: Jason Kölker <ja...@koelker.net> > > > > Thanks for the fix! One comment on this code: > > > >> +def vswitchCurrentControllers(): > >> + controllers = vswitchCfgQuery(['get-manager']) > >> + return [controller.lstrip('ssl:').split(':')[0] > >> + for controller in controllers.split('\n') > >> + if controller] > > > > If I understand the Python Library Reference correctly, lstrip("ssl:") > > will remove all 's', 'l', and ':' characters from the beginning of the > > controller name. That's not exactly the same as removing a fixed string > > "ssl:", and it makes me a bit nervous. Would you mind doing it some > > other way? > > No problem, never even though of the case of it being a domain name > ;(. I'll switch it to using str.replace.
We don't support domain names so far but I don't want to break in the future should we add that. Thanks. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev