Start domid's at 1, not 0, to avoid any confusion with dom0.

This commit is contained in:
Ewan Mellor
2011-08-29 00:41:14 +05:30
parent 17c0a1aad9
commit c35086ca2d
2 changed files with 3 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ class FakeSessionForVMTests(fake.SessionBase):
vm['power_state'] = 'Running'
vm['is_a_template'] = False
vm['is_control_domain'] = False
vm['domid'] = random.randrange(0, 1 << 16)
vm['domid'] = random.randrange(1, 1 << 16)
def VM_snapshot(self, session_ref, vm_ref, label):
status = "Running"
@@ -293,7 +293,7 @@ class FakeSessionForMigrationTests(fake.SessionBase):
vm['power_state'] = 'Running'
vm['is_a_template'] = False
vm['is_control_domain'] = False
vm['domid'] = random.randrange(0, 1 << 16)
vm['domid'] = random.randrange(1, 1 << 16)
def stub_out_migration_methods(stubs):

View File

@@ -104,7 +104,7 @@ def create_network(name_label, bridge):
def create_vm(name_label, status,
is_a_template=False, is_control_domain=False):
domid = status == 'Running' and random.randrange(0, 1 << 16) or -1
domid = status == 'Running' and random.randrange(1, 1 << 16) or -1
return _create_object('VM',
{'name_label': name_label,
'domid': domid,