ia64/xen-unstable

changeset 12639:1fce8221d473

Fix casing of various functions in XendAPI class.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author jfehlig@jfehlig2.provo.novell.com
date Tue Nov 14 15:36:41 2006 -0700 (2006-11-14)
parents a4ba47e9bc1f
children d30be569532d
files tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Tue Nov 28 16:41:45 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Tue Nov 14 15:36:41 2006 -0700
     1.3 @@ -327,7 +327,7 @@ class XendAPI:
     1.4  
     1.5              # wrap validators around readable class attributes
     1.6              for attr_name in ro_attrs + rw_attrs + self.Base_attr_ro:
     1.7 -                getter_name = '%s_get_%s' % (cls.lower(), attr_name.lower())
     1.8 +                getter_name = '%s_get_%s' % (cls.lower(), attr_name)
     1.9                  try:
    1.10                      getter = getattr(XendAPI, getter_name)
    1.11                      for validator in validators:
    1.12 @@ -340,7 +340,7 @@ class XendAPI:
    1.13  
    1.14              # wrap validators around writable class attrributes
    1.15              for attr_name in rw_attrs + self.Base_attr_rw:
    1.16 -                setter_name = '%s_set_%s' % (cls.lower(), attr_name.lower())
    1.17 +                setter_name = '%s_set_%s' % (cls.lower(), attr_name)
    1.18                  try:
    1.19                      setter = getattr(XendAPI, setter_name)
    1.20                      for validator in validators:
    1.21 @@ -353,7 +353,7 @@ class XendAPI:
    1.22  
    1.23              # wrap validators around methods
    1.24              for method_name in methods + self.Base_methods:
    1.25 -                method_full_name = '%s_%s' % (cls.lower(),method_name.lower())
    1.26 +                method_full_name = '%s_%s' % (cls.lower(), method_name)
    1.27                  try:
    1.28                      method = getattr(XendAPI, method_full_name)
    1.29                      for validator in validators:
    1.30 @@ -366,7 +366,7 @@ class XendAPI:
    1.31  
    1.32              # wrap validators around class functions
    1.33              for func_name in funcs + self.Base_funcs:
    1.34 -                func_full_name = '%s_%s' % (cls.lower(), func_name.lower())
    1.35 +                func_full_name = '%s_%s' % (cls.lower(), func_name)
    1.36                  try:
    1.37                      method = getattr(XendAPI, func_full_name)
    1.38                      method = session_required(method)
    1.39 @@ -411,7 +411,7 @@ class XendAPI:
    1.40          record = {'this_host': XendNode.instance().uuid,
    1.41                    'this_user': auth_manager().get_user(session)}
    1.42          return xen_api_success(record)
    1.43 -    def session_to_xml(self, session):
    1.44 +    def session_to_XML(self, session):
    1.45          return xen_api_todo()
    1.46  
    1.47      # attributes (ro)
    1.48 @@ -536,7 +536,7 @@ class XendAPI:
    1.49                    'features': node.get_host_cpu_features(host_cpu_ref),
    1.50                    'utilisation': node.get_host_cpu_load(host_cpu_ref)}
    1.51          return xen_api_success(record)
    1.52 -    def host_cpu_to_xml(self, session, host_cpu_ref):
    1.53 +    def host_cpu_to_XML(self, session, host_cpu_ref):
    1.54          return xen_api_todo()
    1.55  
    1.56      # class methods
    1.57 @@ -586,7 +586,7 @@ class XendAPI:
    1.58                    'VCPUs_policy',
    1.59                    'VCPUs_params',
    1.60                    'VCPUs_features_force_on',
    1.61 -                  'VCPUS_features_force_off',
    1.62 +                  'VCPUs_features_force_off',
    1.63                    'actions_after_shutdown',
    1.64                    'actions_after_reboot',
    1.65                    'actions_after_suspend',
    1.66 @@ -848,19 +848,19 @@ class XendAPI:
    1.67          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.68          return xen_api_success_void()
    1.69      
    1.70 -    def vm_set_vcpus_policy(self, session, vm_ref):
    1.71 +    def vm_set_VCPUs_policy(self, session, vm_ref):
    1.72          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.73          return xen_api_success_void()
    1.74      
    1.75 -    def vm_set_vcpus_params(self, session, vm_ref):
    1.76 +    def vm_set_VCPUs_params(self, session, vm_ref):
    1.77          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.78          return xen_api_success_void()
    1.79      
    1.80 -    def vm_set_vcpus_features_force_on(self, session, vm_ref):
    1.81 +    def vm_set_VCPUs_features_force_on(self, session, vm_ref):
    1.82          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.83          return xen_api_success_void()
    1.84      
    1.85 -    def vm_set_vcpus_features_force_off(self, session, vm_ref):
    1.86 +    def vm_set_VCPUs_features_force_off(self, session, vm_ref):
    1.87          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.88          return xen_api_success_void()
    1.89      
    1.90 @@ -950,7 +950,7 @@ class XendAPI:
    1.91          return xen_api_success(domuuid)
    1.92      
    1.93      # object methods
    1.94 -    def vm_to_xml(self, session, vm_ref):
    1.95 +    def vm_to_XML(self, session, vm_ref):
    1.96          return xen_api_todo()
    1.97      
    1.98      def vm_get_record(self, session, vm_ref):
    1.99 @@ -1092,11 +1092,11 @@ class XendAPI:
   1.100          return xen_api_success(vbd_ref)
   1.101  
   1.102      # attributes (rw)
   1.103 -    def vbd_get_vm(self, session, vbd_ref):
   1.104 +    def vbd_get_VM(self, session, vbd_ref):
   1.105          xendom = XendDomain.instance()
   1.106          return xen_api_success(xendom.get_dev_property('vbd', vbd_ref, 'VM'))
   1.107      
   1.108 -    def vbd_get_vdi(self, session, vbd_ref):
   1.109 +    def vbd_get_VDI(self, session, vbd_ref):
   1.110          return xen_api_todo()
   1.111      
   1.112      def vbd_get_device(self, session, vbd_ref):
   1.113 @@ -1218,7 +1218,7 @@ class XendAPI:
   1.114          image = sr.xen_api_get_by_uuid(vdi_ref)
   1.115          return xen_api_success(image.name_description)
   1.116  
   1.117 -    def vdi_get_sr(self, session, vdi_ref):
   1.118 +    def vdi_get_SR(self, session, vdi_ref):
   1.119          sr = XendNode.instance().get_sr()
   1.120          return xen_api_success(sr.uuid)
   1.121  
   1.122 @@ -1249,7 +1249,7 @@ class XendAPI:
   1.123          image.name_description = value
   1.124          return xen_api_success_void()
   1.125  
   1.126 -    def vdi_set_sr(self, session, vdi_ref, value):
   1.127 +    def vdi_set_SR(self, session, vdi_ref, value):
   1.128          return xen_api_error(XEND_ERROR_UNSUPPORTED)
   1.129  
   1.130      def vdi_set_virtual_size(self, session, vdi_ref, value):
   1.131 @@ -1269,7 +1269,7 @@ class XendAPI:
   1.132          sr.destroy_image(vdi_ref)
   1.133          return xen_api_success_void()
   1.134  
   1.135 -    def vdi_to_xml(self, session, vdi_ref):
   1.136 +    def vdi_to_XML(self, session, vdi_ref):
   1.137          return xen_api_todo()
   1.138      
   1.139      def vdi_get_record(self, session, vdi_ref):
   1.140 @@ -1451,7 +1451,7 @@ class XendAPI:
   1.141      def sr_destroy(self, session, sr_ref):
   1.142          return xen_api_error(XEND_ERROR_UNSUPPORTED)
   1.143      
   1.144 -    def sr_to_xml(self, session, sr_ref):
   1.145 +    def sr_to_XML(self, session, sr_ref):
   1.146          return xen_api_todo()
   1.147      
   1.148      def sr_get_record(self, session, sr_ref):
   1.149 @@ -1469,7 +1469,7 @@ class XendAPI:
   1.150              })
   1.151  
   1.152      # Attribute acceess
   1.153 -    def sr_get_vdis(self, session, sr_ref):
   1.154 +    def sr_get_VDIs(self, session, sr_ref):
   1.155          sr = XendNode.instance().get_sr()
   1.156          return xen_api_success(sr.list_images())
   1.157