Fix netlab down within the netlab restart command#3354
Conversation
|
Thanks a million. Never tried "restart" with a topology file name. I would rewrite the whole parsing code to do parsing for "netlab down" and then remove the unparsed arguments from the arguments passed to "netlab down". Would you like to do the rewrite, or should I? |
|
Am happy to rewrite it, but am not sure how you want it doing? Do you mean to try and grab the name of the topology first and then add it to up_only_args and then keep |
|
We (both) got it all wrong. The lab has to be restarted from the snapshot file, not from a lab topology (that could start a completely different lab). Details in #3359 |
No worries, next time will ask first before trying to fix something that wasn't actually broken in the way I thought 😁 |
When using
netlab restartto restart a lab thenetlab downpart of it fails as the topology file name is being passed in to the command (only needed fornetlab up)ste@netlab-dev:~/labs$ netlab restart simple_topo.yml usage: netlab down [-h] [-v] [--cleanup] [--dry-run] [--force] [-i INSTANCE] [--snapshot [SNAPSHOT]] netlab down: error: unrecognized arguments: simple_topo.ymlFixed in
restart.pyby adding the topology file to the filtering for netlab down.