Commit b7db5668 authored by Vishakha Agarwal's avatar Vishakha Agarwal

Deprecate region enabled parameter

We don't check for "enabled" in the region
anywhere thus deprecating it from the create()
and update calls of the v3/region.py. We dont
use it in schema [1] as well as [2].

[1] https://github.com/openstack/keystone/blob/master/keystone/catalog/schema.py#L34
[2] https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/sql.py#L33-L49

Change-Id: I0257d5d42916e3b4d008e592d54eeeebec591633
Partial-Bug: #1615076
parent 79352080
......@@ -221,6 +221,8 @@ class CrudTests(object):
self.assertRequestBodyIs(json=self.encode(entity))
def test_create(self, ref=None, req_ref=None):
deprecations = self.useFixture(client_fixtures.Deprecations())
deprecations.expect_deprecations()
ref = ref or self.new_ref()
manager_ref = ref.copy()
manager_ref.pop('id')
......@@ -343,6 +345,8 @@ class CrudTests(object):
self.assertQueryStringIs('')
def test_update(self, ref=None, req_ref=None):
deprecations = self.useFixture(client_fixtures.Deprecations())
deprecations.expect_deprecations()
ref = ref or self.new_ref()
self.stub_entity('PATCH', id=ref['id'], entity=ref)
......
......@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from debtcollector import removals
from keystoneclient import base
......@@ -34,6 +35,11 @@ class RegionManager(base.CrudManager):
collection_key = 'regions'
key = 'region'
@removals.removed_kwarg(
'enabled',
message='The enabled parameter is deprecated.',
version='3.18.0',
removal_version='4.0.0')
def create(self, id=None, description=None, enabled=True,
parent_region=None, **kwargs):
"""Create a region.
......@@ -81,6 +87,11 @@ class RegionManager(base.CrudManager):
return super(RegionManager, self).list(
**kwargs)
@removals.removed_kwarg(
'enabled',
message='The enabled parameter is deprecated.',
version='3.18.0',
removal_version='4.0.0')
def update(self, region, description=None, enabled=None,
parent_region=None, **kwargs):
"""Update a region.
......
---
deprecations:
- |
The region resource in Keystone never support or contain "enabled" property.
Thus the property is deprecated and will be removed in future versions.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment