diff --git a/mistralclient/commands/v2/action_executions.py b/mistralclient/commands/v2/action_executions.py index 6878fe34..5819f699 100644 --- a/mistralclient/commands/v2/action_executions.py +++ b/mistralclient/commands/v2/action_executions.py @@ -17,8 +17,7 @@ import json import logging -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -60,7 +59,7 @@ def format(action_ex=None, lister=False): return columns, data -class Create(show.ShowOne): +class Create(command.ShowOne): """Create new Action execution or just run specific action.""" def produce_output(self, parsed_args, column_names, data): @@ -156,7 +155,7 @@ class List(base.MistralLister): ) -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific Action execution.""" def get_parser(self, prog_name): @@ -174,7 +173,7 @@ class Get(show.ShowOne): return format(execution) -class Update(show.ShowOne): +class Update(command.ShowOne): """Update specific Action execution.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/actions.py b/mistralclient/commands/v2/actions.py index 5cbd42a0..1754fa78 100644 --- a/mistralclient/commands/v2/actions.py +++ b/mistralclient/commands/v2/actions.py @@ -17,8 +17,7 @@ import argparse import logging -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -78,7 +77,7 @@ class List(base.MistralLister): return mistral_client.actions.list() -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific action.""" def get_parser(self, prog_name): @@ -203,7 +202,7 @@ class GetDefinition(command.Command): self.app.stdout.write(definition or "\n") -class Validate(show.ShowOne): +class Validate(command.ShowOne): """Validate action.""" def _format(self, result=None): diff --git a/mistralclient/commands/v2/base.py b/mistralclient/commands/v2/base.py index f1661f90..1d953f15 100644 --- a/mistralclient/commands/v2/base.py +++ b/mistralclient/commands/v2/base.py @@ -17,12 +17,12 @@ import abc import textwrap -from cliff import lister +from osc_lib.command import command import six @six.add_metaclass(abc.ABCMeta) -class MistralLister(lister.Lister): +class MistralLister(command.Lister): @abc.abstractmethod def _get_format_function(self): raise NotImplementedError diff --git a/mistralclient/commands/v2/cron_triggers.py b/mistralclient/commands/v2/cron_triggers.py index 5a067aa9..cb8ca29c 100644 --- a/mistralclient/commands/v2/cron_triggers.py +++ b/mistralclient/commands/v2/cron_triggers.py @@ -17,8 +17,7 @@ import json import logging -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -82,7 +81,7 @@ class List(base.MistralLister): return mistral_client.cron_triggers.list() -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific cron trigger.""" def get_parser(self, prog_name): @@ -98,7 +97,7 @@ class Get(show.ShowOne): return format(mistral_client.cron_triggers.get(parsed_args.name)) -class Create(show.ShowOne): +class Create(command.ShowOne): """Create new trigger.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/environments.py b/mistralclient/commands/v2/environments.py index 3a145c0d..48e5fcf2 100644 --- a/mistralclient/commands/v2/environments.py +++ b/mistralclient/commands/v2/environments.py @@ -16,8 +16,7 @@ import argparse import json import logging -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -99,7 +98,7 @@ class List(base.MistralLister): return mistral_client.environments.list() -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific environment.""" def get_parser(self, prog_name): @@ -119,7 +118,7 @@ class Get(show.ShowOne): return format(environment) -class Create(show.ShowOne): +class Create(command.ShowOne): """Create new environment.""" def get_parser(self, prog_name): @@ -163,7 +162,7 @@ class Delete(command.Command): ) -class Update(show.ShowOne): +class Update(command.ShowOne): """Update environment.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/executions.py b/mistralclient/commands/v2/executions.py index 5c1bc807..be0d61cc 100644 --- a/mistralclient/commands/v2/executions.py +++ b/mistralclient/commands/v2/executions.py @@ -19,8 +19,7 @@ import json import logging import os.path -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -119,7 +118,7 @@ class List(base.MistralLister): ) -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific execution.""" def get_parser(self, prog_name): @@ -136,7 +135,7 @@ class Get(show.ShowOne): return format(execution) -class Create(show.ShowOne): +class Create(command.ShowOne): """Create new execution.""" def get_parser(self, prog_name): @@ -221,7 +220,7 @@ class Delete(command.Command): ) -class Update(show.ShowOne): +class Update(command.ShowOne): """Update execution.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/members.py b/mistralclient/commands/v2/members.py index 08b76cb9..bdafd027 100644 --- a/mistralclient/commands/v2/members.py +++ b/mistralclient/commands/v2/members.py @@ -13,8 +13,7 @@ # under the License. # -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import exceptions @@ -83,7 +82,7 @@ class List(base.MistralLister): ) -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific member information.""" def get_parser(self, prog_name): @@ -118,7 +117,7 @@ class Get(show.ShowOne): return format(member) -class Create(show.ShowOne): +class Create(command.ShowOne): """Shares a resource to another tenant.""" def get_parser(self, prog_name): @@ -192,7 +191,7 @@ class Delete(command.Command): raise exceptions.MistralClientException(error_msg) -class Update(show.ShowOne): +class Update(command.ShowOne): """Update resource sharing status.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/tasks.py b/mistralclient/commands/v2/tasks.py index 207c4eba..96d10df8 100644 --- a/mistralclient/commands/v2/tasks.py +++ b/mistralclient/commands/v2/tasks.py @@ -19,8 +19,7 @@ import json import logging import os.path -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -80,7 +79,7 @@ class List(base.MistralLister): return mistral_client.tasks.list(parsed_args.workflow_execution) -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific task.""" def get_parser(self, prog_name): @@ -145,7 +144,7 @@ class GetPublished(command.Command): self.app.stdout.write(result or "\n") -class Rerun(show.ShowOne): +class Rerun(command.ShowOne): """Rerun an existing task.""" def get_parser(self, prog_name): diff --git a/mistralclient/commands/v2/workbooks.py b/mistralclient/commands/v2/workbooks.py index af8f8f04..8c8b57cf 100644 --- a/mistralclient/commands/v2/workbooks.py +++ b/mistralclient/commands/v2/workbooks.py @@ -16,8 +16,7 @@ import argparse import logging -from cliff import command -from cliff import show +from osc_lib.command import command from mistralclient.commands.v2 import base from mistralclient import utils @@ -63,7 +62,7 @@ class List(base.MistralLister): return mistral_client.workbooks.list() -class Get(show.ShowOne): +class Get(command.ShowOne): """Show specific workbook.""" def get_parser(self, prog_name): @@ -83,7 +82,7 @@ class Get(show.ShowOne): return format(workbook) -class Create(show.ShowOne): +class Create(command.ShowOne): """Create new workbook.""" def get_parser(self, prog_name): @@ -126,7 +125,7 @@ class Delete(command.Command): ) -class Update(show.ShowOne): +class Update(command.ShowOne): """Update workbook.""" def get_parser(self, prog_name): @@ -166,7 +165,7 @@ class GetDefinition(command.Command): self.app.stdout.write(definition or "\n") -class Validate(show.ShowOne): +class Validate(command.ShowOne): """Validate workbook.""" def _format(self, result=None): diff --git a/mistralclient/shell.py b/mistralclient/shell.py index fa555ad7..69bcf409 100644 --- a/mistralclient/shell.py +++ b/mistralclient/shell.py @@ -33,8 +33,8 @@ import mistralclient.commands.v2.workflows from mistralclient.openstack.common import cliutils as c from cliff import app -from cliff import command from cliff import commandmanager +from osc_lib.command import command import argparse