Merge "Rename compute.service.zone to availability_zone"

This commit is contained in:
Zuul 2019-02-22 18:25:44 +00:00 committed by Gerrit Code Review
commit b9ab0ae5c0
3 changed files with 9 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class Service(resource.Resource):
#: Host where service runs
host = resource.Body('host')
#: The availability zone of service
zone = resource.Body("zone")
availability_zone = resource.Body("zone")
def _action(self, session, action, body):
url = utils.urljoin(Service.base_path, action)

View File

@ -51,7 +51,7 @@ class TestService(base.TestCase):
self.assertEqual(EXAMPLE['binary'], sot.binary)
self.assertEqual(EXAMPLE['status'], sot.status)
self.assertEqual(EXAMPLE['state'], sot.state)
self.assertEqual(EXAMPLE['zone'], sot.zone)
self.assertEqual(EXAMPLE['zone'], sot.availability_zone)
self.assertEqual(EXAMPLE['id'], sot.id)
def test_force_down(self):

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
The ``zone`` attribute on compute ``Service`` objects
has been renamed to ``availability_zone`` to match all
of the other resources, and also to better integrate
with the ``Resource.location`` attribute.