Use osc_lib instead of cliff
Base classes of commands are defined in cliff, but have been encapsulated again in osc-lib for all plugin clients. So use osc-lib instead of cliff. Since osc-lib 1.0.2 has released, it is stable to use. Change-Id: I0b9bf1c867be0181d573decadc840a887a784ca9
This commit is contained in:
parent
5e04d15a5a
commit
0a0e15141f
@ -18,10 +18,8 @@ import argparse
|
|||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from cliff import command
|
|
||||||
from cliff import lister
|
|
||||||
from cliff import show
|
|
||||||
from openstackclient.common import utils as oscutils
|
from openstackclient.common import utils as oscutils
|
||||||
|
from osc_lib.command import command
|
||||||
|
|
||||||
from ironicclient.common.i18n import _
|
from ironicclient.common.i18n import _
|
||||||
from ironicclient.common import utils
|
from ironicclient.common import utils
|
||||||
@ -105,7 +103,7 @@ class CleanBaremetalNode(ProvisionStateBaremetalNode):
|
|||||||
cleansteps=clean_steps)
|
cleansteps=clean_steps)
|
||||||
|
|
||||||
|
|
||||||
class CreateBaremetalNode(show.ShowOne):
|
class CreateBaremetalNode(command.ShowOne):
|
||||||
"""Register a new node with the baremetal service"""
|
"""Register a new node with the baremetal service"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".CreateBaremetalNode")
|
log = logging.getLogger(__name__ + ".CreateBaremetalNode")
|
||||||
@ -265,7 +263,7 @@ class InspectBaremetalNode(ProvisionStateBaremetalNode):
|
|||||||
PROVISION_STATE = 'inspect'
|
PROVISION_STATE = 'inspect'
|
||||||
|
|
||||||
|
|
||||||
class ListBaremetalNode(lister.Lister):
|
class ListBaremetalNode(command.Lister):
|
||||||
"""List baremetal nodes"""
|
"""List baremetal nodes"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".ListBaremetalNode")
|
log = logging.getLogger(__name__ + ".ListBaremetalNode")
|
||||||
@ -656,7 +654,7 @@ class SetBaremetal(SetBaremetalNode):
|
|||||||
return super(SetBaremetal, self).take_action(parsed_args)
|
return super(SetBaremetal, self).take_action(parsed_args)
|
||||||
|
|
||||||
|
|
||||||
class ShowBaremetalNode(show.ShowOne):
|
class ShowBaremetalNode(command.ShowOne):
|
||||||
"""Show baremetal node details"""
|
"""Show baremetal node details"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".ShowBaremetalNode")
|
log = logging.getLogger(__name__ + ".ShowBaremetalNode")
|
||||||
|
@ -17,14 +17,13 @@
|
|||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from cliff import command
|
from osc_lib.command import command
|
||||||
from cliff import show
|
|
||||||
|
|
||||||
from ironicclient.common import utils
|
from ironicclient.common import utils
|
||||||
from ironicclient.v1 import resource_fields as res_fields
|
from ironicclient.v1 import resource_fields as res_fields
|
||||||
|
|
||||||
|
|
||||||
class CreateBaremetalPort(show.ShowOne):
|
class CreateBaremetalPort(command.ShowOne):
|
||||||
"""Create a new port"""
|
"""Create a new port"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".CreateBaremetalPort")
|
log = logging.getLogger(__name__ + ".CreateBaremetalPort")
|
||||||
@ -104,7 +103,7 @@ class CreateBaremetalPort(show.ShowOne):
|
|||||||
return self.dict2columns(data)
|
return self.dict2columns(data)
|
||||||
|
|
||||||
|
|
||||||
class ShowBaremetalPort(show.ShowOne):
|
class ShowBaremetalPort(command.ShowOne):
|
||||||
"""Show baremetal port details."""
|
"""Show baremetal port details."""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".ShowBaremetalPort")
|
log = logging.getLogger(__name__ + ".ShowBaremetalPort")
|
||||||
|
4
releasenotes/notes/osc-lib-090d62f647b9d58b.yaml
Normal file
4
releasenotes/notes/osc-lib-090d62f647b9d58b.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- osc-lib is a package of common support modules for writing OSC plugins.
|
||||||
|
So use osc-lib instead of cliff.
|
@ -4,9 +4,9 @@
|
|||||||
pbr>=1.6 # Apache-2.0
|
pbr>=1.6 # Apache-2.0
|
||||||
appdirs>=1.3.0 # MIT License
|
appdirs>=1.3.0 # MIT License
|
||||||
dogpile.cache>=0.6.1 # BSD
|
dogpile.cache>=0.6.1 # BSD
|
||||||
cliff!=1.16.0,!=1.17.0,>=1.15.0 # Apache-2.0
|
|
||||||
jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
|
jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
|
||||||
keystoneauth1>=2.10.0 # Apache-2.0
|
keystoneauth1>=2.10.0 # Apache-2.0
|
||||||
|
osc-lib>=1.0.2 # Apache-2.0
|
||||||
oslo.i18n>=2.1.0 # Apache-2.0
|
oslo.i18n>=2.1.0 # Apache-2.0
|
||||||
oslo.utils>=3.16.0 # Apache-2.0
|
oslo.utils>=3.16.0 # Apache-2.0
|
||||||
PrettyTable<0.8,>=0.7 # BSD
|
PrettyTable<0.8,>=0.7 # BSD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user