Skip to content

Commit 30f3192

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add custom command classes"
2 parents cc36d92 + 3cd544d commit 30f3192

File tree

134 files changed

+167
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+167
-141
lines changed

openstackclient/command.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from cliff import lister
14+
from cliff import show
15+
from osc_lib.command import command
16+
17+
from openstackclient import shell
18+
19+
20+
class Command(command.Command):
21+
app: shell.OpenStackShell
22+
23+
24+
class Lister(Command, lister.Lister): ...
25+
26+
27+
class ShowOne(Command, show.ShowOne): ...

openstackclient/common/availability_zone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import logging
1818

1919
from openstack import exceptions as sdk_exceptions
20-
from osc_lib.command import command
2120
from osc_lib import utils
2221

22+
from openstackclient import command
2323
from openstackclient.i18n import _
2424

2525

openstackclient/common/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"""Configuration action implementations"""
1515

1616
from keystoneauth1.loading import base
17-
from osc_lib.command import command
1817

18+
from openstackclient import command
1919
from openstackclient.i18n import _
2020

2121
REDACTED = "<redacted>"

openstackclient/common/extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
import logging
1919

20-
from osc_lib.command import command
2120
from osc_lib import utils
2221

22+
from openstackclient import command
2323
from openstackclient.i18n import _
2424

2525
LOG = logging.getLogger(__name__)

openstackclient/common/limits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
import itertools
1919

20-
from osc_lib.command import command
2120
from osc_lib import utils
2221

22+
from openstackclient import command
2323
from openstackclient.i18n import _
2424
from openstackclient.identity import common as identity_common
2525

openstackclient/common/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
import sys
1919

20-
from osc_lib.command import command
2120
from osc_lib import utils
2221

22+
from openstackclient import command
2323
from openstackclient.i18n import _
2424

2525

openstackclient/common/project_cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import typing as ty
2121

2222
from cliff.formatters import table
23-
from osc_lib.command import command
2423

24+
from openstackclient import command
2525
from openstackclient.i18n import _
2626
from openstackclient.identity import common as identity_common
2727

openstackclient/common/quota.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import typing as ty
2222

2323
from openstack import exceptions as sdk_exceptions
24-
from osc_lib.command import command
2524
from osc_lib import exceptions
2625
from osc_lib import utils
2726

27+
from openstackclient import command
2828
from openstackclient.i18n import _
2929
from openstackclient.network import common
3030

openstackclient/common/versions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
"""Versions Action Implementation"""
1616

17-
from osc_lib.command import command
18-
17+
from openstackclient import command
1918
from openstackclient.i18n import _
2019

2120

openstackclient/compute/v2/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import logging
1919

2020
from openstack import exceptions as sdk_exceptions
21-
from osc_lib.command import command
2221
from osc_lib import exceptions
2322
from osc_lib import utils
2423

24+
from openstackclient import command
2525
from openstackclient.i18n import _
2626

2727

0 commit comments

Comments
 (0)