Add aggregate metadata unset support to nova_aggregate
Feature was waiting for python-openstackclient to add support for the "openstack aggregate unset" command. This is now available in 2.4.0. Closes-bug: #1776772 Change-Id: Id6ddd9d0a193819c9f69ea138554a2647bcd8ae3
This commit is contained in:
parent
ab23e15292
commit
4a4ac4a3cc
|
@ -86,14 +86,13 @@ Puppet::Type.type(:nova_aggregate).provide(
|
|||
|
||||
def metadata=(value)
|
||||
# clear obsolete keys
|
||||
# wip until #1559866
|
||||
# if @property_hash[:metadata].keys.length > 0
|
||||
# properties = [@resource[:name] ]
|
||||
# (@property_hash[:metadata].keys - @resource[:metadata].keys).each do |key|
|
||||
# properties << "--property" << "#{key}"
|
||||
# end
|
||||
# self.class.request('aggregate', 'unset', properties)
|
||||
# end
|
||||
if @property_hash[:metadata].keys.length > 0
|
||||
properties = [@resource[:name] ]
|
||||
(@property_hash[:metadata].keys - @resource[:metadata].keys).each do |key|
|
||||
properties << "--property" << "#{key}"
|
||||
end
|
||||
self.class.request('aggregate', 'unset', properties)
|
||||
end
|
||||
properties = [@resource[:name] ]
|
||||
@resource[:metadata].each do |key, value|
|
||||
properties << "--property" << "#{key}=#{value}"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The nova_aggregate resource type can now unset aggregate metadata.
|
||||
[Bug `1776772 <https://bugs.launchpad.net/puppet-nova/+bug/1776772>`_]
|
Loading…
Reference in New Issue