Always pass --name when flushing keystone_service
Running "openstack service set <id> --description=" will throw an error [1]. The error occurs because the request to Keystone must include any of enabled, name or type to satisfy the minProperties of the patch request. This patch always sets the --name parameter when calling the openstack command so that we satisfy this requirement. [1] http://paste.openstack.org/show/795869/ Change-Id: Ie4e2fe62ee7734f657f765c352ba542360c0e1d7 (cherry picked from commitfc30737487
) (cherry picked from commitd33843dc19
) (cherry picked from commit09b61ff817
) (cherry picked from commit906178cf1f
)
This commit is contained in:
parent
6e29624320
commit
d7f55ede44
|
@ -95,6 +95,9 @@ Puppet::Type.type(:keystone_service).provide(
|
|||
def flush
|
||||
options = []
|
||||
if @property_flush && !@property_flush.empty?
|
||||
# NOTE(tobias.urdin): Always pass --name to make sure we satisfy the minProperties
|
||||
# for the request to Keystone.
|
||||
options << "--name=#{resource[:name]}"
|
||||
options << "--description=#{resource[:description]}" if @property_flush[:description]
|
||||
options << "--type=#{resource[:type]}" if @property_flush[:type]
|
||||
self.class.request('service', 'set', [@property_hash[:id]] + options) unless options.empty?
|
||||
|
|
Loading…
Reference in New Issue