vs_port: Avoid detecting partial name
This ensures that a different port, which includes name of the port being created, is ignored when checking whether the target already exists. Closes-Bug: #2043921 Change-Id: I4a8db4e7b0da87a00ef097c8e066a11bfc5fde90
This commit is contained in:
@@ -13,7 +13,7 @@ Puppet::Type.type(:vs_port).provide(:ovs) do
|
|||||||
commands :vsctl => 'ovs-vsctl'
|
commands :vsctl => 'ovs-vsctl'
|
||||||
|
|
||||||
def exists?
|
def exists?
|
||||||
vsctl('list-ports', @resource[:bridge]).include? @resource[:port]
|
vsctl('list-ports', @resource[:bridge]).split("\n").include? @resource[:port]
|
||||||
rescue Puppet::ExecutionFailure => e
|
rescue Puppet::ExecutionFailure => e
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user