Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

juju-verify CLI does not allow optional parameters followed by positional args #142

@esunar

Description

@esunar

juju-verify uses argparse to parse the allowed parameters.

The usage section mentions:
"""
usage: juju-verify [-h] [--model MODEL] [-l {trace,debug,info}] [-s] (--units UNITS [UNITS ...] | --machines MACHINES [MACHINES ...]) {shutdown,reboot}
"""

However, due to bug [1], the positional arguments ("{shutdown,reboot}") need to be passed at the beginning of the command.

Example:
"""

WRONG

$ juju verify -m foundations-maas:test-lma2-microk8s -u microk8s/5 reboot
usage: juju-verify [-h] [--model MODEL] [-l {trace,debug,info}] [-s] (--units UNITS [UNITS ...] | --machines MACHINES [MACHINES ...]) {shutdown,reboot}
juju-verify: error: the following arguments are required: check

CORRECT

$ juju verify reboot -m foundations-maas:test-lma2-microk8s -u microk8s/5
"""

  1. https://bugs.python.org/issue9338

Imported from Launchpad using lp2gh.

  • date created: 2021-11-19T16:29:36Z

  • owner: aluria

  • assignee: None

  • the launchpad url

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions