summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_mitaka
diff options
context:
space:
mode:
authorKingPoo <haojingbo@huawei.com>2016-11-14 02:16:24 -0500
committerJustin chi <chigang@huawei.com>2016-11-15 03:20:08 +0000
commitb15421ac53b8f57011613e29505cd8c0275b5066 (patch)
tree8ca3717d0f38c8ae7d19062b0f08f9b41b865f29 /deploy/adapters/ansible/openstack_mitaka
parenta099404ead9151b529de1e1e960cac6e67937ad0 (diff)
Repair Flake8's warnings & errors
Change-Id: I67e71bc37c0464a0714e1e59b3402973786e4aa6 Signed-off-by: KingPoo <haojingbo@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka')
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/setup_networks.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/setup_networks.py
index cdd4ae0d..086edb20 100644
--- a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/setup_networks.py
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/setup_networks.py
@@ -26,8 +26,7 @@ def add_ovs_port(ovs_br, ifname, uplink, vlan_id=None):
if vlan_id:
cmd += " tag=%s" % vlan_id
cmd += " -- set Interface %s type=internal;" % ifname
- cmd += "ip link set dev %s address `ip link show %s |awk '/link\/ether/{print $2}'`;" \
- % (ifname, uplink)
+ cmd += "ip link set dev %s address `ip link show %s |awk '/link\/ether/{print $2}'`;" % (ifname, uplink) # noqa
cmd += "ip link set %s up;" % ifname
LOG.info("add_ovs_port: cmd=%s" % cmd)
os.system(cmd)
@@ -60,7 +59,7 @@ def setup_ips(ip_settings, sys_intf_mappings):
else:
intf_name = intf_info["alias"]
cmd = "ip addr add %s/%s brd %s dev %s;" \
- % (intf_info["ip"], intf_info["netmask"], str(network.broadcast), intf_name)
+ % (intf_info["ip"], intf_info["netmask"], str(network.broadcast), intf_name) # noqa
if "gw" in intf_info:
cmd += "route del default;"
cmd += "ip route add default via %s dev %s" % (
@@ -79,6 +78,6 @@ def main(config):
setup_ips(config["ip_settings"], config["sys_intf_mappings"])
if __name__ == "__main__":
- os.system("service openvswitch-switch status|| service openvswitch-switch start")
+ os.system("service openvswitch-switch status|| service openvswitch-switch start") # noqa
config = yaml.load(open(config_path))
main(config)