diff options
| author | Cory Wright <cory.wright@rackspace.com> | 2011-05-31 09:51:20 -0400 |
|---|---|---|
| committer | Cory Wright <cory.wright@rackspace.com> | 2011-05-31 09:51:20 -0400 |
| commit | 2bd6e5561339a6755709461dab9aa6cad4a1cf81 (patch) | |
| tree | 074ae708f7103a193e9d435bbcb07e8018083b7f /plugins | |
| parent | 6120fca7ff665ead049c4a26b63e73d7e2a372fd (diff) | |
| download | nova-2bd6e5561339a6755709461dab9aa6cad4a1cf81.tar.gz nova-2bd6e5561339a6755709461dab9aa6cad4a1cf81.tar.xz nova-2bd6e5561339a6755709461dab9aa6cad4a1cf81.zip | |
pep8 fixes
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py | 11 | ||||
| -rwxr-xr-x | plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py b/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py index 0186a3c8b..514a43a2d 100755 --- a/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py +++ b/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py @@ -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: diff --git a/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py b/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py index 9fde69377..accd08b91 100755 --- a/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py +++ b/plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py @@ -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()] |
