Browse Source

More Controllers

bugfixes
harshadyeola 10 years ago
parent
commit
980bb2da49
  1. 6
      ee/cli/bootstrap.py
  2. 34
      ee/cli/controllers/clean.py
  3. 34
      ee/cli/controllers/debug.py
  4. 6
      ee/cli/controllers/site.py
  5. 34
      ee/cli/controllers/stack.py

6
ee/cli/bootstrap.py

@ -6,7 +6,13 @@
from cement.core import handler from cement.core import handler
from ee.cli.controllers.base import EEBaseController from ee.cli.controllers.base import EEBaseController
from ee.cli.controllers.site import EESiteController from ee.cli.controllers.site import EESiteController
from ee.cli.controllers.stack import EEStackController
from ee.cli.controllers.debug import EEDebugController
from ee.cli.controllers.clean import EECleanController
def load(app): def load(app):
handler.register(EEBaseController) handler.register(EEBaseController)
handler.register(EESiteController) handler.register(EESiteController)
handler.register(EEStackController)
handler.register(EEDebugController)
handler.register(EECleanController)

34
ee/cli/controllers/clean.py

@ -0,0 +1,34 @@
"""EasyEngine site controller."""
from cement.core.controller import CementBaseController, expose
class EECleanController(CementBaseController):
class Meta:
label = 'clean'
interface = controller.IController
stacked_on = 'base'
stacked_type = 'nested'
description = 'clean command cleans different cache with following options'
(['-f', '--foo'],
dict(help='the notorious foo option', dest='foo', action='store',
metavar='TEXT') ),
]
@expose(hide=True)
def default(self):
# Default action for ee clean command
print ("Inside EECleanController.default().")
# clean command Options and subcommand calls and definations to
# mention here
# If using an output handler such as 'mustache', you could also
# render a data dictionary using a template. For example:
#
# data = dict(foo='bar')
# self.app.render(data, 'default.mustache')
#
#
# The 'default.mustache' file would be loaded from
# ``ee.cli.templates``, or ``/var/lib/ee/templates/``.
#

34
ee/cli/controllers/debug.py

@ -0,0 +1,34 @@
"""EasyEngine site controller."""
from cement.core.controller import CementBaseController, expose
class EEDebugController(CementBaseController):
class Meta:
label = 'debug'
interface = controller.IController
stacked_on = 'base'
stacked_type = 'nested'
description = 'debug command used for debugging issued with stack or site specific configuration'
(['-f', '--foo'],
dict(help='the notorious foo option', dest='foo', action='store',
metavar='TEXT') ),
]
@expose(hide=True)
def default(self):
# Default action for ee debug command
print ("Inside EEDebugController.default().")
# debug command Options and subcommand calls and definations to
# mention here
# If using an output handler such as 'mustache', you could also
# render a data dictionary using a template. For example:
#
# data = dict(foo='bar')
# self.app.render(data, 'default.mustache')
#
#
# The 'default.mustache' file would be loaded from
# ``ee.cli.templates``, or ``/var/lib/ee/templates/``.
#

6
ee/cli/controllers/site.py

@ -7,7 +7,7 @@ class EESiteController(CementBaseController):
label = 'site' label = 'site'
stacked_on = 'base' stacked_on = 'base'
stacked_type = 'nested' stacked_type = 'nested'
description = 'site command manges website configuration with the help of the following subcommands' description = 'site command manages website configuration with the help of the following subcommands'
arguments = [ arguments = [
(['-f', '--foo'], (['-f', '--foo'],
dict(help='the notorious foo option', dest='foo', action='store', dict(help='the notorious foo option', dest='foo', action='store',
@ -16,8 +16,12 @@ class EESiteController(CementBaseController):
@expose(hide=True) @expose(hide=True)
def default(self): def default(self):
# Default action for ee site command
print("Inside EESiteController.default().") print("Inside EESiteController.default().")
# site command Options and subcommand calls and definations to
# mention here
# If using an output handler such as 'mustache', you could also # If using an output handler such as 'mustache', you could also
# render a data dictionary using a template. For example: # render a data dictionary using a template. For example:
# #

34
ee/cli/controllers/stack.py

@ -0,0 +1,34 @@
"""EasyEngine site controller."""
from cement.core.controller import CementBaseController, expose
class EEStackController(CementBaseController):
class Meta:
label = 'stack'
interface = controller.IController
stacked_on = 'base'
stacked_type = 'nested'
description = 'stack command manages stack operations'
(['-f', '--foo'],
dict(help='the notorious foo option', dest='foo', action='store',
metavar='TEXT') ),
]
@expose(hide=True)
def default(self):
# Default action for ee stack command
print ("Inside EEStackController.default().")
# stack command Options and subcommand calls and definations to
# mention here
# If using an output handler such as 'mustache', you could also
# render a data dictionary using a template. For example:
#
# data = dict(foo='bar')
# self.app.render(data, 'default.mustache')
#
#
# The 'default.mustache' file would be loaded from
# ``ee.cli.templates``, or ``/var/lib/ee/templates/``.
#
Loading…
Cancel
Save