Source

adama / src / adama / templates / order.template

Full commit
# -*- coding: utf-8 -*-

"""
"""

from optparse import make_option

from adama.commandment import BaseOrder
from adama.exceptions import OrderError


class Order(BaseOrder):
    """
    """

    options = BaseOrder.options + (
        # options for order come here
        # use make_option
        # see http://docs.python.org/library/optparse.html#populating-the-parser
    )

    # this constructs a pretty help for the order
    args = 'args of the order (ex: arg1 arg2)'
    description = 'help for the order (ex: __doc__)'
    examples = 'put examples here'

    def __init__(self):
        super(Order, self).__init__('{0}', command='{1}')

    def execute(self, *args, **options):
        # the logic of the order comes here
        return 0