We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
st2 action-alias -h reports incorrect help
The output of `st2 action-alias -h` contains references to managing runners. Looks like something is a little bit messed up somewhere, maybe related to introduction of pluggable runners?

```
brocade@bwc-2:~$ st2 --version
st2 2.1.0
brocade@bwc-2:~$ st2 action-alias -h
usage: st2 action-alias [-h] {list,get,create,update,delete,match,execute} ...

Action aliases.

positional arguments:
  {list,get,create,update,delete,match,execute}
                        List of commands for managing runners.
    list                Get the list of runners.
    get                 Get individual action alias.
    create              Create a new action alias.
    update              Updating an existing action alias.
    delete              Delete an existing action alias.
    match               Get the list of runners that match the command text.
    execute             Execute the command text by finding a matching
                        ActionAlias.

optional arguments:
  -h, --help            show this help message and exit
brocade@bwc-2:~$
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `st2client/st2client/models/action_alias.py`
Content:
```
1 # Licensed to the StackStorm, Inc ('StackStorm') under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 from st2client.models import core
17 
18 __all__ = [
19     'ActionAlias',
20     'ActionAliasMatch'
21 ]
22 
23 
24 class ActionAlias(core.Resource):
25     _alias = 'Action-Alias'
26     _display_name = 'Action Alias'
27     _plural = 'ActionAliases'
28     _plural_display_name = 'Runners'
29     _url_path = 'actionalias'
30     _repr_attributes = ['name', 'pack', 'action_ref']
31 
32 
33 class ActionAliasMatch(core.Resource):
34     _alias = 'Action-Alias-Match'
35     _display_name = 'ActionAlias Match'
36     _plural = 'ActionAliasMatches'
37     _plural_display_name = 'Action Alias Matches'
38     _url_path = 'actionalias'
39     _repr_attributes = ['command']
40
```

Path: `st2client/st2client/commands/action_alias.py`
Content:
```
1 # Licensed to the StackStorm, Inc ('StackStorm') under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 from st2client.models.action_alias import ActionAlias
17 from st2client.models.action_alias import ActionAliasMatch
18 from st2client.models.aliasexecution import ActionAliasExecution
19 from st2client.commands import resource
20 from st2client.formatters import table
21 
22 __all__ = [
23     'ActionAliasBranch',
24     'ActionAliasMatchCommand',
25     'ActionAliasExecuteCommand'
26 ]
27 
28 
29 class ActionAliasBranch(resource.ResourceBranch):
30     def __init__(self, description, app, subparsers, parent_parser=None):
31         super(ActionAliasBranch, self).__init__(
32             ActionAlias, description, app, subparsers,
33             parent_parser=parent_parser, read_only=False,
34             commands={
35                 'list': ActionAliasListCommand,
36                 'get': ActionAliasGetCommand
37             })
38 
39         self.commands['match'] = ActionAliasMatchCommand(
40             self.resource, self.app, self.subparsers,
41             add_help=False)
42         self.commands['execute'] = ActionAliasExecuteCommand(
43             self.resource, self.app, self.subparsers,
44             add_help=False)
45 
46 
47 class ActionAliasListCommand(resource.ContentPackResourceListCommand):
48     display_attributes = ['ref', 'pack', 'description', 'enabled']
49 
50 
51 class ActionAliasGetCommand(resource.ContentPackResourceGetCommand):
52     display_attributes = ['all']
53     attribute_display_order = ['id', 'ref', 'pack', 'name', 'description',
54                                'enabled', 'action_ref', 'formats']
55 
56 
57 class ActionAliasMatchCommand(resource.ResourceCommand):
58     display_attributes = ['name', 'description']
59 
60     def __init__(self, resource, *args, **kwargs):
61         super(ActionAliasMatchCommand, self).__init__(
62             resource, 'match',
63             'Get the list of %s that match the command text.' %
64             resource.get_plural_display_name().lower(),
65             *args, **kwargs)
66 
67         self.parser.add_argument('match_text',
68                                  metavar='command',
69                                  help=help)
70 
71         self.parser.add_argument('-a', '--attr', nargs='+',
72                                  default=self.display_attributes,
73                                  help=('List of attributes to include in the '
74                                        'output. "all" will return all '
75                                        'attributes.'))
76         self.parser.add_argument('-w', '--width', nargs='+', type=int,
77                                  default=None,
78                                  help=('Set the width of columns in output.'))
79 
80     @resource.add_auth_token_to_kwargs_from_cli
81     def run(self, args, **kwargs):
82         alias_match = ActionAliasMatch()
83         alias_match.command = args.match_text
84 
85         match, _ = self.manager.match(alias_match, **kwargs)
86         return [match]
87 
88     def run_and_print(self, args, **kwargs):
89         instances = self.run(args, **kwargs)
90         self.print_output(instances, table.MultiColumnTable,
91                           attributes=args.attr, widths=args.width,
92                           json=args.json, yaml=args.yaml)
93 
94 
95 class ActionAliasExecuteCommand(resource.ResourceCommand):
96     display_attributes = ['name']
97 
98     def __init__(self, resource, *args, **kwargs):
99         super(ActionAliasExecuteCommand, self).__init__(
100             resource, 'execute',
101             'Execute the command text by finding a matching ActionAlias.',
102             *args, **kwargs)
103 
104         self.parser.add_argument('command_text',
105                                  metavar='command',
106                                  help=help)
107         self.parser.add_argument('-h', '--help',
108                                  action='store_true', dest='help',
109                                  help='Print usage for the given action.')
110         self.parser.add_argument('--trace-tag', '--trace_tag',
111                                  help='A trace tag string to track execution later.',
112                                  dest='trace_tag', required=False)
113         self.parser.add_argument('--trace-id',
114                                  help='Existing trace id for this execution.',
115                                  dest='trace_id', required=False)
116         self.parser.add_argument('-a', '--async',
117                                  action='store_true', dest='async',
118                                  help='Do not wait for action to finish.')
119         self.parser.add_argument('-u', '--user', type=str, default=None,
120                                  help='User under which to run the action (admins only).')
121 
122         self.parser.add_argument('--attr', nargs='+',
123                                  default=self.display_attributes,
124                                  help=('List of attributes to include in the '
125                                        'output. "all" will return all '
126                                        'attributes.'))
127         self.parser.add_argument('-w', '--width', nargs='+', type=int,
128                                  default=None,
129                                  help=('Set the width of columns in output.'))
130 
131     @resource.add_auth_token_to_kwargs_from_cli
132     def run(self, args, **kwargs):
133         alias_match = ActionAliasMatch()
134         alias_match.command = args.command_text
135 
136         action_alias, representation = self.manager.match(alias_match, **kwargs)
137 
138         execution = ActionAliasExecution()
139         execution.name = action_alias.name
140         execution.format = representation
141         execution.command = args.command_text
142         execution.source_channel = 'cli'  # ?
143         execution.notification_channel = None
144         execution.notification_route = None
145         execution.user = args.user
146 
147         action_exec_mgr = self.app.client.managers['ActionAliasExecution']
148 
149         execution = action_exec_mgr.create(execution, **kwargs)
150         return execution
151 
152     def run_and_print(self, args, **kwargs):
153         execution = self.run(args, **kwargs)
154         print("Started execution, id '%s'" % execution.execution['id'])
155         print(execution.message)
156
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/st2client/st2client/commands/action_alias.py b/st2client/st2client/commands/action_alias.py
--- a/st2client/st2client/commands/action_alias.py
+++ b/st2client/st2client/commands/action_alias.py
@@ -98,7 +98,8 @@
     def __init__(self, resource, *args, **kwargs):
         super(ActionAliasExecuteCommand, self).__init__(
             resource, 'execute',
-            'Execute the command text by finding a matching ActionAlias.',
+            ('Execute the command text by finding a matching %s.' %
+            resource.get_display_name().lower()),
             *args, **kwargs)
 
         self.parser.add_argument('command_text',
diff --git a/st2client/st2client/models/action_alias.py b/st2client/st2client/models/action_alias.py
--- a/st2client/st2client/models/action_alias.py
+++ b/st2client/st2client/models/action_alias.py
@@ -25,7 +25,7 @@
     _alias = 'Action-Alias'
     _display_name = 'Action Alias'
     _plural = 'ActionAliases'
-    _plural_display_name = 'Runners'
+    _plural_display_name = 'Action Aliases'
     _url_path = 'actionalias'
     _repr_attributes = ['name', 'pack', 'action_ref']

{"golden_diff": "diff --git a/st2client/st2client/commands/action_alias.py b/st2client/st2client/commands/action_alias.py\n--- a/st2client/st2client/commands/action_alias.py\n+++ b/st2client/st2client/commands/action_alias.py\n@@ -98,7 +98,8 @@\n     def __init__(self, resource, *args, **kwargs):\n         super(ActionAliasExecuteCommand, self).__init__(\n             resource, 'execute',\n-            'Execute the command text by finding a matching ActionAlias.',\n+            ('Execute the command text by finding a matching %s.' %\n+            resource.get_display_name().lower()),\n             *args, **kwargs)\n \n         self.parser.add_argument('command_text',\ndiff --git a/st2client/st2client/models/action_alias.py b/st2client/st2client/models/action_alias.py\n--- a/st2client/st2client/models/action_alias.py\n+++ b/st2client/st2client/models/action_alias.py\n@@ -25,7 +25,7 @@\n     _alias = 'Action-Alias'\n     _display_name = 'Action Alias'\n     _plural = 'ActionAliases'\n-    _plural_display_name = 'Runners'\n+    _plural_display_name = 'Action Aliases'\n     _url_path = 'actionalias'\n     _repr_attributes = ['name', 'pack', 'action_ref']\n", "issue": "st2 action-alias -h reports incorrect help\nThe output of `st2 action-alias -h` contains references to managing runners. Looks like something is a little bit messed up somewhere, maybe related to introduction of pluggable runners?\r\n\r\n```\r\nbrocade@bwc-2:~$ st2 --version\r\nst2 2.1.0\r\nbrocade@bwc-2:~$ st2 action-alias -h\r\nusage: st2 action-alias [-h] {list,get,create,update,delete,match,execute} ...\r\n\r\nAction aliases.\r\n\r\npositional arguments:\r\n  {list,get,create,update,delete,match,execute}\r\n                        List of commands for managing runners.\r\n    list                Get the list of runners.\r\n    get                 Get individual action alias.\r\n    create              Create a new action alias.\r\n    update              Updating an existing action alias.\r\n    delete              Delete an existing action alias.\r\n    match               Get the list of runners that match the command text.\r\n    execute             Execute the command text by finding a matching\r\n                        ActionAlias.\r\n\r\noptional arguments:\r\n  -h, --help            show this help message and exit\r\nbrocade@bwc-2:~$\r\n```\n", "before_files": [{"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom st2client.models import core\n\n__all__ = [\n    'ActionAlias',\n    'ActionAliasMatch'\n]\n\n\nclass ActionAlias(core.Resource):\n    _alias = 'Action-Alias'\n    _display_name = 'Action Alias'\n    _plural = 'ActionAliases'\n    _plural_display_name = 'Runners'\n    _url_path = 'actionalias'\n    _repr_attributes = ['name', 'pack', 'action_ref']\n\n\nclass ActionAliasMatch(core.Resource):\n    _alias = 'Action-Alias-Match'\n    _display_name = 'ActionAlias Match'\n    _plural = 'ActionAliasMatches'\n    _plural_display_name = 'Action Alias Matches'\n    _url_path = 'actionalias'\n    _repr_attributes = ['command']\n", "path": "st2client/st2client/models/action_alias.py"}, {"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom st2client.models.action_alias import ActionAlias\nfrom st2client.models.action_alias import ActionAliasMatch\nfrom st2client.models.aliasexecution import ActionAliasExecution\nfrom st2client.commands import resource\nfrom st2client.formatters import table\n\n__all__ = [\n    'ActionAliasBranch',\n    'ActionAliasMatchCommand',\n    'ActionAliasExecuteCommand'\n]\n\n\nclass ActionAliasBranch(resource.ResourceBranch):\n    def __init__(self, description, app, subparsers, parent_parser=None):\n        super(ActionAliasBranch, self).__init__(\n            ActionAlias, description, app, subparsers,\n            parent_parser=parent_parser, read_only=False,\n            commands={\n                'list': ActionAliasListCommand,\n                'get': ActionAliasGetCommand\n            })\n\n        self.commands['match'] = ActionAliasMatchCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n        self.commands['execute'] = ActionAliasExecuteCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n\n\nclass ActionAliasListCommand(resource.ContentPackResourceListCommand):\n    display_attributes = ['ref', 'pack', 'description', 'enabled']\n\n\nclass ActionAliasGetCommand(resource.ContentPackResourceGetCommand):\n    display_attributes = ['all']\n    attribute_display_order = ['id', 'ref', 'pack', 'name', 'description',\n                               'enabled', 'action_ref', 'formats']\n\n\nclass ActionAliasMatchCommand(resource.ResourceCommand):\n    display_attributes = ['name', 'description']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasMatchCommand, self).__init__(\n            resource, 'match',\n            'Get the list of %s that match the command text.' %\n            resource.get_plural_display_name().lower(),\n            *args, **kwargs)\n\n        self.parser.add_argument('match_text',\n                                 metavar='command',\n                                 help=help)\n\n        self.parser.add_argument('-a', '--attr', nargs='+',\n                                 default=self.display_attributes,\n                                 help=('List of attributes to include in the '\n                                       'output. \"all\" will return all '\n                                       'attributes.'))\n        self.parser.add_argument('-w', '--width', nargs='+', type=int,\n                                 default=None,\n                                 help=('Set the width of columns in output.'))\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        alias_match = ActionAliasMatch()\n        alias_match.command = args.match_text\n\n        match, _ = self.manager.match(alias_match, **kwargs)\n        return [match]\n\n    def run_and_print(self, args, **kwargs):\n        instances = self.run(args, **kwargs)\n        self.print_output(instances, table.MultiColumnTable,\n                          attributes=args.attr, widths=args.width,\n                          json=args.json, yaml=args.yaml)\n\n\nclass ActionAliasExecuteCommand(resource.ResourceCommand):\n    display_attributes = ['name']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasExecuteCommand, self).__init__(\n            resource, 'execute',\n            'Execute the command text by finding a matching ActionAlias.',\n            *args, **kwargs)\n\n        self.parser.add_argument('command_text',\n                                 metavar='command',\n                                 help=help)\n        self.parser.add_argument('-h', '--help',\n                                 action='store_true', dest='help',\n                                 help='Print usage for the given action.')\n        self.parser.add_argument('--trace-tag', '--trace_tag',\n                                 help='A trace tag string to track execution later.',\n                                 dest='trace_tag', required=False)\n        self.parser.add_argument('--trace-id',\n                                 help='Existing trace id for this execution.',\n                                 dest='trace_id', required=False)\n        self.parser.add_argument('-a', '--async',\n                                 action='store_true', dest='async',\n                                 help='Do not wait for action to finish.')\n        self.parser.add_argument('-u', '--user', type=str, default=None,\n                                 help='User under which to run the action (admins only).')\n\n        self.parser.add_argument('--attr', nargs='+',\n                                 default=self.display_attributes,\n                                 help=('List of attributes to include in the '\n                                       'output. \"all\" will return all '\n                                       'attributes.'))\n        self.parser.add_argument('-w', '--width', nargs='+', type=int,\n                                 default=None,\n                                 help=('Set the width of columns in output.'))\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        alias_match = ActionAliasMatch()\n        alias_match.command = args.command_text\n\n        action_alias, representation = self.manager.match(alias_match, **kwargs)\n\n        execution = ActionAliasExecution()\n        execution.name = action_alias.name\n        execution.format = representation\n        execution.command = args.command_text\n        execution.source_channel = 'cli'  # ?\n        execution.notification_channel = None\n        execution.notification_route = None\n        execution.user = args.user\n\n        action_exec_mgr = self.app.client.managers['ActionAliasExecution']\n\n        execution = action_exec_mgr.create(execution, **kwargs)\n        return execution\n\n    def run_and_print(self, args, **kwargs):\n        execution = self.run(args, **kwargs)\n        print(\"Started execution, id '%s'\" % execution.execution['id'])\n        print(execution.message)\n", "path": "st2client/st2client/commands/action_alias.py"}], "after_files": [{"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom st2client.models import core\n\n__all__ = [\n    'ActionAlias',\n    'ActionAliasMatch'\n]\n\n\nclass ActionAlias(core.Resource):\n    _alias = 'Action-Alias'\n    _display_name = 'Action Alias'\n    _plural = 'ActionAliases'\n    _plural_display_name = 'Action Aliases'\n    _url_path = 'actionalias'\n    _repr_attributes = ['name', 'pack', 'action_ref']\n\n\nclass ActionAliasMatch(core.Resource):\n    _alias = 'Action-Alias-Match'\n    _display_name = 'ActionAlias Match'\n    _plural = 'ActionAliasMatches'\n    _plural_display_name = 'Action Alias Matches'\n    _url_path = 'actionalias'\n    _repr_attributes = ['command']\n", "path": "st2client/st2client/models/action_alias.py"}, {"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom st2client.models.action_alias import ActionAlias\nfrom st2client.models.action_alias import ActionAliasMatch\nfrom st2client.models.aliasexecution import ActionAliasExecution\nfrom st2client.commands import resource\nfrom st2client.formatters import table\n\n__all__ = [\n    'ActionAliasBranch',\n    'ActionAliasMatchCommand',\n    'ActionAliasExecuteCommand'\n]\n\n\nclass ActionAliasBranch(resource.ResourceBranch):\n    def __init__(self, description, app, subparsers, parent_parser=None):\n        super(ActionAliasBranch, self).__init__(\n            ActionAlias, description, app, subparsers,\n            parent_parser=parent_parser, read_only=False,\n            commands={\n                'list': ActionAliasListCommand,\n                'get': ActionAliasGetCommand\n            })\n\n        self.commands['match'] = ActionAliasMatchCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n        self.commands['execute'] = ActionAliasExecuteCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n\n\nclass ActionAliasListCommand(resource.ContentPackResourceListCommand):\n    display_attributes = ['ref', 'pack', 'description', 'enabled']\n\n\nclass ActionAliasGetCommand(resource.ContentPackResourceGetCommand):\n    display_attributes = ['all']\n    attribute_display_order = ['id', 'ref', 'pack', 'name', 'description',\n                               'enabled', 'action_ref', 'formats']\n\n\nclass ActionAliasMatchCommand(resource.ResourceCommand):\n    display_attributes = ['name', 'description']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasMatchCommand, self).__init__(\n            resource, 'match',\n            'Get the list of %s that match the command text.' %\n            resource.get_plural_display_name().lower(),\n            *args, **kwargs)\n\n        self.parser.add_argument('match_text',\n                                 metavar='command',\n                                 help=help)\n\n        self.parser.add_argument('-a', '--attr', nargs='+',\n                                 default=self.display_attributes,\n                                 help=('List of attributes to include in the '\n                                       'output. \"all\" will return all '\n                                       'attributes.'))\n        self.parser.add_argument('-w', '--width', nargs='+', type=int,\n                                 default=None,\n                                 help=('Set the width of columns in output.'))\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        alias_match = ActionAliasMatch()\n        alias_match.command = args.match_text\n\n        match, _ = self.manager.match(alias_match, **kwargs)\n        return [match]\n\n    def run_and_print(self, args, **kwargs):\n        instances = self.run(args, **kwargs)\n        self.print_output(instances, table.MultiColumnTable,\n                          attributes=args.attr, widths=args.width,\n                          json=args.json, yaml=args.yaml)\n\n\nclass ActionAliasExecuteCommand(resource.ResourceCommand):\n    display_attributes = ['name']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasExecuteCommand, self).__init__(\n            resource, 'execute',\n            ('Execute the command text by finding a matching %s.' %\n            resource.get_display_name().lower()),\n            *args, **kwargs)\n\n        self.parser.add_argument('command_text',\n                                 metavar='command',\n                                 help=help)\n        self.parser.add_argument('-h', '--help',\n                                 action='store_true', dest='help',\n                                 help='Print usage for the given action.')\n        self.parser.add_argument('--trace-tag', '--trace_tag',\n                                 help='A trace tag string to track execution later.',\n                                 dest='trace_tag', required=False)\n        self.parser.add_argument('--trace-id',\n                                 help='Existing trace id for this execution.',\n                                 dest='trace_id', required=False)\n        self.parser.add_argument('-a', '--async',\n                                 action='store_true', dest='async',\n                                 help='Do not wait for action to finish.')\n        self.parser.add_argument('-u', '--user', type=str, default=None,\n                                 help='User under which to run the action (admins only).')\n\n        self.parser.add_argument('--attr', nargs='+',\n                                 default=self.display_attributes,\n                                 help=('List of attributes to include in the '\n                                       'output. \"all\" will return all '\n                                       'attributes.'))\n        self.parser.add_argument('-w', '--width', nargs='+', type=int,\n                                 default=None,\n                                 help=('Set the width of columns in output.'))\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        alias_match = ActionAliasMatch()\n        alias_match.command = args.command_text\n\n        action_alias, representation = self.manager.match(alias_match, **kwargs)\n\n        execution = ActionAliasExecution()\n        execution.name = action_alias.name\n        execution.format = representation\n        execution.command = args.command_text\n        execution.source_channel = 'cli'  # ?\n        execution.notification_channel = None\n        execution.notification_route = None\n        execution.user = args.user\n\n        action_exec_mgr = self.app.client.managers['ActionAliasExecution']\n\n        execution = action_exec_mgr.create(execution, **kwargs)\n        return execution\n\n    def run_and_print(self, args, **kwargs):\n        execution = self.run(args, **kwargs)\n        print(\"Started execution, id '%s'\" % execution.execution['id'])\n        print(execution.message)\n", "path": "st2client/st2client/commands/action_alias.py"}]}