Commit 45cb3878 authored by Zuul's avatar Zuul Committed by Gerrit Code Review

Merge "Deprecate region enabled parameter"

parents abeacaef b7db5668
......@@ -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