xen/xend_disk_decorate_rm.patch

42 lines
2.2 KiB
Diff
Raw Normal View History

diff -ru xen-3.0.4-testing-orig/tools/python/xen/xend/server/blkif.py xen-3.0.4-testing/tools/python/xen/xend/server/blkif.py
--- xen-3.0.4-testing-orig/tools/python/xen/xend/server/blkif.py 2007-02-16 11:16:04.000000000 -0700
+++ xen-3.0.4-testing/tools/python/xen/xend/server/blkif.py 2007-02-16 11:22:25.000000000 -0700
@@ -120,10 +120,10 @@
'uuid')
dev, typ, params, mode, uuid = devinfo
+ dev_type = self.readFrontend(devid, 'device-type')
+ if dev_type:
+ config['type'] = dev_type
if dev:
- dev_type = self.readFrontend(devid, 'device-type')
- if dev_type:
- dev += ':' + dev_type
config['dev'] = dev
if typ and params:
config['uname'] = typ +':' + params
diff -ru xen-3.0.4-testing-orig/tools/python/xen/xend/XendConfig.py xen-3.0.4-testing/tools/python/xen/xend/XendConfig.py
--- xen-3.0.4-testing-orig/tools/python/xen/xend/XendConfig.py 2007-02-16 11:16:06.000000000 -0700
+++ xen-3.0.4-testing/tools/python/xen/xend/XendConfig.py 2007-02-16 11:25:03.000000000 -0700
@@ -1036,12 +1036,14 @@
target['vif_refs'].append(dev_uuid)
elif dev_type in ('vbd', 'tap'):
- if dev_type == 'vbd':
- dev_info['uname'] = cfg_xenapi.get('image', '')
- dev_info['dev'] = '%s:disk' % cfg_xenapi.get('device')
- elif dev_type == 'tap':
- dev_info['uname'] = 'tap:qcow:%s' % cfg_xenapi.get('image')
- dev_info['dev'] = '%s:disk' % cfg_xenapi.get('device')
+ dev_info['type'] = cfg_xenapi.get('type', 'Disk')
+ if dev_info['type'] == 'CD':
+ dev_info['dev'] = '%s:%s' % (cfg_xenapi.get('device'),
+ 'cdrom')
+ else:
+ dev_info['dev'] = cfg_xenapi.get('device')
+
+ dev_info['uname'] = cfg_xenapi.get('image', '')
dev_info['driver'] = cfg_xenapi.get('driver')
dev_info['VDI'] = cfg_xenapi.get('VDI', '')