Start domid's at 1, not 0, to avoid any confusion with dom0.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user