summaryrefslogtreecommitdiff
path: root/nova/tests/unit/objects
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem.os@gmail.com>2017-05-01 11:32:53 -0400
committerMatt Riedemann <mriedem.os@gmail.com>2017-05-04 13:27:54 -0400
commit6e73eb4d0d38f84d44e5d9d97d876d52702e3a78 (patch)
tree7e9c876e62b0d4bb87ef697db950b11dbddbdea2 /nova/tests/unit/objects
parent4ebd05d660ebece06ccb7872310127c46b24cb5d (diff)
downloadnova-6e73eb4d0d38f84d44e5d9d97d876d52702e3a78.tar.gz
objects: add Service.get_by_uuid method
This allows us to lookup a service uniquely per cell. Part of blueprint service-hyper-uuid-in-api Change-Id: I66ed343dd02099b2d4a9e3ff7c496b09c0822ce6
Diffstat (limited to 'nova/tests/unit/objects')
-rw-r--r--nova/tests/unit/objects/test_objects.py2
-rw-r--r--nova/tests/unit/objects/test_service.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/nova/tests/unit/objects/test_objects.py b/nova/tests/unit/objects/test_objects.py
index 757fcffb00..45e9e121ec 100644
--- a/nova/tests/unit/objects/test_objects.py
+++ b/nova/tests/unit/objects/test_objects.py
@@ -1157,7 +1157,7 @@ object_data = {
'SecurityGroupList': '1.0-dc8bbea01ba09a2edb6e5233eae85cbc',
'SecurityGroupRule': '1.1-ae1da17b79970012e8536f88cb3c6b29',
'SecurityGroupRuleList': '1.2-0005c47fcd0fb78dd6d7fd32a1409f5b',
- 'Service': '1.21-4ff88e4cd40f3b3ce923805f29d84ee0',
+ 'Service': '1.22-8a740459ab9bf258a19c8fcb875c2d9a',
'ServiceList': '1.19-5325bce13eebcbf22edc9678285270cc',
'TaskLog': '1.0-78b0534366f29aa3eebb01860fbe18fe',
'TaskLogList': '1.0-cc8cce1af8a283b9d28b55fcd682e777',
diff --git a/nova/tests/unit/objects/test_service.py b/nova/tests/unit/objects/test_service.py
index 6632e5273a..efaf87b30f 100644
--- a/nova/tests/unit/objects/test_service.py
+++ b/nova/tests/unit/objects/test_service.py
@@ -99,6 +99,10 @@ class _TestServiceObject(object):
def test_get_by_id(self):
self._test_query('service_get', 'get_by_id', 123)
+ def test_get_by_uuid(self):
+ self._test_query('service_get_by_uuid', 'get_by_uuid',
+ uuidsentinel.service_uuid)
+
def test_get_by_host_and_topic(self):
self._test_query('service_get_by_host_and_topic',
'get_by_host_and_topic', 'fake-host', 'fake-topic')