I have this task that transfers virtual machines between two servers. It operates like this:
fab -H instance migrate --from FOO --to BAR
FOO and BAR are deliberately not positional arguments because I wanted to remove the risk of confusion due to ambiguity. Specifying the arguments with --option makes the naming explicit. Maybe that's not a strong argument for this job, so consider the retirement task:
fab -H instance retire --ganeti-master FOO --puppet-server BAR --backupserver BAZ
In this case, I could also have used positional arguments to make sure the user provides all arguments, but then the order would have been totally arbitrary. Why is the ganeti master before the puppet server?
Therefore, I would like to be able to specify arguments as required, regardless of whether they are positional or not. Maybe required=True argument like argparse does?
Thanks!
PS: This is the inverse of #159 and is not named "required optional arguments" because that would be confusing and silly. ;)
I have this task that transfers virtual machines between two servers. It operates like this:
FOO
andBAR
are deliberately not positional arguments because I wanted to remove the risk of confusion due to ambiguity. Specifying the arguments with--option
makes the naming explicit. Maybe that's not a strong argument for this job, so consider the retirement task:In this case, I could also have used positional arguments to make sure the user provides all arguments, but then the order would have been totally arbitrary. Why is the ganeti master before the puppet server?
Therefore, I would like to be able to specify arguments as required, regardless of whether they are positional or not. Maybe
required=True
argument likeargparse
does?Thanks!
PS: This is the inverse of #159 and is not named "required optional arguments" because that would be confusing and silly. ;)