diff options
author | 2016-12-22 18:03:24 +0200 | |
---|---|---|
committer | 2016-12-22 18:03:24 +0200 | |
commit | 6fba9246650a19dbf0231137f324e3accb01166e (patch) | |
tree | 8aa6d2a1520304cf16abb6bfd19ad2c17d90d752 | |
parent | 48cb48c6cdb840085c922602b2b227b656efbd10 (diff) |
Config creation script (IP based): wrong IP in case of 10+ interfaces
Change-Id: I71e861b9dcbc838d6344fa051cebacaa16e1fc54
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
-rwxr-xr-x | scripts/dpdk_setup_ports.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index 3f24b244..2d8a046a 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -698,11 +698,11 @@ Other network devices if isinstance(ips, list) and len(ips) > i: interface['ip'] = ips[i] else: - interface['ip'] = ".".join(list(str(i+1))*4) + interface['ip'] = '.'.join([str(i+1) for _ in range(4)]) if isinstance(def_gws, list) and len(def_gws) > i: interface['def_gw'] = def_gws[i] else: - interface['def_gw'] = ".".join(list(str(dual_index+1))*4) + interface['def_gw'] = '.'.join([str(dual_index+1) for _ in range(4)]) else: dual_if = wanted_interfaces[dual_index] if 'MAC' not in interface: |