Make able to work prefetch without OVS
Change-Id: I92d43b290b0d8bdfaa8b9c48bf61fdf3a98ae8aa Related-bug: #1516060
This commit is contained in:
@@ -14,7 +14,7 @@ Puppet::Type.type(:l2_bond).provide(:ovs, :parent => Puppet::Provider::Ovs_base)
|
||||
|
||||
def self.get_instances(big_hash)
|
||||
# didn't use .select{...} here for backward compatibility with ruby 1.8
|
||||
big_hash[:port].reject{|k,v| !v[:port_type].include?('bond')}
|
||||
big_hash.fetch(:port, {}).reject{|k,v| !v[:port_type].include?('bond')}
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,7 @@ Puppet::Type.type(:l2_bridge).provide(:ovs, :parent => Puppet::Provider::Ovs_bas
|
||||
end
|
||||
|
||||
def self.get_instances(big_hash)
|
||||
big_hash[:bridge]
|
||||
big_hash.fetch(:bridge, {})
|
||||
end
|
||||
|
||||
# def self.instances
|
||||
|
||||
@@ -6,13 +6,16 @@ Puppet::Type.type(:l2_patch).provide(:ovs, :parent => Puppet::Provider::Ovs_base
|
||||
:ethtool_cmd => 'ethtool',
|
||||
:brctl => 'brctl'
|
||||
|
||||
def self.get_instances(big_hash)
|
||||
big_hash.fetch(:port, {})
|
||||
end
|
||||
|
||||
def self.instances
|
||||
vsctl_show = ovs_vsctl_show()
|
||||
lnx_port_br_mapping = get_lnx_port_bridges_pairs()
|
||||
jacks = []
|
||||
# didn't use .select{...} here for backward compatibility with ruby 1.8
|
||||
vsctl_show[:port].reject{|k,v| !(v[:port_type] & ['jack','internal']).any?}.each_pair do |p_name, p_props|
|
||||
vsctl_show.fetch(:port,{}).reject{|k,v| !(v[:port_type] & ['jack','internal']).any?}.each_pair do |p_name, p_props|
|
||||
props = {
|
||||
:name => p_name,
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Puppet::Type.type(:l2_port).provide(:ovs, :parent => Puppet::Provider::Ovs_base)
|
||||
end
|
||||
|
||||
def self.get_instances(big_hash)
|
||||
big_hash[:port]
|
||||
big_hash.fetch(:port, {})
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user