diff --git a/doc/source/cli.rst b/doc/source/cli.rst index d671ed3..dc3e0b3 100644 --- a/doc/source/cli.rst +++ b/doc/source/cli.rst @@ -20,9 +20,9 @@ Start introspection on a node $ openstack baremetal introspection start [--wait] [--new-ipmi-password=PWD [--new-ipmi-username=USER]] UUID [UUID ...] * ``UUID`` - Ironic node UUID; -* ``new-ipmi-username`` and ``new-ipmi-password`` - if these are set, - **Ironic Inspector** will switch to manual power on and assigning IPMI - credentials on introspection. See `Setting IPMI Credentials`_ for details. +* ``new-ipmi-username`` and ``new-ipmi-password`` - deprecated options to set + IPMI credentials during introspection. Do not use, this feature is pending + removal. Note that the CLI call accepts several UUID's and will stop on the first error. @@ -159,5 +159,4 @@ Starting with baremetal introspection API 1.5 (provided by **Ironic Inspector** calls. -.. _Setting IPMI Credentials: http://docs.openstack.org/developer/ironic-inspector/usage.html#setting-ipmi-credentials .. _introspection rules documentation: http://docs.openstack.org/developer/ironic-inspector/usage.html#introspection-rules diff --git a/ironic_inspector_client/client.py b/ironic_inspector_client/client.py index f698e66..bf918ef 100644 --- a/ironic_inspector_client/client.py +++ b/ironic_inspector_client/client.py @@ -42,10 +42,10 @@ def introspect(uuid, base_url=None, auth_token=None, defaults to ``http://:5050/v1``. :param auth_token: deprecated, use session instead. :param new_ipmi_password: if set, *Ironic Inspector* will update IPMI - password to this value. + password to this value. DEPRECATED. :param new_ipmi_username: if new_ipmi_password is set, this values sets new IPMI user name. Defaults to one in - driver_info. + driver_info. DEPRECATED. :param api_version: requested Ironic Inspector API version, defaults to ``DEFAULT_API_VERSION`` attribute. :param session: keystone session. diff --git a/ironic_inspector_client/v1.py b/ironic_inspector_client/v1.py index 432e9e1..69709b2 100644 --- a/ironic_inspector_client/v1.py +++ b/ironic_inspector_client/v1.py @@ -19,7 +19,7 @@ import time import six from ironic_inspector_client.common import http -from ironic_inspector_client.common.i18n import _ +from ironic_inspector_client.common.i18n import _, _LW DEFAULT_API_VERSION = (1, 0) @@ -92,10 +92,10 @@ class ClientV1(http.BaseClient): :param uuid: node uuid :param new_ipmi_password: if set, *Ironic Inspector* will update IPMI - password to this value. + password to this value. DEPRECATED. :param new_ipmi_username: if new_ipmi_password is set, this values sets new IPMI user name. Defaults to one in - driver_info. + driver_info. DEPRECATED. :raises: :py:class:`.ClientError` on error reported from a server :raises: :py:class:`.VersionNotSupported` if requested api_version is not supported @@ -108,6 +108,11 @@ class ClientV1(http.BaseClient): raise ValueError( _("Setting IPMI user name requires a new password")) + if new_ipmi_password: + LOG.warning(_LW('Setting IPMI credentials via ironic-inspector ' + 'is deprecated, this feature will be removed ' + 'in the Pike release')) + params = {'new_ipmi_username': new_ipmi_username, 'new_ipmi_password': new_ipmi_password} self.request('post', '/introspection/%s' % uuid, params=params) diff --git a/releasenotes/notes/deprecate-setting-ipmi-creds-1581ddc63b273811.yaml b/releasenotes/notes/deprecate-setting-ipmi-creds-1581ddc63b273811.yaml new file mode 100644 index 0000000..6881e6a --- /dev/null +++ b/releasenotes/notes/deprecate-setting-ipmi-creds-1581ddc63b273811.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + Support for setting IPMI credentials via ironic-inspector is deprecated + and will be removed completely in Pike. For reasoning see + https://bugs.launchpad.net/ironic-inspector/+bug/1654318.