Fix how onos-gen-partitions script looks up optional node ips in CLI
Change-Id: Id62583755bc02ef20a87fcf7e394f725cef153ed
diff --git a/tools/test/bin/onos-gen-partitions b/tools/test/bin/onos-gen-partitions
index cbfa138..f7ae14d 100755
--- a/tools/test/bin/onos-gen-partitions
+++ b/tools/test/bin/onos-gen-partitions
@@ -2,7 +2,7 @@
"""
Generate the partitions json file from the $OC* environment variables
- Usage: onos-gen-partitions [output file]
+ Usage: onos-gen-partitions [output file] [node_ip ...]
If output file is not provided, the json is written to stdout.
"""
@@ -48,7 +48,7 @@
return perms
if __name__ == '__main__':
- nodes = get_nodes(sys.argv[1:])
+ nodes = get_nodes(sys.argv[2:])
base_partition = generate_base_partition([v.get('id') for v in nodes])
extended_partitions = generate_extended_partitions([v.get('id') for v in nodes], 3)
partitions = []