66292a5886
Make necessary changes for proper deployment of ODL on IPv6 network. Change-Id: Id7a0986f886a81b2041987b0d5a95edf2160e05e Depends-On: Idd257cf4666b853eb4c52861f9f400b6dbdeeadb Partial-Bug: #1783196
15 lines
277 B
Ruby
15 lines
277 B
Ruby
Puppet::Functions.create_function(:add_brackets) do
|
|
dispatch :add_brackets do
|
|
param 'String', :odl_ip
|
|
end
|
|
|
|
def add_brackets(odl_ip)
|
|
if odl_ip =~ /\[.*\]/
|
|
return odl_ip
|
|
else
|
|
bracketed_ip = "[#{odl_ip}]"
|
|
return bracketed_ip
|
|
end
|
|
end
|
|
end
|