1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-12-25 18:42:59 +00:00

"kiwi show"

This commit is contained in:
Jörn-Michael Miehe 2020-08-06 14:55:27 +02:00
parent 26cac6c079
commit 9139032a0e
5 changed files with 29 additions and 6 deletions

View file

@ -1 +1 @@
version: 0.1
version: '0.1'

View file

@ -10,5 +10,4 @@ network:
cidr: 10.22.46.0/24
runtime:
storage: /var/kiwi
env:
HELLO_KIWI: Hello World!
env: null

View file

@ -6,7 +6,8 @@ from .subcommands import *
class Runner:
__commands: List[SubCommand] = [
InitCommand
InitCommand,
ShowCommand
]
@classmethod

View file

@ -1,4 +1,6 @@
from .subcommand import SubCommand
from .init import InitCommand
__all__ = ['InitCommand', 'SubCommand']
from .init import InitCommand
from .show import ShowCommand
__all__ = ['SubCommand', 'InitCommand', 'ShowCommand']

View file

@ -0,0 +1,21 @@
from kiwi.config import Config
from kiwi.core import Parser
from .subcommand import SubCommand
class ShowCommand(SubCommand):
__parser = None
@classmethod
def get_cmd(cls):
return 'show'
@classmethod
def setup(cls):
cls.__parser = Parser.get_subparsers().add_parser(cls.get_cmd(), help="Show effective kiwi.yml")
@classmethod
def run(cls):
config = Config.load()
print(config)