Erik-Lamers1 / vnet-manager

Virtual network manager - Manages containers and VMs to create a virtual network setup
MIT License
11 stars 7 forks source link

Move argument parser to individual subparsers #47

Closed Erik-Lamers1 closed 1 year ago

Erik-Lamers1 commented 2 years ago

The argument parser now uses a lot of exceptions to get some special options into the CLI. In order to do this nicely we need to rework the argeparser entirely, to work with subparsers per command, and pass each option individually to the action_manager.

Breaking change

In the new subparser the destroy command syntax is changed to have individual options for destroying a config, the base image or purging VNet config.

Closes: #38

codecov-commenter commented 2 years ago

Codecov Report

Merging #47 (ece2cb9) into master (064c483) will increase coverage by 0.31%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   96.52%   96.83%   +0.31%     
==========================================
  Files          24       23       -1     
  Lines        1208     1200       -8     
==========================================
- Hits         1166     1162       -4     
+ Misses         42       38       -4     
Impacted Files Coverage Δ
vnet_manager/settings/base.py 100.00% <ø> (ø)
vnet_manager/actions/manager.py 98.29% <100.00%> (+3.09%) :arrow_up:
vnet_manager/argeparser.py 100.00% <100.00%> (ø)
vnet_manager/log.py 100.00% <100.00%> (ø)
vnet_manager/operations/interface.py 100.00% <100.00%> (ø)
vnet_manager/settings/test.py 100.00% <100.00%> (ø)
vnet_manager/utils/user.py 94.28% <100.00%> (+0.16%) :arrow_up:
vnet_manager/vnet_manager.py 96.00% <100.00%> (+0.34%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more