2021-10-21 02:02:38 +00:00
|
|
|
import click
|
|
|
|
|
2021-11-02 16:21:01 +00:00
|
|
|
from .cli import KiwiCommandType, KiwiCommand
|
|
|
|
from .decorators import kiwi_command
|
2021-10-29 11:38:21 +00:00
|
|
|
from ..config import ProjectConfig
|
|
|
|
from ..instance import Instance, Services
|
|
|
|
|
|
|
|
|
2021-10-29 11:59:57 +00:00
|
|
|
@click.option(
|
|
|
|
"-s/-S",
|
|
|
|
"--show/--no-show",
|
|
|
|
help=f"EXAMPLE",
|
|
|
|
)
|
2021-10-29 11:38:21 +00:00
|
|
|
@kiwi_command(
|
2021-10-22 15:52:46 +00:00
|
|
|
"list",
|
2021-11-02 16:21:01 +00:00
|
|
|
KiwiCommandType.PROJECT,
|
2021-10-22 15:52:46 +00:00
|
|
|
short_help="Inspect a kiwi-scp instance",
|
|
|
|
)
|
2021-11-02 16:21:01 +00:00
|
|
|
class CMD(KiwiCommand):
|
2021-10-29 11:38:21 +00:00
|
|
|
@classmethod
|
2021-10-29 11:59:57 +00:00
|
|
|
def run_for_instance(cls, instance: Instance, show: bool = None, **kwargs):
|
|
|
|
print(show)
|
2021-10-29 11:38:21 +00:00
|
|
|
print(instance.config.projects)
|
|
|
|
|
|
|
|
@classmethod
|
2021-10-29 11:59:57 +00:00
|
|
|
def run_for_services(cls, instance: Instance, project: ProjectConfig, services: Services, show: bool = None,
|
|
|
|
**kwargs):
|
|
|
|
print(show)
|
2021-10-29 11:38:21 +00:00
|
|
|
print(services)
|