[ovs-dev] [PATCH 1/4] xenserver: Do not raise XenAPIPlugin.Failure in xsconsole plugin

Ian Campbell Ian.Campbell at citrix.com
Mon Apr 12 08:55:20 UTC 2010


This series looks ok to me.

On Mon, 2010-04-12 at 07:18 +0100, Justin Pettit wrote:
> Do not raise XenAPIPlugin.Failure, it is not an exception xsconsole will
> handle.
> 
> Based on commit fcc495 from the xs5.7 branch written by Ian Campbell.
> ---
>  ..._lib_xsconsole_plugins-base_XSFeatureVSwitch.py |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
> index 8adb936..74eb212 100644
> --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
> +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
> @@ -233,11 +233,11 @@ class VSwitchControllerDialogue(Dialogue):
>          pools = session.xenapi.pool.get_all()
>          # We assume there is only ever one pool...
>          if len(pools) == 0:
> -            log.error("No pool for host.")
> -            raise XenAPIPlugin.Failure("NO_POOL_FOR_HOST", [])
> +            XSLogFatal(Lang("No pool found for host."))
> +            return
>          if len(pools) > 1:
> -            log.error("More than one pool for host.")
> -            raise XenAPIPlugin.Failure("MORE_THAN_ONE_POOL_FOR_HOST", [])
> +            XSLogFatal(Lang("More than one pool for host."))
> +            return
>          session.xenapi.pool.remove_from_other_config(pools[0], key)
>          if value != None:
>              session.xenapi.pool.add_to_other_config(pools[0], key, value)






More information about the dev mailing list