vs_bridge: Ensure existing external ids are updated
... and also the ids not included by the given list are purged. Closes-Bug: #2043916 Change-Id: I058614b9113edd6e65238b924e5f474cab37946e
This commit is contained in:
parent
fc34b4cd49
commit
0f8e830a09
@ -47,9 +47,13 @@ Puppet::Type.type(:vs_bridge).provide(:ovs) do
|
|||||||
old_ids = _split(get_external_ids(br))
|
old_ids = _split(get_external_ids(br))
|
||||||
new_ids = _split(value)
|
new_ids = _split(value)
|
||||||
|
|
||||||
new_ids.each_pair do |k,v|
|
new_ids.each do |k,v|
|
||||||
unless old_ids.has_key?(k)
|
vsctl('br-set-external-id', br, k, v)
|
||||||
vsctl('br-set-external-id', br, k, v)
|
end
|
||||||
|
|
||||||
|
old_ids.each do |k, v|
|
||||||
|
if ! new_ids.has_key?(k)
|
||||||
|
vsctl('br-set-external-id', br, k)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
5
releasenotes/notes/bug-2043916-069f122907b13bc8.yaml
Normal file
5
releasenotes/notes/bug-2043916-069f122907b13bc8.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The ``vs_bridge`` resource now updates existing keys when external ids are
|
||||||
|
set. Also, the keys not included by the given extenral ids are removed.
|
Loading…
Reference in New Issue
Block a user