pep8 fixes
This commit is contained in:
parent
6120fca7ff
commit
2bd6e55613
@ -34,13 +34,13 @@ def main(command, phys_dev_name, bridge_name):
|
||||
ovs_ofctl('del-flows', bridge_name)
|
||||
|
||||
if command in ('online', 'reset'):
|
||||
pnic_ofport = execute_get_output('/usr/bin/ovs-vsctl', 'get', 'Interface',
|
||||
phys_dev_name, 'ofport')
|
||||
pnic_ofport = execute_get_output('/usr/bin/ovs-vsctl', 'get',
|
||||
'Interface', phys_dev_name, 'ofport')
|
||||
|
||||
# these flows are lower priority than all VM-specific flows.
|
||||
|
||||
# allow all traffic from the physical NIC, as it is trusted (i.e., from a
|
||||
# filtered vif, or from the physical infrastructure
|
||||
# allow all traffic from the physical NIC, as it is trusted (i.e.,
|
||||
# from a filtered vif, or from the physical infrastructure)
|
||||
ovs_ofctl('add-flow', bridge_name,
|
||||
"priority=2,in_port=%s,actions=normal" % pnic_ofport)
|
||||
|
||||
@ -53,7 +53,8 @@ if __name__ == "__main__":
|
||||
print sys.argv
|
||||
script_name = os.path.basename(sys.argv[0])
|
||||
print "This script configures base ovs flows."
|
||||
print "usage: %s [online|offline|reset] phys-dev-name bridge-name" % script_name
|
||||
print "usage: %s [online|offline|reset] phys-dev-name bridge-name" \
|
||||
% script_name
|
||||
print " ex: %s online eth0 xenbr0" % script_name
|
||||
sys.exit(1)
|
||||
else:
|
||||
|
@ -52,7 +52,7 @@ def main(command, vif_raw, net_type):
|
||||
vif_name, dom_id, vif_index = vif_raw.split('-')
|
||||
vif = "%s%s.%s" % (vif_name, dom_id, vif_index)
|
||||
bridge = "xenbr%s" % vif_index
|
||||
|
||||
|
||||
xsls = execute_get_output('/usr/bin/xenstore-ls',
|
||||
'/local/domain/%s/vm-data/networking' % dom_id)
|
||||
macs = [line.split("=")[0].strip() for line in xsls.splitlines()]
|
||||
|
Loading…
Reference in New Issue
Block a user