Fix vs_port provider for Red Hat platforms
https://review.openstack.org/124789 separated the interface parameter from the port name. It added compatibility for ovs_redhat.rb by setting resource[:interface] = @resource[:port], however :interface was a string and is now an array, which breaks vs_port usage. Using @resource[:port] instead of :interface fixes the provider, and then we need to avoid using self.bonding? and self.vlan?, because using them causes the following error: "Error: Could not set 'present' on ensure: private method `bonding?' called for #<Puppet::Type::Vs_port::ProviderOvs_redhat:0x000000028e8a30>" Change-Id: I76fba53a34ff182881022066abde0a2c5dc8d066 Closes-Bug: #1556147
This commit is contained in:
@@ -26,14 +26,14 @@ Puppet::Type.type(:vs_port).provide(:ovs) do
|
||||
# allows this provider to be used as a base class for providers not
|
||||
# supporting all properties.
|
||||
sync_properties = []
|
||||
if self.bonding?
|
||||
if bonding?
|
||||
sync_properties += [:interface,
|
||||
:bond_mode,
|
||||
:lacp,
|
||||
:lacp_time,
|
||||
]
|
||||
end
|
||||
if self.vlan?
|
||||
if vlan?
|
||||
sync_properties += [:vlan_mode,
|
||||
:vlan_tag,
|
||||
:vlan_trunks,
|
||||
|
Reference in New Issue
Block a user