diff options
| author | Alex Meade <alex.meade@rackspace.com> | 2011-06-07 09:56:51 -0400 |
|---|---|---|
| committer | Alex Meade <alex.meade@rackspace.com> | 2011-06-07 09:56:51 -0400 |
| commit | f0c4767dc14f950f7d18cc02e16e4d310774435d (patch) | |
| tree | 92d2bba74207dc96662e8f5ebdb9bfb5034eea2e | |
| parent | 1eb789625d15b319f5bc070041a42c03e6c6b08c (diff) | |
Fixed type causing pylint "exception is not callable"
Added param to fake_instance_create, fake objects should appear like the real object. pylint "No value passed for parameter 'values' in function call"
| -rw-r--r-- | nova/tests/test_vmwareapi.py | 2 | ||||
| -rw-r--r-- | nova/tests/vmwareapi/db_fakes.py | 2 | ||||
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/test_vmwareapi.py b/nova/tests/test_vmwareapi.py index e5ebd1600..eddf01e9f 100644 --- a/nova/tests/test_vmwareapi.py +++ b/nova/tests/test_vmwareapi.py @@ -69,7 +69,7 @@ class VMWareAPIVMTestCase(test.TestCase): 'instance_type': 'm1.large',
'mac_address': 'aa:bb:cc:dd:ee:ff',
}
- self.instance = db.instance_create(values)
+ self.instance = db.instance_create(None, values)
def _create_vm(self):
"""Create and spawn the VM."""
diff --git a/nova/tests/vmwareapi/db_fakes.py b/nova/tests/vmwareapi/db_fakes.py index 764de42d8..d4eb87daf 100644 --- a/nova/tests/vmwareapi/db_fakes.py +++ b/nova/tests/vmwareapi/db_fakes.py @@ -52,7 +52,7 @@ def stub_out_db_instance_api(stubs): else:
raise NotImplementedError()
- def fake_instance_create(values):
+ def fake_instance_create(context, values):
"""Stubs out the db.instance_create method."""
type_data = INSTANCE_TYPES[values['instance_type']]
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 32dae97c2..c6d2b0936 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -101,7 +101,7 @@ class VMOps(object): if not vm_ref: vm_ref = VMHelper.lookup(self._session, instance.name) if vm_ref is None: - raise exception(_('Attempted to power on non-existent instance' + raise Exception(_('Attempted to power on non-existent instance' ' bad instance id %s') % instance.id) LOG.debug(_("Starting instance %s"), instance.name) self._session.call_xenapi('VM.start', vm_ref, False, False) |
