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? Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev