diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-02-10 01:20:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-02-10 01:20:13 +0000 |
commit | b6c6084ce3b29d5aaa5220a3d9becf8f33d544e1 (patch) | |
tree | 5ba74bd0a6117132cdf7b1da9363f40b50ae98d9 | |
parent | d0cdd28c47e7e9e54d9050a6f64d9a2fab08c680 (diff) | |
parent | 5e3a3a193bb55cd9f0622b0adb76ffa54b98b906 (diff) | |
download | python-novaclient-b6c6084ce3b29d5aaa5220a3d9becf8f33d544e1.tar.gz |
Merge "Fix Serivce class AttributeError"
-rw-r--r-- | novaclient/tests/v1_1/test_services.py | 1 | ||||
-rw-r--r-- | novaclient/v1_1/services.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/novaclient/tests/v1_1/test_services.py b/novaclient/tests/v1_1/test_services.py index 36f82e40..d66a1110 100644 --- a/novaclient/tests/v1_1/test_services.py +++ b/novaclient/tests/v1_1/test_services.py @@ -37,6 +37,7 @@ class ServicesTest(utils.TestCase): self.assertIsInstance(s, self._get_service_type()) self.assertEqual(s.binary, 'nova-compute') self.assertEqual(s.host, 'host1') + self.assertTrue(str(s).startswith('<Service: ')) def test_list_services_with_hostname(self): svs = self.cs.services.list(host='host2') diff --git a/novaclient/v1_1/services.py b/novaclient/v1_1/services.py index 45dafbc5..f2588eaa 100644 --- a/novaclient/v1_1/services.py +++ b/novaclient/v1_1/services.py @@ -21,7 +21,7 @@ from novaclient import base class Service(base.Resource): def __repr__(self): - return "<Service: %s>" % self.service + return "<Service: %s>" % self.binary def _add_details(self, info): dico = 'resource' in info and info['resource'] or info |