Skip to content

Commit

Permalink
Merge "Change service id to compute for compute/api.py"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 27, 2013
2 parents 6e94b42 + 2c89a8b commit ab5a99b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nova/compute/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

LOG = logging.getLogger(__name__)

get_notifier = functools.partial(notifier.get_notifier, service='aggregate')
get_notifier = functools.partial(notifier.get_notifier, service='compute')
wrap_exception = functools.partial(exception.wrap_exception,
get_notifier=get_notifier)

Expand Down
4 changes: 4 additions & 0 deletions nova/tests/compute/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -8338,9 +8338,13 @@ def test_add_host_to_aggregate_raise_not_found(self):
# Ensure ComputeHostNotFound is raised when adding invalid host.
aggr = self.api.create_aggregate(self.context, 'fake_aggregate',
'fake_zone')
fake_notifier.NOTIFICATIONS = []
self.assertRaises(exception.ComputeHostNotFound,
self.api.add_host_to_aggregate,
self.context, aggr['id'], 'invalid_host')
self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)
self.assertEqual(fake_notifier.NOTIFICATIONS[1].publisher_id,
'compute.fake-mini')

def test_remove_host_from_aggregate_active(self):
# Ensure we can remove a host from an aggregate.
Expand Down

0 comments on commit ab5a99b

Please sign in to comment.