ia64/xen-unstable

changeset 15578:c7b68954963b

[xend] Fix xm trigger command for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Wed Jul 11 10:54:06 2007 +0100 (2007-07-11)
parents 2099e4af5aed
children ac814633799b
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Wed Jul 11 10:53:32 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed Jul 11 10:54:06 2007 +0100
     1.3 @@ -1541,6 +1541,10 @@ class XendDomain:
     1.4          dominfo = self.domain_lookup_nr(domid)
     1.5          if not dominfo:
     1.6              raise XendInvalidDomain(str(domid))
     1.7 +        if dominfo._stateGet() not in (DOM_STATE_RUNNING, DOM_STATE_PAUSED):
     1.8 +            raise VMBadState("Domain '%s' is not started" % domid,
     1.9 +                             POWER_STATE_NAMES[DOM_STATE_RUNNING],
    1.10 +                             POWER_STATE_NAMES[dominfo._stateGet()])
    1.11          if trigger_name.lower() in TRIGGER_TYPE: 
    1.12              trigger = TRIGGER_TYPE[trigger_name.lower()]
    1.13          else: