Skip to content

Ohu/xcpng/002 - Tools - Adds CLI for using update scripts#417

Draft
olivierh-pro wants to merge 2 commits intoohu/xcpng-539/001from
ohu/xcpng-539/002
Draft

Ohu/xcpng/002 - Tools - Adds CLI for using update scripts#417
olivierh-pro wants to merge 2 commits intoohu/xcpng-539/001from
ohu/xcpng-539/002

Conversation

@olivierh-pro
Copy link
Contributor

xcpng-539

This PR adds a cli module inside tools sub packages. The cli provides following features:

  • Option -d/--debug to display log level DEBUG
  • subcommand update
    • positional argument: hosts , a list of host addresses or ip addresses
    • optional argument: --enablerepo, enable one or more repo(s), basically it is a yum with --enablerepo=extra1

The cli uses _command_update , a wrapper to pass args from command line to update_all function.

A new file tools.py is added at root level to act like wrapper to run cli.

Note

This code is based on branch ohu/xcpng-539/001

Please, consider this PR #415 before

The cli does nothing but displaying help message.

Signed-off-by: Olivier Hoareau <olivier.hoareau@vates.tech>
* `-d`/`--debug` global arg
* subparser for command `update`
* positional arg `hosts` for update command
* optional arg `enablerepo` for update command
* intermediate func for wrapping command

Signed-off-by: Olivier Hoareau <olivier.hoareau@vates.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant