Redefine units of VDI.virtual_size to be bytes, not sectors.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-02-25 23:45:39 +00:00
1 parent 496ee4e22a
commit 51b6900b84
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ vm_cfg = {
vdi_cfg = {
'name_label': 'API_VDI',
'name_description': '',
'virtual_size': 100 * 1024,
'virtual_size': 100 * 1024 * 1024,
'sector_size': 1024,
'type': 'system',
'parent': '',
+2 -2
View File
@@ -569,7 +569,7 @@ def xapi_vdi_list(args, async = False):
if not is_long:
print VDI_LIST_FORMAT % {'name_label': 'VDI Label',
'uuid' : 'UUID',
'virtual_size': 'Sectors',
'virtual_size': 'Bytes',
'sector_size': 'Sector Size'}
for vdi in vdis:
@@ -628,7 +628,7 @@ def xapi_vdi_create(args, async = False):
sr = srs[0]
cfg['SR'] = sr
size = (cfg['virtual_size'] * cfg['sector_size'])/MB
size = cfg['virtual_size']/MB
print 'Creating VDI of size: %dMB ..' % size,
uuid = execute(server, 'VDI.create', (session, cfg), async = async)
if async:
+1 -1
View File
@@ -1,6 +1,6 @@
name_label = 'VDI 1'
name_description = ''
virtual_size = 10 * 1024
virtual_size = 10 * 1024 * 1024
sector_size = 1024
type = 'system'
sharable = False
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.