summaryrefslogtreecommitdiff
path: root/nova/tests/unit/objects
diff options
context:
space:
mode:
authorBalazs Gibizer <balazs.gibizer@ericsson.com>2017-07-06 12:59:04 +0200
committerBalazs Gibizer <balazs.gibizer@ericsson.com>2017-07-25 17:36:41 +0200
commit7c0132c5f4e12818cdc246760fc97e6667fc3aee (patch)
treec2e68bb857410ac37cd11642b906b3492f8b857e /nova/tests/unit/objects
parentf468dae28a0a7bb547ca67dba667360bd1777c30 (diff)
downloadnova-7c0132c5f4e12818cdc246760fc97e6667fc3aee.tar.gz
Use enum value instead of string service name
In the nova notification code path the nova service / binary names are hardcoded. There is a possible confusion as the REST API uses 'nova-osapi_compute' while the notifications use 'nova-api' as the name of the nova compute service binary. To avoid possible mixing of the names a new enum is introduced in the notification code path with the valid values form notification perspective. Change-Id: Ia85a8b6c34a3efaf3ef509aab316294b9c0c2fd1 Closes-Bug: #1696152
Diffstat (limited to 'nova/tests/unit/objects')
-rw-r--r--nova/tests/unit/objects/test_instance.py2
-rw-r--r--nova/tests/unit/objects/test_service.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/unit/objects/test_instance.py b/nova/tests/unit/objects/test_instance.py
index 4992f309c4..778b614257 100644
--- a/nova/tests/unit/objects/test_instance.py
+++ b/nova/tests/unit/objects/test_instance.py
@@ -171,7 +171,7 @@ class _TestInstanceObject(object):
fake_keypairlist.obj_to_primitive())
fake_service = {'created_at': None, 'updated_at': None,
'deleted_at': None, 'deleted': False, 'id': 123,
- 'host': 'fake-host', 'binary': 'nova-fake',
+ 'host': 'fake-host', 'binary': 'nova-compute',
'topic': 'fake-service-topic', 'report_count': 1,
'forced_down': False, 'disabled': False,
'disabled_reason': None, 'last_seen_up': None,
diff --git a/nova/tests/unit/objects/test_service.py b/nova/tests/unit/objects/test_service.py
index 7a4a5e9253..55198ae19d 100644
--- a/nova/tests/unit/objects/test_service.py
+++ b/nova/tests/unit/objects/test_service.py
@@ -42,7 +42,7 @@ def _fake_service(**kwargs):
'id': 123,
'uuid': uuidsentinel.service,
'host': 'fake-host',
- 'binary': 'nova-fake',
+ 'binary': 'nova-compute',
'topic': 'fake-service-topic',
'report_count': 1,
'forced_down': False,