Skip to content

Commit

Permalink
Merge "Remove compute_node field from service_get_by_compute_host"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 3, 2015
2 parents b8e2f53 + d04ebf6 commit 83b64ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion nova/db/sqlalchemy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ def service_get_all_by_host(context, host):
def service_get_by_compute_host(context, host, use_slave=False):
result = model_query(context, models.Service, read_deleted="no",
use_slave=use_slave).\
options(joinedload('compute_node')).\
filter_by(host=host).\
filter_by(topic=CONF.compute_topic).\
first()
Expand Down
3 changes: 1 addition & 2 deletions nova/tests/unit/db/test_db_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2840,8 +2840,7 @@ def test_service_get_by_compute_host(self):
services = [self._create_service(vals) for vals in values]

real_service = db.service_get_by_compute_host(self.ctxt, 'host1')
self._assertEqualObjects(services[0], real_service,
ignored_keys=['compute_node'])
self._assertEqualObjects(services[0], real_service)

self.assertRaises(exception.ComputeHostNotFound,
db.service_get_by_compute_host,
Expand Down

0 comments on commit 83b64ce

Please sign in to comment.