Since XenServer 5.6, "vswitch_controller" has been a first-class key for
setting the Open vSwitch controller. Prior to that, we stored it in
"other_config". Since we no longer support such old versions, we can
remove references to the "other_config" option.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
if len(pools) > 1:
raise XenAPIPlugin.Failure("MORE_THAN_ONE_POOL_FOR_HOST", [])
pool = session.xenapi.pool.get_record(pools[0])
- try:
- try:
- controller = pool["vswitch_controller"]
- except KeyError:
- # On systems older than XenServer 5.6.0, we needed to store
- # the key in "other_config".
- controller = pool["other_config"]["vSwitchController"]
- except KeyError, e:
- controller = ""
+ controller = pool.get("vswitch_controller", "")
ret_str = ""
currentController = vswitchCurrentController()
if controller == "" and currentController != "":