From 835c5d4c57ddb700cc50c2d7ed8eef6b177a15c2 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 26 Jul 2017 12:50:07 +0000 Subject: [PATCH] Turn on warning-is-error In the doc-migration, warning-is-error was never enabled for python-ironicclient. As such, I've enabled it and corrected the various document errors. Change-Id: I2d1b95fba25dba5d59da3f4b09b9974ff5196940 --- doc/source/cli/ironic_client.rst | 12 ++++++------ doc/source/cli/osc_plugin_cli.rst | 4 ++-- ironicclient/v1/node.py | 8 ++++---- setup.cfg | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/source/cli/ironic_client.rst b/doc/source/cli/ironic_client.rst index 92c02b014..c86289cd3 100644 --- a/doc/source/cli/ironic_client.rst +++ b/doc/source/cli/ironic_client.rst @@ -23,9 +23,9 @@ OpenStack Bare Metal Service (Ironic). In order to use the CLI, you must provide your OpenStack username, password, project (historically called tenant), and auth endpoint. You can use -configuration options :option:`--os-username`, :option:`--os-password`, -:option:`--os-tenant-id` (or :option:`--os-tenant-name`), -and :option:`--os-auth-url`, or set the corresponding +configuration options ``--os-username``, ``--os-password``, +``--os-tenant-id`` (or ``--os-tenant-name``), +and ``--os-auth-url``, or set the corresponding environment variables:: $ export OS_USERNAME=user @@ -36,15 +36,15 @@ environment variables:: The command-line tool will attempt to reauthenticate using the provided credentials for every request. You can override this behavior by manually -supplying an auth token using :option:`--ironic-url` and -:option:`--os-auth-token`, or by setting the corresponding environment +supplying an auth token using ``--ironic-url`` and +``--os-auth-token``, or by setting the corresponding environment variables:: $ export IRONIC_URL=http://ironic.example.org:6385/ $ export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155 Since Keystone can return multiple regions in the Service Catalog, you can -specify the one you want with :option:`--os-region-name` or set the following +specify the one you want with ``--os-region-name`` or set the following environment variable. (It defaults to the first in the list returned.) :: diff --git a/doc/source/cli/osc_plugin_cli.rst b/doc/source/cli/osc_plugin_cli.rst index 924d3e57c..79e7455c0 100644 --- a/doc/source/cli/osc_plugin_cli.rst +++ b/doc/source/cli/osc_plugin_cli.rst @@ -25,8 +25,8 @@ To use ``openstack`` CLI, the OpenStackClient should be installed:: To use the CLI, you must provide your OpenStack username, password, project, and auth endpoint. You can use configuration options -:option:`--os-username`, :option:`--os-password`, :option:`--os-project-id` -(or :option:`--os-project-name`), and :option:`--os-auth-url`, +``--os-username``, ``--os-password``, ``--os-project-id`` +(or ``--os-project-name``), and ``--os-auth-url``, or set the corresponding environment variables:: $ export OS_USERNAME=user diff --git a/ironicclient/v1/node.py b/ironicclient/v1/node.py index 192d6e768..135a67ab5 100644 --- a/ironicclient/v1/node.py +++ b/ironicclient/v1/node.py @@ -376,8 +376,8 @@ class NodeManager(base.CreateManager): def vif_attach(self, node_ident, vif_id, **kwargs): """Attach VIF to a given node. - param node_ident: The UUID or Name of the node. - param vif_id: The UUID or Name of the VIF to attach. + :param node_ident: The UUID or Name of the node. + :param vif_id: The UUID or Name of the VIF to attach. :param kwargs: A dictionary containing the attributes of the resource that will be created. """ @@ -393,8 +393,8 @@ class NodeManager(base.CreateManager): def vif_detach(self, node_ident, vif_id): """Detach VIF from a given node. - param node_ident: The UUID or Name of the node. - param vif_id: The UUID or Name of the VIF to detach. + :param node_ident: The UUID or Name of the node. + :param vif_id: The UUID or Name of the VIF to detach. """ path = "%s/vifs/%s" % (node_ident, vif_id) self.delete(path) diff --git a/setup.cfg b/setup.cfg index 02c4f8870..37e95777f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -112,6 +112,7 @@ warnerrors = True all_files = 1 build-dir = doc/build source-dir = doc/source +warning-is-error = 1 [wheel] universal = 1