Browse Source

Code clenaup

bugfixes
gau1991 10 years ago
parent
commit
52e7a50283
  1. 11
      config/plugins.d/example.conf
  2. 50
      ee/cli/plugins/example.py
  3. 1
      ee/cli/templates/default.mustache
  4. 9
      ee/core/checkpackage.py
  5. 19
      ee/core/domaincheck.py
  6. 10
      ee/core/dummy.py
  7. 23
      ee/core/info.py
  8. 11
      ee/core/permissions.py
  9. 8
      ee/core/swapcreation.py
  10. 16
      ee/utils/test.py
  11. 0
      tests/core/test_exc.py

11
config/plugins.d/example.conf

@ -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

50
ee/cli/plugins/example.py

@ -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
ee/cli/templates/default.mustache

@ -1 +0,0 @@
Inside {{foo}}

9
ee/core/checkpackage.py

@ -1,9 +0,0 @@
"""EasyEngine package check module."""
class EEPackageCheck():
"""Intialization for package check"""
def ___init__():
# TODO Intialization for package check
pass

19
ee/core/domaincheck.py

@ -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

10
ee/core/dummy.py

@ -1,10 +0,0 @@
"""EasyEngine dummy core classes."""
class EEDummy():
"""Generic errors."""
def __init__():
pass
def dummy():
print("Dummy Function")

23
ee/core/info.py

@ -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

11
ee/core/permissions.py

@ -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

8
ee/core/swapcreation.py

@ -1,8 +0,0 @@
"""EasyEngine swap creation module."""
class EESwapCreation():
"""Generice swap creation intialisation"""
def __init__():
# TODO method for swap creation
pass

16
ee/utils/test.py

@ -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()

0
tests/core/test_exc.py

Loading…
Cancel
Save