Exemplo n.º 1
0
def main():
    plugin = Plugin(
        name="nested-calls",
        version=__version__,
        description="A plugin that calls commands on itself",
    )
    plugin.client = NestedCallClient()
    plugin.run()
Exemplo n.º 2
0
def main():
    plugin = Plugin(
        name="dynamic",
        version=__version__,
        description="Plugin that repeats very specific stuff",
    )
    plugin.client = DynamicClient()
    plugin.run()
Exemplo n.º 3
0
def main():
    plugin = Plugin(
        name="echo",
        version=__version__,
        description="Annoying plugin that just repeats stuff",
    )
    plugin.client = EchoClient()
    plugin.run()
Exemplo n.º 4
0
def main():
    plugin = Plugin(
        name="parent",
        version=__version__,
        description="Issues commands to a different namespace",
    )
    plugin.client = ParentClient()
    plugin.run()
Exemplo n.º 5
0
def main():
    plugin = Plugin(
        name="sleeper",
        version=__version__,
        description="A really lazy plugin",
    )
    plugin.client = SleeperClient()
    plugin.run()
Exemplo n.º 6
0
def main():
    plugin = Plugin(
        name="echo-sleeper",
        version=__version__,
        description="A plugin that's annoying AND lazy",
    )
    plugin.client = EchoSleeperClient()
    plugin.run()
Exemplo n.º 7
0
def main():
    plugin = Plugin(
        name="custom-display",
        version=__version__,
        description="Plugin that likes to play pretend",
    )
    plugin.client = CustomDisplayClient()
    plugin.run()
Exemplo n.º 8
0
def main():
    plugin = Plugin(
        name="error",
        version=__version__,
        description="All commands end in errors. There is no hope.",
    )
    plugin.client = ErrorClient()
    plugin.run()
Exemplo n.º 9
0
def main():
    plugin = Plugin(
        name="{{ cookiecutter.plugin_name }}",
        version=__version__,
        description="{{ cookiecutter.description }}",
    )
    plugin.client = Client()
    plugin.run()
Exemplo n.º 10
0
def main():
    plugin = Plugin(
        name="sleeper-solo",
        version=__version__,
        description="A singularly lazy plugin",
        max_concurrent=1,
    )
    plugin.client = SleeperClient()
    plugin.run()
Exemplo n.º 11
0
def main():
    plugin = Plugin(
        name="dynamic",
        version=__version__,
        description="Plugin that repeats very specific stuff",
    )

    # Change the deferred choices
    DynamicClient.DEFERRED_CHOICES = ["x", "y", "z"]

    plugin.client = DynamicClient()
    plugin.run()
Exemplo n.º 12
0
def main():
    Plugin(
        ChildClient(),
        name="child",
        version=__version__,
        namespace="child",
    ).run()
Exemplo n.º 13
0
def main():
    plugin = Plugin(
        name="complex",
        version=__version__,
        description="Plugin that shows all the cool things Beergarden can do",
    )

    parser = ArgumentParser()
    parser.add_argument("host")
    parser.add_argument("port")

    # Use parse_known_args to work with brewtils CLI arguments
    parsed, _ = parser.parse_known_args(sys.argv[1:])
    config = vars(parsed)

    plugin.client = ComplexClient(config["host"], config["port"])
    plugin.run()
Exemplo n.º 14
0
def main():
    connection_params = get_connection_info(sys.argv[1:])

    username = os.getenv("github_username")
    password = os.getenv("github_password")
    token = os.getenv("github_token")

    Plugin(GithubSummary(connection_params,
                         username=username,
                         password=password,
                         token=token),
           name="github-summary",
           version=__version__,
           **connection_params).run()
Exemplo n.º 15
0
def main():
    p = Plugin(name="file-bytes", version=__version__)
    p.client = FileBytesClient()
    p.run()
Exemplo n.º 16
0
from brewtils import system, parameter, Plugin
from CanvasApi import CanvasApi

if __name__ == "__main__":
    client = CanvasApi()

    plugin = Plugin(
        client,
        name="Canvas Debugger",
        version="1.0",
        bg_host='localhost',
        bg_port=2337,
        ssl_enabled=False,
    )
    plugin.run()
Exemplo n.º 17
0
def main():
    p = Plugin(name="deploy", version=__version__)
    p.client = DeployClient()
    p.run()
Exemplo n.º 18
0
import logging
from brewtils import system, command, parameter, Plugin

@system
class Calculator(object):

    @command
    @parameter(key='x', type=int)
    @parameter(key='y', type=int)
    def add(self, x, y):
        return x + y

if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    c = Calculator()
    p = Plugin(
        c,
        bg_host='localhost',
        bg_port=80,
        name='calc',
        version='0.0.1.dev',
        username='******',
        password='******',
        ssl_enabled=False,
        bg_url_prefix='/bg/'
    )
    p.run()