mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-22 12:53:00 +00:00
"kiwi show"
This commit is contained in:
parent
26cac6c079
commit
9139032a0e
5 changed files with 29 additions and 6 deletions
2
kiwi.yml
2
kiwi.yml
|
@ -1 +1 @@
|
||||||
version: 0.1
|
version: '0.1'
|
|
@ -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!
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ from .subcommands import *
|
||||||
|
|
||||||
class Runner:
|
class Runner:
|
||||||
__commands: List[SubCommand] = [
|
__commands: List[SubCommand] = [
|
||||||
InitCommand
|
InitCommand,
|
||||||
|
ShowCommand
|
||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -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']
|
21
src/kiwi/subcommands/show.py
Normal file
21
src/kiwi/subcommands/show.py
Normal 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)
|
Loading…
Reference in a new issue