Rename compute.service.zone to availability_zone
While zone is less characters, availability_zone is what this is called across the rest of the codebase, and is what the location system looks for. This is an incompatibility to be taken care of pre-1.0 release. Change-Id: I9fc7ac2a32ac20f173554dcde80eb57713a92f7c
This commit is contained in:
parent
5a4ce4567b
commit
2be7e0f6f7
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user