Merge "Deprecate the ironic CLI"
This commit is contained in:
10
README.rst
10
README.rst
@@ -14,7 +14,8 @@ This is a client for the OpenStack `Ironic
|
|||||||
<https://wiki.openstack.org/wiki/Ironic>`_ API. It provides:
|
<https://wiki.openstack.org/wiki/Ironic>`_ API. It provides:
|
||||||
|
|
||||||
* a Python API: the ``ironicclient`` module, and
|
* a Python API: the ``ironicclient`` module, and
|
||||||
* two command-line interfaces: ``openstack baremetal`` and ``ironic``.
|
* two command-line interfaces: ``openstack baremetal`` and ``ironic``
|
||||||
|
(deprecated, please use ``openstack baremetal``).
|
||||||
|
|
||||||
Development takes place via the usual OpenStack processes as outlined in the
|
Development takes place via the usual OpenStack processes as outlined in the
|
||||||
`developer guide <https://docs.openstack.org/infra/manual/developers.html>`_.
|
`developer guide <https://docs.openstack.org/infra/manual/developers.html>`_.
|
||||||
@@ -74,8 +75,11 @@ the subcommands available, run::
|
|||||||
|
|
||||||
$ openstack help baremetal
|
$ openstack help baremetal
|
||||||
|
|
||||||
``ironic`` CLI
|
``ironic`` CLI (deprecated)
|
||||||
--------------
|
---------------------------
|
||||||
|
|
||||||
|
This is deprecated and will be removed in the S* release. Please use the
|
||||||
|
``openstack baremetal`` CLI instead.
|
||||||
|
|
||||||
This package will install the ``ironic`` command line interface that you
|
This package will install the ``ironic`` command line interface that you
|
||||||
can use to interact with the ``ironic`` API.
|
can use to interact with the ``ironic`` API.
|
||||||
|
@@ -18,6 +18,12 @@ SYNOPSIS
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
.. WARNING::
|
||||||
|
|
||||||
|
The :program:`ironic` command-line interface is deprecated; no new features
|
||||||
|
will be added. This CLI will be removed in the S* release. The `openstack
|
||||||
|
baremetal <osc_plugin_cli>`_ command-line interface should be used instead.
|
||||||
|
|
||||||
The :program:`ironic` command-line interface (CLI) interacts with the
|
The :program:`ironic` command-line interface (CLI) interacts with the
|
||||||
OpenStack Bare Metal Service (Ironic).
|
OpenStack Bare Metal Service (Ironic).
|
||||||
|
|
||||||
|
@@ -5,7 +5,8 @@ Python Bindings to the OpenStack Ironic API
|
|||||||
This is a client for the OpenStack `Ironic`_ API. It provides:
|
This is a client for the OpenStack `Ironic`_ API. It provides:
|
||||||
|
|
||||||
* a Python API: the ``ironicclient`` module, and
|
* a Python API: the ``ironicclient`` module, and
|
||||||
* two command-line interfaces: ``openstack baremetal`` and ``ironic``.
|
* two command-line interfaces: ``openstack baremetal`` and ``ironic``
|
||||||
|
(deprecated, please use ``openstack baremetal`` instead).
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
========
|
========
|
||||||
|
@@ -17,9 +17,12 @@ or YAML format. It can be done in one of three ways:
|
|||||||
<file> File (.yaml or .json) containing descriptions of the
|
<file> File (.yaml or .json) containing descriptions of the
|
||||||
resources to create. Can be specified multiple times.
|
resources to create. Can be specified multiple times.
|
||||||
|
|
||||||
2. Using ironic CLI's ``ironic create`` command::
|
2. Using ironic CLI's ``ironic create`` command (deprecated, please use
|
||||||
|
``openstack baremetal create`` instead)::
|
||||||
|
|
||||||
$ ironic help create
|
$ ironic help create
|
||||||
|
The "ironic" CLI is deprecated and will be removed in the S* release.
|
||||||
|
Please use the "openstack baremetal" CLI instead.
|
||||||
usage: ironic create <file> [<file> ...]
|
usage: ironic create <file> [<file> ...]
|
||||||
|
|
||||||
Create baremetal resources (chassis, nodes, port groups and ports). The
|
Create baremetal resources (chassis, nodes, port groups and ports). The
|
||||||
|
@@ -333,6 +333,10 @@ class IronicShell(object):
|
|||||||
return (api_major_version, os_ironic_api_version)
|
return (api_major_version, os_ironic_api_version)
|
||||||
|
|
||||||
def main(self, argv):
|
def main(self, argv):
|
||||||
|
# TODO(rloo): delete the ironic CLI in the S* cycle.
|
||||||
|
print('The "ironic" CLI is deprecated and will be removed in the '
|
||||||
|
'S* release. Please use the "openstack baremetal" CLI instead.',
|
||||||
|
file=sys.stderr)
|
||||||
# Parse args once to find version
|
# Parse args once to find version
|
||||||
parser = self.get_base_parser()
|
parser = self.get_base_parser()
|
||||||
(options, args) = parser.parse_known_args(argv)
|
(options, args) = parser.parse_known_args(argv)
|
||||||
|
@@ -249,10 +249,10 @@ class ShellTest(utils.BaseTestCase):
|
|||||||
|
|
||||||
def test_ironic_api_version(self):
|
def test_ironic_api_version(self):
|
||||||
err = self.shell('--ironic-api-version 1.2 help')[1]
|
err = self.shell('--ironic-api-version 1.2 help')[1]
|
||||||
self.assertFalse(err)
|
self.assertIn('The "ironic" CLI is deprecated', err)
|
||||||
|
|
||||||
err = self.shell('--ironic-api-version latest help')[1]
|
err = self.shell('--ironic-api-version latest help')[1]
|
||||||
self.assertFalse(err)
|
self.assertIn('The "ironic" CLI is deprecated', err)
|
||||||
|
|
||||||
self.assertRaises(exc.CommandError,
|
self.assertRaises(exc.CommandError,
|
||||||
self.shell, '--ironic-api-version 1.2.1 help')
|
self.shell, '--ironic-api-version 1.2.1 help')
|
||||||
@@ -264,6 +264,7 @@ class ShellTest(utils.BaseTestCase):
|
|||||||
def test_warning_on_no_version(self):
|
def test_warning_on_no_version(self):
|
||||||
err = self.shell('help')[1]
|
err = self.shell('help')[1]
|
||||||
self.assertIn('You are using the default API version', err)
|
self.assertIn('You are using the default API version', err)
|
||||||
|
self.assertIn('The "ironic" CLI is deprecated', err)
|
||||||
|
|
||||||
|
|
||||||
class TestCase(testtools.TestCase):
|
class TestCase(testtools.TestCase):
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``ironic`` CLI has been deprecated and will be removed in the
|
||||||
|
S* release. Please use the ``openstack baremetal`` CLI instead.
|
Reference in New Issue
Block a user