From 64b64f9ee75ac1da8fccfa703af13144993691e5 Mon Sep 17 00:00:00 2001 From: Kai Meyer Date: Tue, 20 Dec 2016 16:06:06 -0700 Subject: [PATCH] Fixing white space issue with cmd, and making internal default to False --- salt/modules/openvswitch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/modules/openvswitch.py b/salt/modules/openvswitch.py index 01f78676dd..0113859a68 100644 --- a/salt/modules/openvswitch.py +++ b/salt/modules/openvswitch.py @@ -335,7 +335,7 @@ def interface_get_type(port): return _stdout_list_split(retcode, stdout) -def port_create_vlan(br, port, id, internal): +def port_create_vlan(br, port, id, internal=False): ''' Isolate VM traffic using VLANs. @@ -364,14 +364,14 @@ def port_create_vlan(br, port, id, internal): return False elif port in port_list(br): cmd = 'ovs-vsctl set port {0} tag={1}'.format(port, id) - if internal: - cmd += ' -- set interface {0} type=internal'.format(port) + if internal: + cmd += ' -- set interface {0} type=internal'.format(port) result = __salt__['cmd.run_all'](cmd) return _retcode_to_bool(result['retcode']) else: cmd = 'ovs-vsctl add-port {0} {1} tag={2}'.format(br, port, id) - if internal: - cmd += ' -- set interface {0} type=internal'.format(port) + if internal: + cmd += ' -- set interface {0} type=internal'.format(port) result = __salt__['cmd.run_all'](cmd) return _retcode_to_bool(result['retcode'])