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

Integrate defaults.yaml config with settings #20

Closed Erik-Lamers1 closed 3 years ago

Erik-Lamers1 commented 3 years ago

defaults.yaml used to be the config for storing values used by the providers (LXC). But, this meant that an extra config was required to be loaded by each command issued to VNet-manager, which can be confusing. Because the values of defaults.yaml where rather static it makes more sense to include them in the Python settings itself. This means that there will be a change in how users can change these settings. If a user now wants to override something in the provider settings he/she can do the following;

# In the settings dir create dev.py
$ touch vnet_manager/settings/dev.py
# Set dev.py as the settings module
$ export SETTINGS_MODULE=vnet_manager.settings.dev

Now in dev.py, you can override the provider settings like so;

from .base import *

PROVIDERS["lxc"]["supported_operating_systems"].append("gentoo")

Though, actual changes should be made into a PR.

codecov-io commented 3 years ago

Codecov Report

Merging #20 (83d4710) into master (0dd6377) will decrease coverage by 0.18%. The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   96.95%   96.77%   -0.19%     
==========================================
  Files          42       42              
  Lines        3188     3004     -184     
==========================================
- Hits         3091     2907     -184     
  Misses         97       97              
Impacted Files Coverage Δ
vnet_manager/config/validate.py 95.95% <ø> (-0.94%) :arrow_down:
vnet_manager/operations/storage.py 26.66% <0.00%> (ø)
vnet_manager/settings/test.py 100.00% <ø> (ø)
vnet_manager/tests/config/test_validate.py 100.00% <ø> (ø)
vnet_manager/conf.py 94.28% <33.33%> (ø)
vnet_manager/actions/manager.py 94.87% <100.00%> (ø)
vnet_manager/config/config.py 100.00% <100.00%> (ø)
vnet_manager/environment/host.py 83.33% <100.00%> (+0.72%) :arrow_up:
vnet_manager/environment/lxc.py 100.00% <100.00%> (ø)
vnet_manager/operations/machine.py 95.75% <100.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 51eb1e5...83d4710. Read the comment docs.

Erik-Lamers1 commented 3 years ago

I need to fix the trigger happy codecov :(