Browse Source

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)
(cherry picked from commit d33843dc19)
(cherry picked from commit 09b61ff817)
(cherry picked from commit 906178cf1f)
changes/51/746251/1
Tobias Urdin 2 months ago
committed by Takashi Kajinami
parent
commit
d7f55ede44
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/puppet/provider/keystone_service/openstack.rb

+ 3
- 0
lib/puppet/provider/keystone_service/openstack.rb View File

@@ -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…
Cancel
Save