def main(): plugin = Plugin( name="nested-calls", version=__version__, description="A plugin that calls commands on itself", ) plugin.client = NestedCallClient() plugin.run()
def main(): plugin = Plugin( name="echo", version=__version__, description="Annoying plugin that just repeats stuff", ) plugin.client = EchoClient() plugin.run()
def main(): plugin = Plugin( name="parent", version=__version__, description="Issues commands to a different namespace", ) plugin.client = ParentClient() plugin.run()
def main(): plugin = Plugin( name="sleeper", version=__version__, description="A really lazy plugin", ) plugin.client = SleeperClient() plugin.run()
def main(): plugin = Plugin( name="echo-sleeper", version=__version__, description="A plugin that's annoying AND lazy", ) plugin.client = EchoSleeperClient() plugin.run()
def main(): plugin = Plugin( name="custom-display", version=__version__, description="Plugin that likes to play pretend", ) plugin.client = CustomDisplayClient() plugin.run()
def main(): plugin = Plugin( name="error", version=__version__, description="All commands end in errors. There is no hope.", ) plugin.client = ErrorClient() plugin.run()
def main(): plugin = Plugin( name="{{ cookiecutter.plugin_name }}", version=__version__, description="{{ cookiecutter.description }}", ) plugin.client = Client() plugin.run()
def main(): plugin = Plugin( name="dynamic", version=__version__, description="Plugin that repeats very specific stuff", ) plugin.client = DynamicClient() plugin.run()
def main(): plugin = Plugin( name="sleeper-solo", version=__version__, description="A singularly lazy plugin", max_concurrent=1, ) plugin.client = SleeperClient() plugin.run()
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()
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()
def main(): p = Plugin(name="file-bytes", version=__version__) p.client = FileBytesClient() p.run()
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()
def main(): p = Plugin(name="deploy", version=__version__) p.client = DeployClient() p.run()
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()