ana-cc/monroe-cli

invalid int value for --nodes argument

Closed this issue · 5 comments

alfs commented
$ monroe create --nodes 400 steven76/dennis
usage: monroe create [-h] [--name NAME] [--deployed] [--nodecount NODECOUNT]
                    [--ifcount IFCOUNT] [--maxnodes] [--duration DURATION]
                    [--start START] [--traffic TRAFFIC] [--storage STORAGE]
                    [--logfile LOGFILE] [--ssh] [--new] [--old]
                    [--jsonstr JSONSTR [JSONSTR ...]]
                    [--countries COUNTRIES [COUNTRIES ...]]
                    [--nodes NODES [NODES ...]]
                    [--recurrence <period, finish time> <period, finish time>]
                    [--availability]
                    script
monroe create: error: argument --nodes: invalid int value: 'steven76/dennis'

Using --nodes=400 works however, but does not allow for multiple nodes to be specified.
The argument parsing for --countries is similar, so check if this also needs adjustment.

Your syntax is incorrect. monroe create needs the container as a positional argument, whereas you've put it at the end and you're getting the error above. It should be:
monroe create steven76/dennis --nodes 123
Specify additional nodes like this:
monroe create steven76/dennis --nodes 123 124 125

Forgot something- the nodecount also needs to be set to the number of nodes when specifying multiple nodes:
monroe create steven76/dennis --nodes 123 124 125 --nodecount 3

Reopening as you should be able to specify multiple nodes without having to specify the nodecount.

...and fixed; monroe create steven76/dennis --nodes 123 124 125 will correctly submit with a nodecount of 3.

alfs commented

I see. I was tricked by the help output :)

                    [--nodes NODES [NODES ...]]
                    [--recurrence <period, finish time> <period, finish time>]
                    [--availability]
                    script

So it should be like this? Does countries and jsonstr also need to be at the end?

                    [--recurrence <period, finish time> <period, finish time>]
                    [--availability]
                    script
                    [--nodes NODES [NODES ...]]