Merge branch 'add_config_list'
This commit is contained in:
commit
5ea14a1a38
1 changed files with 8 additions and 0 deletions
|
@ -155,6 +155,7 @@ def run_config(
|
|||
config_filename: str,
|
||||
context: Union[None, str] = None,
|
||||
baseurl: Union[None, str] = None,
|
||||
list_config: bool = False,
|
||||
username: Union[None, str] = None,
|
||||
password: Union[None, str] = None,
|
||||
current: Union[None, str] = None,
|
||||
|
@ -179,6 +180,11 @@ def run_config(
|
|||
config_filename = symlink
|
||||
if found:
|
||||
return
|
||||
if list_config:
|
||||
config_data = get_config(config_filename)
|
||||
config_data.pop("password", None)
|
||||
output(config_data)
|
||||
return
|
||||
if not baseurl:
|
||||
needed.append("baseurl")
|
||||
if not username:
|
||||
|
@ -493,6 +499,7 @@ def get_parser() -> dict:
|
|||
configcmd.add_argument("-C",
|
||||
"--current",
|
||||
action=argparse.BooleanOptionalAction)
|
||||
configcmd.add_argument("-l", "--list", action="store_true")
|
||||
configcmd.add_argument("-p", "--password")
|
||||
configcmd.add_argument("-u", "--username")
|
||||
|
||||
|
@ -637,6 +644,7 @@ def main() -> int:
|
|||
args.context,
|
||||
args.baseurl,
|
||||
args.username,
|
||||
args.list,
|
||||
args.password,
|
||||
args.current,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue