From 331574d926b24e8d8b169fb7411f625ad1f661dc Mon Sep 17 00:00:00 2001 From: Sharat Sharma Date: Wed, 12 Jul 2017 16:55:28 +0530 Subject: [PATCH] Enable warning-is-error in doc build Clean up python build warnings to enable warning-is-error. Adding a simple doc page for the api Part of doc-migration work Change-Id: Ia6ad528c207e194c3b48155a8f9f4e67dafb792d --- doc/source/class_reference.rst | 7 +++++++ doc/source/index.rst | 7 ++++--- mistralclient/auth/keycloak.py | 19 ++++++++++--------- setup.cfg | 1 + 4 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 doc/source/class_reference.rst diff --git a/doc/source/class_reference.rst b/doc/source/class_reference.rst new file mode 100644 index 00000000..9a681c20 --- /dev/null +++ b/doc/source/class_reference.rst @@ -0,0 +1,7 @@ +Python Mistral bindings class refrence +====================================== + +.. toctree:: + :maxdepth: 1 + + api/autoindex diff --git a/doc/source/index.rst b/doc/source/index.rst index 369b501c..c30ee66a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -14,24 +14,25 @@ Using mistralclient cli_usage_with_openstack cli_usage_with_keycloak cli_usage_without_auth + class_reference For information about using the mistral command-line client, see `Workflow service command-line client`_. -.. _Workflow service command-line client: http://docs.openstack.org/cli-reference/mistral.html +.. _Workflow service command-line client: https://docs.openstack.org/cli-reference/mistral.html Python API Reference -------------------- * `REST API Specification`_ -.. _REST API Specification: http://docs.openstack.org/developer/mistral/developer/webapi/v2.html +.. _REST API Specification: https://docs.openstack.org/mistral/latest/api/v2.html Contributing ------------ Code is hosted `on GitHub`_. Submit bugs to the python-mistralclient project on -`Launchpad`_. Submit code to the openstack/python-heatclient project +`Launchpad`_. Submit code to the openstack/python-mistralclient project using `Gerrit`_. .. _on GitHub: https://github.com/openstack/python-mistralclient diff --git a/mistralclient/auth/keycloak.py b/mistralclient/auth/keycloak.py index 8315aa67..b502efa5 100644 --- a/mistralclient/auth/keycloak.py +++ b/mistralclient/auth/keycloak.py @@ -30,25 +30,26 @@ class KeycloakAuthHandler(auth.AuthHandler): :param req: Request dict containing list of parameters required for Keycloak authentication. - auth_url: Base authentication url of KeyCloak server (e.g. + * auth_url: Base authentication url of KeyCloak server (e.g. "https://my.keycloak:8443/auth" - client_id: Client ID (according to OpenID Connect protocol). - client_secret: Client secret (according to OpenID Connect + * client_id: Client ID (according to OpenID Connect protocol). + * client_secret: Client secret (according to OpenID Connect protocol). - realm_name: KeyCloak realm name. - username: User name (Optional, if None then access_token must be + * realm_name: KeyCloak realm name. + * username: User name (Optional, if None then access_token must be provided). - password: Password (Optional). - access_token: Access token. If passed, username and password are + * password: Password (Optional). + * access_token: Access token. If passed, username and password are not used and this method just validates the token and refreshes it if needed (Optional, if None then username must be provided). - cacert: SSL certificate file (Optional). - insecure: If True, SSL certificate is not verified (Optional). + * cacert: SSL certificate file (Optional). + * insecure: If True, SSL certificate is not verified (Optional). :param session: Keystone session object. Not used by this plugin. """ + if not isinstance(req, dict): raise TypeError('The input "req" is not typeof dict.') diff --git a/setup.cfg b/setup.cfg index fdad221c..0e65fe97 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,6 +27,7 @@ builders = html,man source-dir = doc/source build-dir = doc/build all_files = 1 +warning-is-error = 1 [upload_sphinx] upload-dir = doc/build/html