ia64/xen-unstable

changeset 14250:43b0be37736b

VM.actions_after_[shutdown|reboot|suspend|crash] were not set properly
in VM record returned via Xen API.
This patch fixes typos in key name for these fields.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author kfraser@localhost.localdomain
date Mon Mar 05 13:18:28 2007 +0000 (2007-03-05)
parents 7089c2adef1e
children 1359e04a8fb3
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Mar 05 11:54:55 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Mar 05 13:18:28 2007 +0000
     1.3 @@ -2090,26 +2090,26 @@ class XendDomainInfo:
     1.4          return self.info.get('tools_version', {})
     1.5      
     1.6      def get_on_shutdown(self):
     1.7 -        after_shutdown = self.info.get('action_after_shutdown')
     1.8 +        after_shutdown = self.info.get('actions_after_shutdown')
     1.9          if not after_shutdown or after_shutdown not in XEN_API_ON_NORMAL_EXIT:
    1.10              return XEN_API_ON_NORMAL_EXIT[-1]
    1.11          return after_shutdown
    1.12  
    1.13      def get_on_reboot(self):
    1.14 -        after_reboot = self.info.get('action_after_reboot')
    1.15 +        after_reboot = self.info.get('actions_after_reboot')
    1.16          if not after_reboot or after_reboot not in XEN_API_ON_NORMAL_EXIT:
    1.17              return XEN_API_ON_NORMAL_EXIT[-1]
    1.18          return after_reboot
    1.19  
    1.20      def get_on_suspend(self):
    1.21          # TODO: not supported        
    1.22 -        after_suspend = self.info.get('action_after_suspend') 
    1.23 +        after_suspend = self.info.get('actions_after_suspend') 
    1.24          if not after_suspend or after_suspend not in XEN_API_ON_NORMAL_EXIT:
    1.25              return XEN_API_ON_NORMAL_EXIT[-1]
    1.26          return after_suspend        
    1.27  
    1.28      def get_on_crash(self):
    1.29 -        after_crash = self.info.get('action_after_crash')
    1.30 +        after_crash = self.info.get('actions_after_crash')
    1.31          if not after_crash or after_crash not in XEN_API_ON_CRASH_BEHAVIOUR:
    1.32              return XEN_API_ON_CRASH_BEHAVIOUR[0]
    1.33          return after_crash