1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +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 cidr: 10.22.46.0/24
runtime: runtime:
storage: /var/kiwi storage: /var/kiwi
env: env: null
HELLO_KIWI: Hello World!

View file

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

View file

@ -1,4 +1,6 @@
from .subcommand import SubCommand 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)