direct-io.hg

changeset 12467:9c9dbc5df557

Add to select keyboard layout

Signed-off-by: Takanori Kasai <Kasai.Takanori@jp.fujitsu.com>
author kasai.takanori@jp.fujitsu.com
date Thu Nov 16 13:13:55 2006 +0000 (2006-11-16)
parents c677f4e75608
children fc25a6eadccd
files tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendConfig.py tools/python/xen/xend/image.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Thu Nov 16 11:11:17 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Thu Nov 16 13:13:55 2006 +0000
     1.3 @@ -591,6 +591,7 @@ class XendAPI:
     1.4                    'platform_localtime',
     1.5                    'platform_clock_offset',
     1.6                    'platform_enable_audio',
     1.7 +                  'platform_keymap',
     1.8                    'builder',
     1.9                    'boot_method',
    1.10                    'kernel_kernel',
    1.11 @@ -638,6 +639,7 @@ class XendAPI:
    1.12          'platform_localtime',
    1.13          'platform_clock_offset',
    1.14          'platform_enable_audio',
    1.15 +        'platform_keymap',
    1.16          'builder',
    1.17          'boot_method',
    1.18          'kernel_kernel',
    1.19 @@ -784,6 +786,10 @@ class XendAPI:
    1.20          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.21          return xen_api_todo()
    1.22      
    1.23 +    def vm_get_platform_keymap(self, session, vm_ref):
    1.24 +        dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.25 +        return xen_api_todo()
    1.26 +    
    1.27      def vm_get_builder(self, session, vm_ref):
    1.28          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.29          return xen_api_todo()
    1.30 @@ -981,6 +987,7 @@ class XendAPI:
    1.31              'platform_localtime': xeninfo.get_platform_localtime(),
    1.32              'platform_clock_offset': xeninfo.get_platform_clock_offset(),
    1.33              'platform_enable_audio': xeninfo.get_platform_enable_audio(),
    1.34 +            'platform_keymap': xeninfo.get_platform_keymap(),
    1.35              'builder': xeninfo.get_builder(),
    1.36              'boot_method': xeninfo.get_boot_method(),
    1.37              'kernel_kernel': xeninfo.get_kernel_image(),
     2.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Nov 16 11:11:17 2006 +0000
     2.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Nov 16 13:13:55 2006 +0000
     2.3 @@ -60,6 +60,7 @@ XENAPI_HVM_CFG = {
     2.4      'platform_serial' : 'serial',
     2.5      'platform_localtime': 'localtime',
     2.6      'platform_enable_audio': 'soundhw',
     2.7 +    'platform_keymap' : 'keymap',
     2.8  }    
     2.9  
    2.10  XENAPI_UNSUPPORTED_IN_LEGACY_CFG = [
    2.11 @@ -82,6 +83,7 @@ XENAPI_UNSUPPORTED_IN_LEGACY_CFG = [
    2.12      'platform_localtime',
    2.13      'platform_clock_offset',
    2.14      'platform_enable_audio',
    2.15 +    'platform_keymap',
    2.16      'builder',
    2.17      'grub_cmdline',
    2.18      'pci_bus',
     3.1 --- a/tools/python/xen/xend/image.py	Thu Nov 16 11:11:17 2006 +0000
     3.2 +++ b/tools/python/xen/xend/image.py	Thu Nov 16 13:13:55 2006 +0000
     3.3 @@ -309,13 +309,14 @@ class HVMImageHandler(ImageHandler):
     3.4      def parseDeviceModelArgs(self, imageConfig, deviceConfig):
     3.5          dmargs = [ 'boot', 'fda', 'fdb', 'soundhw',
     3.6                     'localtime', 'serial', 'stdvga', 'isa', 'vcpus',
     3.7 -                   'acpi', 'usb', 'usbdevice']
     3.8 +                   'acpi', 'usb', 'usbdevice', 'keymap' ]
     3.9          ret = []
    3.10          for a in dmargs:
    3.11              v = sxp.child_value(imageConfig, a)
    3.12  
    3.13              # python doesn't allow '-' in variable names
    3.14              if a == 'stdvga': a = 'std-vga'
    3.15 +            if a == 'keymap': a = 'k'
    3.16  
    3.17              # Handle booleans gracefully
    3.18              if a in ['localtime', 'std-vga', 'isa', 'usb', 'acpi']:
    3.19 @@ -385,8 +386,6 @@ class HVMImageHandler(ImageHandler):
    3.20              else:
    3.21                  ret += ['-vnc', '%d' % vncdisplay]
    3.22  
    3.23 -            ret += ['-k', 'en-us']
    3.24 -
    3.25              vnclisten = sxp.child_value(config, 'vnclisten')
    3.26              if not(vnclisten):
    3.27                  vnclisten = (xen.xend.XendRoot.instance().
     4.1 --- a/tools/python/xen/xm/create.py	Thu Nov 16 11:11:17 2006 +0000
     4.2 +++ b/tools/python/xen/xm/create.py	Thu Nov 16 13:13:55 2006 +0000
     4.3 @@ -387,6 +387,10 @@ gopts.var('localtime', val='no|yes',
     4.4            fn=set_bool, default=0,
     4.5            use="Is RTC set to localtime?")
     4.6  
     4.7 +gopts.var('keymap', val='FILE',
     4.8 +          fn=set_value, default='',
     4.9 +          use="Set keyboard layout used")
    4.10 +
    4.11  gopts.var('usb', val='no|yes',
    4.12            fn=set_bool, default=0,
    4.13            use="Emulate USB devices?")
    4.14 @@ -660,7 +664,7 @@ def configure_hvm(config_image, vals):
    4.15               'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
    4.16               'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
    4.17               'sdl', 'display', 'xauthority',
    4.18 -             'acpi', 'usb', 'usbdevice' ]
    4.19 +             'acpi', 'usb', 'usbdevice', 'keymap' ]
    4.20      for a in args:
    4.21          if (vals.__dict__[a]):
    4.22              config_image.append([a, vals.__dict__[a]])