As PUT updates are the great majority, and PATCH is only used in a handful of places, swap out this name and the behavior so that PUT is the default. Identity v3 and one resource in Image v2 use PATCH for their updates, so they enable it. Change-Id: I3f7ed19f050a0c6477f1b91112ff2dc4e1fc2528 Closes-Bug: 1427479
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from openstack.identity import identity_service
|
|
from openstack import resource
|
|
|
|
|
|
class Domain(resource.Resource):
|
|
resource_key = 'domain'
|
|
resources_key = 'domains'
|
|
base_path = '/domains'
|
|
service = identity_service.IdentityService()
|
|
|
|
# capabilities
|
|
allow_create = True
|
|
allow_retrieve = True
|
|
allow_update = True
|
|
allow_delete = True
|
|
allow_list = True
|
|
patch_update = True
|
|
|
|
# Properties
|
|
description = resource.prop('description')
|
|
enabled = resource.prop('enabled', type=bool)
|
|
name = resource.prop('name')
|