Create mutually exclusive flags¶
from powercli import Command, Static
from powercli.utils import one_of
cmd = Command()
cmd.add_args(
one_of(
Flag(identifier="foo", long="foo"),
Flag(identifier="bar", long="bar"),
required=Static(True), # one of `foo` or `bar` **must** be present
)
)
You can use any amount of flags.