diff options
| author | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-16 17:08:27 +0800 |
|---|---|---|
| committer | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-31 11:26:37 +0800 |
| commit | 61c5597a09945982f093412cd134850346b82e3b (patch) | |
| tree | 17c543635e9a50e5d70f87b8079bbcddb6f14575 /plugins | |
| parent | 0f2142b14adc442840c79a48add0dab78acf7c93 (diff) | |
| download | nova-61c5597a09945982f093412cd134850346b82e3b.tar.gz nova-61c5597a09945982f093412cd134850346b82e3b.tar.xz nova-61c5597a09945982f093412cd134850346b82e3b.zip | |
Backslash continuation removal (Nova folsom-2)
Fixes bug #938588
Backslash continuations removal for scripts in bin/, plugin/, and etc.
Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d
Diffstat (limited to 'plugins')
4 files changed, 13 insertions, 14 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 5f6f93c88..dabc5be6b 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 @@ -30,9 +30,8 @@ import novalib def main(command, phys_dev_name): ovs_ofctl = lambda *rule: novalib.execute('/usr/bin/ovs-ofctl', *rule) - bridge_name = \ - novalib.execute_get_output('/usr/bin/ovs-vsctl', - 'iface-to-br', phys_dev_name) + bridge_name = novalib.execute_get_output('/usr/bin/ovs-vsctl', + 'iface-to-br', phys_dev_name) # always clear all flows first ovs_ofctl('del-flows', bridge_name) @@ -50,9 +49,9 @@ def main(command, phys_dev_name): # Allow traffic from dom0 if there is a management interface # present (its IP address is on the bridge itself) - bridge_addr = \ - novalib.execute_get_output('/sbin/ip', '-o', '-f', 'inet', 'addr', - 'show', bridge_name) + bridge_addr = novalib.execute_get_output('/sbin/ip', '-o', '-f', + 'inet', 'addr', 'show', + bridge_name) if bridge_addr != '': ovs_ofctl('add-flow', bridge_name, "priority=2,in_port=LOCAL,actions=normal") 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 c2a029de3..6e41e1e19 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 @@ -95,8 +95,8 @@ def main(command, vif_raw, net_type): apply_ovs_ipv4_flows(ovs, bridge, params) if net_type in ('ipv6', 'all') and 'ip6s' in data: for ip6 in data['ip6s']: - link_local = str(netaddr.EUI(data['mac']).eui64()\ - .ipv6_link_local()) + mac_eui64 = netaddr.EUI(data['mac']).eui64() + link_local = str(mac_eui64.ipv6_link_local()) ovs.params.update({'IPV6_LINK_LOCAL_ADDR': link_local}) ovs.params.update({'IPV6_GLOBAL_ADDR': ip6['ip']}) apply_ovs_ipv6_flows(ovs, bridge, params) @@ -228,8 +228,8 @@ def apply_ovs_ipv6_flows(ovs, bridge, params): if __name__ == "__main__": if len(sys.argv) != 4: - print "usage: %s [online|offline] vif-domid-idx [ipv4|ipv6|all] " % \ - os.path.basename(sys.argv[0]) + print ("usage: %s [online|offline] vif-domid-idx [ipv4|ipv6|all] " % + os.path.basename(sys.argv[0])) sys.exit(1) else: command, vif_raw, net_type = sys.argv[1:4] diff --git a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py index 157ecc298..106525a16 100755 --- a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py +++ b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py @@ -125,8 +125,8 @@ def apply_ebtables_rules(command, params): if __name__ == "__main__": if len(sys.argv) < 3: - print "usage: %s dom_id online|offline [vif]" % \ - os.path.basename(sys.argv[0]) + print ("usage: %s dom_id online|offline [vif]" % + os.path.basename(sys.argv[0])) sys.exit(1) else: dom_id, command = sys.argv[1:3] diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index daf4576bf..76e9349d4 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -146,8 +146,8 @@ def _download_tarball(sr_path, image_id, glance_host, glance_port, auth_token): if auth_token: headers['x-auth-token'] = auth_token - url = "http://%(glance_host)s:%(glance_port)d/v1/images/"\ - "%(image_id)s" % locals() + url = ("http://%(glance_host)s:%(glance_port)d/v1/images/" + "%(image_id)s" % locals()) logging.info("Downloading %s" % url) request = urllib2.Request(url, headers=headers) |
