diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-03-17 23:55:03 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-03-17 23:55:03 +0000 |
commit | 98321440ec5681052fc4cadfaed5471b01cfd451 (patch) | |
tree | 2781b355ce6569d1341c74dc33f3650369fd2501 /tools/python/scripts | |
parent | 716d0617c936b721deb6fc2212add0acca58af32 (diff) | |
download | xen-98321440ec5681052fc4cadfaed5471b01cfd451.tar.gz xen-98321440ec5681052fc4cadfaed5471b01cfd451.tar.bz2 xen-98321440ec5681052fc4cadfaed5471b01cfd451.zip |
Replace VDI.location with a more generic VDI.other_config map. Remove
VDI.sector_size.
Xend work by Tom Wilkie <tom.wilkie@gmail.com>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/python/scripts')
-rw-r--r-- | tools/python/scripts/test_hvm_create.py | 3 | ||||
-rw-r--r-- | tools/python/scripts/test_vm_create.py | 6 | ||||
-rw-r--r-- | tools/python/scripts/xapi.py | 11 | ||||
-rw-r--r-- | tools/python/scripts/xapi.vdicfg.py | 3 |
4 files changed, 7 insertions, 16 deletions
diff --git a/tools/python/scripts/test_hvm_create.py b/tools/python/scripts/test_hvm_create.py index 7cae70539a..35abfe0396 100644 --- a/tools/python/scripts/test_hvm_create.py +++ b/tools/python/scripts/test_hvm_create.py @@ -39,14 +39,13 @@ vm_cfg = { local_vdi_cfg = { 'name_label': 'gentoo.hvm', 'name_description': '', - 'location': 'file:/root/gentoo.amd64.hvm.img', 'virtual_size': 0, - 'sector_size': 0, 'type': 'system', 'parent': '', 'SR_name': 'Local', 'sharable': False, 'read_only': False, + 'other_config': {'location': 'file:/root/gentoo.amd64.hvm.img'}, } local_vbd_cfg = { diff --git a/tools/python/scripts/test_vm_create.py b/tools/python/scripts/test_vm_create.py index e4d8f3023a..6575f153ea 100644 --- a/tools/python/scripts/test_vm_create.py +++ b/tools/python/scripts/test_vm_create.py @@ -39,8 +39,7 @@ vm_cfg = { vdi_cfg = { 'name_label': 'API_VDI', 'name_description': '', - 'virtual_size': 100 * 1024 * 1024, - 'sector_size': 1024, + 'virtual_size': 100 * 1024 * 1024 * 1024, 'type': 'system', 'parent': '', 'SR_name': 'QCoW', @@ -60,14 +59,13 @@ vbd_cfg = { local_vdi_cfg = { 'name_label': 'gentoo.amd64.img', 'name_description': '', - 'location': 'file:/root/gentoo.amd64.img', 'virtual_size': 0, - 'sector_size': 0, 'type': 'system', 'parent': '', 'SR_name': 'Local', 'sharable': False, 'read_only': False, + 'other_config': {'location': 'file:/root/gentoo.amd64.img'}, } local_vbd_cfg = { diff --git a/tools/python/scripts/xapi.py b/tools/python/scripts/xapi.py index 1e49f86d4c..1a07795212 100644 --- a/tools/python/scripts/xapi.py +++ b/tools/python/scripts/xapi.py @@ -40,8 +40,7 @@ VM_LIST_FORMAT = '%(name_label)-18s %(memory_actual)-5s %(VCPUs_number)-5s'\ ' %(power_state)-10s %(uuid)-36s' SR_LIST_FORMAT = '%(name_label)-18s %(uuid)-36s %(physical_size)-10s' \ '%(type)-10s' -VDI_LIST_FORMAT = '%(name_label)-18s %(uuid)-36s %(virtual_size)-8s '\ - '%(sector_size)-8s' +VDI_LIST_FORMAT = '%(name_label)-18s %(uuid)-36s %(virtual_size)-8s' VBD_LIST_FORMAT = '%(device)-6s %(uuid)-36s %(VDI)-8s' TASK_LIST_FORMAT = '%(name_label)-18s %(uuid)-36s %(status)-8s %(progress)-4s' VIF_LIST_FORMAT = '%(name)-8s %(device)-7s %(uuid)-36s %(MAC)-10s' @@ -96,12 +95,9 @@ OPTIONS = { 'vdi-create': [(('--name-label',), {'help': 'Name for VDI'}), (('--name-description',), {'help': 'Description for VDI'}), - (('--sector-size',), {'type': 'int', - 'help': 'Sector size', - 'default': 0}), (('--virtual-size',), {'type': 'int', 'default': 0, - 'help': 'Size of VDI in sectors'}), + 'help': 'Size of VDI in bytes'}), (('--type',), {'choices': ['system', 'user', 'ephemeral'], 'default': 'system', 'help': 'VDI type'}), @@ -569,8 +565,7 @@ def xapi_vdi_list(args, async = False): if not is_long: print VDI_LIST_FORMAT % {'name_label': 'VDI Label', 'uuid' : 'UUID', - 'virtual_size': 'Bytes', - 'sector_size': 'Sector Size'} + 'virtual_size': 'Bytes'} for vdi in vdis: vdi_struct = execute(server, 'VDI.get_record', (session, vdi)) diff --git a/tools/python/scripts/xapi.vdicfg.py b/tools/python/scripts/xapi.vdicfg.py index 86129bfae9..cb63653550 100644 --- a/tools/python/scripts/xapi.vdicfg.py +++ b/tools/python/scripts/xapi.vdicfg.py @@ -1,7 +1,6 @@ name_label = 'VDI 1' name_description = '' -virtual_size = 10 * 1024 * 1024 -sector_size = 1024 +virtual_size = 10 * 1024 * 1024 * 1024 type = 'system' sharable = False read_only = False |