Commit 24e08881 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[protocoltemplates] Port to AssetCommand

parent e786ffe1
......@@ -40,6 +40,8 @@ import logging
from . import commands
from .click_helper import AliasedGroup
from .click_helper import AssetCommand
from .click_helper import AssetInfo
logger = logging.getLogger(__name__)
......@@ -48,14 +50,16 @@ logger = logging.getLogger(__name__)
# ----------------------------------------------------------
class ProtocolTemplateCommand(AssetCommand):
asset_info = AssetInfo(asset_type="protocoltemplate")
@click.group(cls=AliasedGroup)
@click.pass_context
def protocoltemplates(ctx):
"""Protocol template commands"""
ctx.meta["asset_type"] = "protocoltemplate"
CMD_LIST = ["list", "path", "edit", "check", "create", "version", ("rm", "rm_local")]
commands.initialise_asset_commands(protocoltemplates, CMD_LIST)
commands.initialise_asset_commands(protocoltemplates, CMD_LIST, ProtocolTemplateCommand)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment