WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] XenAPI: Implement {get, set}_auto_power_o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] XenAPI: Implement {get, set}_auto_power_on
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:00:53 -0700
Delivery-date: Tue, 07 Apr 2009 23:03:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238496487 -3600
# Node ID 2269d8704139ec256e8732b23b56debd09eb9430
# Parent  cd6b3af1919103f48a173d7250faea0bad2a8d60
XenAPI: Implement {get,set}_auto_power_on

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/README.XendConfig          |    1 +
 tools/python/xen/xend/XendAPI.py        |    8 +++++++-
 tools/python/xen/xend/XendConfig.py     |    2 ++
 tools/python/xen/xend/XendDomainInfo.py |    1 +
 4 files changed, 11 insertions(+), 1 deletion(-)

diff -r cd6b3af19191 -r 2269d8704139 tools/python/README.XendConfig
--- a/tools/python/README.XendConfig    Tue Mar 31 11:47:20 2009 +0100
+++ b/tools/python/README.XendConfig    Tue Mar 31 11:48:07 2009 +0100
@@ -25,6 +25,7 @@ name_description
 name_description
 user_version
 is_a_template
+auto_power_on
 resident_on
 memory_static_min               memory
 memory_static_max               maxmem
diff -r cd6b3af19191 -r 2269d8704139 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue Mar 31 11:47:20 2009 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Tue Mar 31 11:48:07 2009 +0100
@@ -1352,6 +1352,9 @@ class XendAPI(object):
     def VM_get_is_a_template(self, session, ref):
         return self.VM_get('is_a_template', session, ref)
     
+    def VM_get_auto_power_on(self, session, vm_ref):
+        return self.VM_get('auto_power_on', session, vm_ref)
+    
     def VM_get_memory_dynamic_max(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_success(dom.get_memory_dynamic_max())
@@ -1440,6 +1443,9 @@ class XendAPI(object):
     def VM_set_is_a_template(self, session, vm_ref, is_template):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_todo()
+    
+    def VM_set_auto_power_on(self, session, vm_ref, val):
+        return self.VM_set('auto_power_on', session, vm_ref, val)
     
     def VM_set_memory_dynamic_max(self, session, vm_ref, mem):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
@@ -1682,7 +1688,7 @@ class XendAPI(object):
             'name_description': xeninfo.getName(),
             'user_version': 1,
             'is_a_template': xeninfo.info['is_a_template'],
-            'auto_power_on': False,
+            'auto_power_on': xeninfo.info['auto_power_on'],
             'resident_on': XendNode.instance().uuid,
             'memory_static_min': xeninfo.get_memory_static_min(),
             'memory_static_max': xeninfo.get_memory_static_max(),
diff -r cd6b3af19191 -r 2269d8704139 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Mar 31 11:47:20 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Tue Mar 31 11:48:07 2009 +0100
@@ -187,6 +187,7 @@ XENAPI_CFG_TYPES = {
     'name_description': str,
     'user_version': str,
     'is_a_template': bool0,
+    'auto_power_on': bool0,
     'resident_on': str,
     'memory_static_min': int,  # note these are stored in bytes, not KB!
     'memory_static_max': int,
@@ -361,6 +362,7 @@ class XendConfig(dict):
             'actions_after_crash': 'restart',
             'actions_after_suspend': '',
             'is_a_template': False,
+            'auto_power_on': False,
             'is_control_domain': False,
             'features': '',
             'PV_bootloader': '',
diff -r cd6b3af19191 -r 2269d8704139 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 31 11:47:20 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 31 11:48:07 2009 +0100
@@ -144,6 +144,7 @@ def recreate(info, priv):
     xeninfo = XendConfig.XendConfig(dominfo = info)
     xeninfo['is_control_domain'] = priv
     xeninfo['is_a_template'] = False
+    xeninfo['auto_power_on'] = False
     domid = xeninfo['domid']
     uuid1 = uuid.fromString(xeninfo['uuid'])
     needs_reinitialising = False

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] XenAPI: Implement {get, set}_auto_power_on, Xen patchbot-unstable <=