Fix how onos-gen-partitions script looks up optional node ips in CLI
Change-Id: Id62583755bc02ef20a87fcf7e394f725cef153ed
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | """ | 2 | """ |
| 3 | Generate the partitions json file from the $OC* environment variables | 3 | Generate the partitions json file from the $OC* environment variables |
| 4 | 4 | ||
| 5 | - Usage: onos-gen-partitions [output file] | 5 | + Usage: onos-gen-partitions [output file] [node_ip ...] |
| 6 | If output file is not provided, the json is written to stdout. | 6 | If output file is not provided, the json is written to stdout. |
| 7 | """ | 7 | """ |
| 8 | 8 | ||
| ... | @@ -48,7 +48,7 @@ def generate_extended_partitions(nodes, k): | ... | @@ -48,7 +48,7 @@ def generate_extended_partitions(nodes, k): |
| 48 | return perms | 48 | return perms |
| 49 | 49 | ||
| 50 | if __name__ == '__main__': | 50 | if __name__ == '__main__': |
| 51 | - nodes = get_nodes(sys.argv[1:]) | 51 | + nodes = get_nodes(sys.argv[2:]) |
| 52 | base_partition = generate_base_partition([v.get('id') for v in nodes]) | 52 | base_partition = generate_base_partition([v.get('id') for v in nodes]) |
| 53 | extended_partitions = generate_extended_partitions([v.get('id') for v in nodes], 3) | 53 | extended_partitions = generate_extended_partitions([v.get('id') for v in nodes], 3) |
| 54 | partitions = [] | 54 | partitions = [] | ... | ... |
-
Please register or login to post a comment