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:
Tang Chen 2016-06-28 15:00:49 +08:00
parent 5e04d15a5a
commit 0a0e15141f
4 changed files with 12 additions and 11 deletions

View File

@ -18,10 +18,8 @@ import argparse
import itertools
import logging
from cliff import command
from cliff import lister
from cliff import show
from openstackclient.common import utils as oscutils
from osc_lib.command import command
from ironicclient.common.i18n import _
from ironicclient.common import utils
@ -105,7 +103,7 @@ class CleanBaremetalNode(ProvisionStateBaremetalNode):
cleansteps=clean_steps)
class CreateBaremetalNode(show.ShowOne):
class CreateBaremetalNode(command.ShowOne):
"""Register a new node with the baremetal service"""
log = logging.getLogger(__name__ + ".CreateBaremetalNode")
@ -265,7 +263,7 @@ class InspectBaremetalNode(ProvisionStateBaremetalNode):
PROVISION_STATE = 'inspect'
class ListBaremetalNode(lister.Lister):
class ListBaremetalNode(command.Lister):
"""List baremetal nodes"""
log = logging.getLogger(__name__ + ".ListBaremetalNode")
@ -656,7 +654,7 @@ class SetBaremetal(SetBaremetalNode):
return super(SetBaremetal, self).take_action(parsed_args)
class ShowBaremetalNode(show.ShowOne):
class ShowBaremetalNode(command.ShowOne):
"""Show baremetal node details"""
log = logging.getLogger(__name__ + ".ShowBaremetalNode")

View File

@ -17,14 +17,13 @@
import itertools
import logging
from cliff import command
from cliff import show
from osc_lib.command import command
from ironicclient.common import utils
from ironicclient.v1 import resource_fields as res_fields
class CreateBaremetalPort(show.ShowOne):
class CreateBaremetalPort(command.ShowOne):
"""Create a new port"""
log = logging.getLogger(__name__ + ".CreateBaremetalPort")
@ -104,7 +103,7 @@ class CreateBaremetalPort(show.ShowOne):
return self.dict2columns(data)
class ShowBaremetalPort(show.ShowOne):
class ShowBaremetalPort(command.ShowOne):
"""Show baremetal port details."""
log = logging.getLogger(__name__ + ".ShowBaremetalPort")

View 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.

View File

@ -4,9 +4,9 @@
pbr>=1.6 # Apache-2.0
appdirs>=1.3.0 # MIT License
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
keystoneauth1>=2.10.0 # Apache-2.0
osc-lib>=1.0.2 # Apache-2.0
oslo.i18n>=2.1.0 # Apache-2.0
oslo.utils>=3.16.0 # Apache-2.0
PrettyTable<0.8,>=0.7 # BSD