summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-06-04 08:07:24 -0700
committerDan Smith <danms@us.ibm.com>2013-06-04 14:25:38 -0700
commit5d9cb7dd354dc1a1eae9985521c0f4b2ea4d876e (patch)
tree2bc062fca9fe791835d49a2a043015c11923b3e7 /nova/tests
parent820135933168feeb6320a23555ca0ebf5e14fa08 (diff)
downloadnova-5d9cb7dd354dc1a1eae9985521c0f4b2ea4d876e.tar.gz
nova-5d9cb7dd354dc1a1eae9985521c0f4b2ea4d876e.tar.xz
nova-5d9cb7dd354dc1a1eae9985521c0f4b2ea4d876e.zip
Make object actions pass positional arguments
This changes the Object API to also pass positional arguments to remotable methods. Previously, we required only keyword arguments to these methods in order to mirror our current RPC behavior. This is not really necessary and could be confusing. Since there are no actual users of these APIs in the tree right now, we can make this change without needing to bump any versions. Related to blueprint unified-object-model Change-Id: Ifb12843d16500d383d4e9c607121d5584400f247
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/objects/test_instance.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/tests/objects/test_instance.py b/nova/tests/objects/test_instance.py
index 8136a4f1c..498767865 100644
--- a/nova/tests/objects/test_instance.py
+++ b/nova/tests/objects/test_instance.py
@@ -101,7 +101,7 @@ class _TestInstanceObject(object):
['metadata', 'system_metadata']).AndReturn(self.fake_instance)
self.mox.ReplayAll()
inst = instance.Instance.get_by_uuid(
- ctxt, uuid='uuid', expected_attrs=['metadata', 'system_metadata'])
+ ctxt, 'uuid', expected_attrs=['metadata', 'system_metadata'])
self.assertTrue(hasattr(inst, '_metadata'))
self.assertTrue(hasattr(inst, '_system_metadata'))
self.assertRemotes()
@@ -117,7 +117,7 @@ class _TestInstanceObject(object):
db.instance_get_by_uuid(ctxt, fake_uuid, ['system_metadata']
).AndReturn(fake_inst2)
self.mox.ReplayAll()
- inst = instance.Instance.get_by_uuid(ctxt, uuid=fake_uuid)
+ inst = instance.Instance.get_by_uuid(ctxt, fake_uuid)
self.assertFalse(hasattr(inst, '_system_metadata'))
sys_meta = inst.system_metadata
self.assertEqual(sys_meta, {'foo': 'bar'})
@@ -135,7 +135,7 @@ class _TestInstanceObject(object):
db.instance_get_by_uuid(ctxt, 'fake-uuid', []).AndReturn(
fake_instance)
self.mox.ReplayAll()
- inst = instance.Instance.get_by_uuid(ctxt, uuid='fake-uuid')
+ inst = instance.Instance.get_by_uuid(ctxt, 'fake-uuid')
self.assertEqual(inst.id, fake_instance['id'])
self.assertEqual(inst.launched_at, fake_instance['launched_at'])
self.assertEqual(str(inst.access_ip_v4),
@@ -153,7 +153,7 @@ class _TestInstanceObject(object):
db.instance_get_by_uuid(ctxt, fake_uuid, []).AndReturn(
dict(self.fake_instance, host='new-host'))
self.mox.ReplayAll()
- inst = instance.Instance.get_by_uuid(ctxt, uuid=fake_uuid)
+ inst = instance.Instance.get_by_uuid(ctxt, fake_uuid)
self.assertEqual(inst.host, 'orig-host')
inst.refresh()
self.assertEqual(inst.host, 'new-host')
@@ -170,7 +170,7 @@ class _TestInstanceObject(object):
ctxt, fake_uuid, {'user_data': 'foo'}).AndReturn(
(fake_inst, dict(fake_inst, host='newhost')))
self.mox.ReplayAll()
- inst = instance.Instance.get_by_uuid(ctxt, uuid=fake_uuid)
+ inst = instance.Instance.get_by_uuid(ctxt, fake_uuid)
inst.user_data = 'foo'
inst.save()
self.assertEqual(inst.host, 'newhost')