Odyssey
tools
hosting
cli
entry.py
1
"""
2
HomeCU tool for managing hosting at AWS.
3
"""
4
5
import
os
6
import
shellish
7
from
.
import
deploy, stack, cumanage, logs, sched, certificates, ecr
8
from
shellish.command
import
contrib
9
10
11
class
RootCommand
(shellish.Command):
12
""" Manage Odyssey AWS hosting. """
13
14
name =
'hosting'
15
16
def
setup_args(self, parser):
17
self.add_subcommand(
deploy.DeployCommand
)
18
self.add_subcommand(
ecr.ECRCommand
)
19
self.add_subcommand(
stack.StackCommand
)
20
self.add_subcommand(
cumanage.CUManageCommand
)
21
self.add_subcommand(
sched.SchedCommand
)
22
self.add_subcommand(
logs.LogsCommand
)
23
self.add_subcommand(
certificates.CertificateCommand
)
24
self.add_subcommand(DebugCommand)
25
26
def
prerun
(self, args):
27
""" Add the interactive commands just before it goes to the prompt so
28
they don't show up in the --help from the commands line. """
29
self.add_subcommand(contrib.Exit)
30
self.add_subcommand(contrib.Help)
31
self.add_subcommand(contrib.Reset)
32
self.add_subcommand(contrib.Pager)
33
34
def
run
(self, args):
35
""" Run interactive mode if we are called without args. """
36
self.session.run_loop()
37
38
39
class
DebugCommand
(shellish.Command):
40
""" Debug command shell. """
41
42
name =
'debug'
43
44
def
run(self, args):
45
os.system(
'bash'
)
46
47
48
RootCommand
()()
cli.entry.RootCommand.prerun
def prerun(self, args)
Definition:
entry.py:26
cli.entry.RootCommand.run
def run(self, args)
Definition:
entry.py:34
cli.entry.DebugCommand
Definition:
entry.py:39
cli.cumanage.CUManageCommand
Definition:
cumanage.py:11
cli.deploy.DeployCommand
Definition:
deploy.py:16
cli.sched.SchedCommand
Definition:
sched.py:12
cli.entry.RootCommand
Definition:
entry.py:11
cli.stack.StackCommand
Definition:
stack.py:27
cli.certificates.CertificateCommand
Definition:
certificates.py:43
cli.logs.LogsCommand
Definition:
logs.py:80
cli.ecr.ECRCommand
Definition:
ecr.py:24
Generated by
1.8.15