gau1991
10 years ago
11 changed files with 0 additions and 158 deletions
@ -1,11 +0,0 @@ |
|||||
### Example Plugin Configuration for EasyEngine |
|
||||
|
|
||||
[example] |
|
||||
|
|
||||
### If enabled, load a plugin named `example` either from the Python module |
|
||||
### `ee.cli.plugins.example` or from the file path |
|
||||
### `/var/lib/ee/plugins/example.py` |
|
||||
enable_plugin = false |
|
||||
|
|
||||
### Additional plugin configuration settings |
|
||||
foo = bar |
|
@ -1,50 +0,0 @@ |
|||||
"""Example Plugin for EasyEngine.""" |
|
||||
|
|
||||
from cement.core.controller import CementBaseController, expose |
|
||||
from cement.core import handler, hook |
|
||||
|
|
||||
def example_plugin_hook(app): |
|
||||
# do something with the ``app`` object here. |
|
||||
pass |
|
||||
|
|
||||
class ExamplePluginController(CementBaseController): |
|
||||
class Meta: |
|
||||
# name that the controller is displayed at command line |
|
||||
label = 'example' |
|
||||
|
|
||||
# text displayed next to the label in ``--help`` output |
|
||||
description = 'this is an example plugin controller' |
|
||||
|
|
||||
# stack this controller on-top of ``base`` (or any other controller) |
|
||||
stacked_on = 'base' |
|
||||
|
|
||||
# determines whether the controller is nested, or embedded |
|
||||
stacked_type = 'nested' |
|
||||
|
|
||||
# these arguments are only going to display under |
|
||||
# ``$ ee example --help`` |
|
||||
arguments = [ |
|
||||
( |
|
||||
['-f', '--foo'], |
|
||||
dict( |
|
||||
help='Notorious foo option', |
|
||||
action='store', |
|
||||
) |
|
||||
) |
|
||||
] |
|
||||
|
|
||||
@expose(hide=True) |
|
||||
def default(self): |
|
||||
print("Inside ExamplePluginController.default()") |
|
||||
|
|
||||
@expose(help="this is an example sub-command.") |
|
||||
def example_plugin_command(self): |
|
||||
print("Inside ExamplePluginController.example_plugin_command()") |
|
||||
|
|
||||
|
|
||||
def load(app): |
|
||||
# register the plugin class.. this only happens if the plugin is enabled |
|
||||
handler.register(ExamplePluginController) |
|
||||
|
|
||||
# register a hook (function) to run after arguments are parsed. |
|
||||
hook.register('post_argument_parsing', example_plugin_hook) |
|
@ -1 +0,0 @@ |
|||||
Inside {{foo}} |
|
@ -1,9 +0,0 @@ |
|||||
"""EasyEngine package check module.""" |
|
||||
|
|
||||
|
|
||||
class EEPackageCheck(): |
|
||||
|
|
||||
"""Intialization for package check""" |
|
||||
def ___init__(): |
|
||||
# TODO Intialization for package check |
|
||||
pass |
|
@ -1,19 +0,0 @@ |
|||||
"""EasyEngine domain check module.""" |
|
||||
|
|
||||
|
|
||||
class EEDomainCheck(): |
|
||||
|
|
||||
"""Intialization domain check""" |
|
||||
def ___init__(): |
|
||||
# TODO Intialization for domain check |
|
||||
pass |
|
||||
|
|
||||
"""Check for proper domain""" |
|
||||
def isdomain(): |
|
||||
# TODO method for doamin check |
|
||||
pass |
|
||||
|
|
||||
"""Check for proper Fully qualified domain""" |
|
||||
def isfqdn(): |
|
||||
# TODO method for FQDN check |
|
||||
pass |
|
@ -1,10 +0,0 @@ |
|||||
"""EasyEngine dummy core classes.""" |
|
||||
|
|
||||
|
|
||||
class EEDummy(): |
|
||||
"""Generic errors.""" |
|
||||
def __init__(): |
|
||||
pass |
|
||||
|
|
||||
def dummy(): |
|
||||
print("Dummy Function") |
|
@ -1,23 +0,0 @@ |
|||||
"""EasyEngine Nginx, PHP, MySQL info module.""" |
|
||||
|
|
||||
|
|
||||
class EEInfo(): |
|
||||
"""Intialization for info""" |
|
||||
def ___init__(): |
|
||||
# TODO common method for info |
|
||||
pass |
|
||||
|
|
||||
"""Method to disaply info for PHP""" |
|
||||
def infophp(): |
|
||||
# TODO info for php |
|
||||
pass |
|
||||
|
|
||||
"""Method to disaply info for Nginx""" |
|
||||
def infonginx(): |
|
||||
# TODO info for Nginx |
|
||||
pass |
|
||||
|
|
||||
"""Method to disaply info for MySQL""" |
|
||||
def infomysql(): |
|
||||
# TODO info for MySQL |
|
||||
pass |
|
@ -1,11 +0,0 @@ |
|||||
"""EasyEngine set permission module""" |
|
||||
|
|
||||
|
|
||||
class EESetPermission(): |
|
||||
"""Intialization set permission""" |
|
||||
def ___init__(): |
|
||||
# TODO method for set permission |
|
||||
pass |
|
||||
|
|
||||
def setPermissions(self, user, group, path, recursive=False): |
|
||||
pass |
|
@ -1,8 +0,0 @@ |
|||||
"""EasyEngine swap creation module.""" |
|
||||
|
|
||||
|
|
||||
class EESwapCreation(): |
|
||||
"""Generice swap creation intialisation""" |
|
||||
def __init__(): |
|
||||
# TODO method for swap creation |
|
||||
pass |
|
@ -1,16 +0,0 @@ |
|||||
"""Testing utilities for EasyEngine.""" |
|
||||
|
|
||||
from ee.cli.main import EETestApp |
|
||||
from cement.utils.test import * |
|
||||
|
|
||||
|
|
||||
class EETestCase(CementTestCase): |
|
||||
app_class = EETestApp |
|
||||
|
|
||||
def setUp(self): |
|
||||
"""Override setup actions (for every test).""" |
|
||||
super(EETestCase, self).setUp() |
|
||||
|
|
||||
def tearDown(self): |
|
||||
"""Override teardown actions (for every test).""" |
|
||||
super(EETestCase, self).tearDown() |
|
Loading…
Reference in new issue