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:
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
|
||||
runtime:
|
||||
storage: /var/kiwi
|
||||
env:
|
||||
HELLO_KIWI: Hello World!
|
||||
env: null
|
||||
|
|
|
@ -6,7 +6,8 @@ from .subcommands import *
|
|||
|
||||
class Runner:
|
||||
__commands: List[SubCommand] = [
|
||||
InitCommand
|
||||
InitCommand,
|
||||
ShowCommand
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -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']
|
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