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 commit fc30737487
)
This commit is contained in:
parent
975806ce18
commit
d33843dc19
|
@ -95,6 +95,9 @@ Puppet::Type.type(:keystone_service).provide(
|
||||||
def flush
|
def flush
|
||||||
options = []
|
options = []
|
||||||
if @property_flush && !@property_flush.empty?
|
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 << "--description=#{resource[:description]}" if @property_flush[:description]
|
||||||
options << "--type=#{resource[:type]}" if @property_flush[:type]
|
options << "--type=#{resource[:type]}" if @property_flush[:type]
|
||||||
self.class.request('service', 'set', [@property_hash[:id]] + options) unless options.empty?
|
self.class.request('service', 'set', [@property_hash[:id]] + options) unless options.empty?
|
||||||
|
|
Loading…
Reference in New Issue