fuel-plugin-nsx-t/deployment_scripts/puppet/modules/nsxt/lib/puppet/parser/functions/get_interfaces.rb

15 lines
373 B
Ruby

module Puppet::Parser::Functions
newfunction(:get_interfaces, :type => :rvalue, :doc => <<-EOS
Returns the array of interface names for nsx-t VTEPs.
EOS
) do |args|
pnics = args[0]
vtep_interfaces = []
pnics.each do |pnic_pair|
device,uplink = pnic_pair.split(':')
vtep_interfaces.push(device.strip)
end
return vtep_interfaces
end
end