summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorTerryHowe <terrylhowe@gmail.com>2015-05-08 13:14:15 -0600
committerTerryHowe <terrylhowe@gmail.com>2015-07-18 06:28:09 -0600
commitb3335b3474e559d8afb0b7f86796fbb68a0687a8 (patch)
tree7fb6af85a7ae7f77c97af02012471984b4d77f3c /doc/source
parentfcadb16470832cdde2d090a19ebd20a3ad0d1476 (diff)
downloadpython-openstackclient-b3335b3474e559d8afb0b7f86796fbb68a0687a8.tar.gz
Do not set default versions in parsed args
Setting default versions in parsed args makes it so OCC cannot tell if the argument was parsed, an environment variable was set or it is just defaulted. In order to set api versions from OCC, it will have to be defaulted after processing OCC. Closes-Bug: #1453229 Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/backwards-incompatible.rst15
-rw-r--r--doc/source/plugins.rst7
2 files changed, 17 insertions, 5 deletions
diff --git a/doc/source/backwards-incompatible.rst b/doc/source/backwards-incompatible.rst
index c511852f..e89cc3a6 100644
--- a/doc/source/backwards-incompatible.rst
+++ b/doc/source/backwards-incompatible.rst
@@ -75,6 +75,21 @@ List of Backwards Incompatible Changes
* Bug: https://bugs.launchpad.net/python-openstackclient/+bug/472613
* Commit: https://review.openstack.org/#/c/194654/
+6. Plugin interface change for default API versions
+
+ Previously, the default version was set in the parsed arguments,
+ but this makes it impossible to tell what has been passed in at the
+ command line, set in an environment variable or is just the default.
+ Now, the module should have a DEFAULT_API_VERSION that contains the
+ value and it will be set after command line argument, environment
+ and OCC file processing.
+
+ * In favor of: DEFAULT_API_VERSION
+ * As of: 1.2.1
+ * Removed in: NA
+ * Bug: https://bugs.launchpad.net/python-openstackclient/+bug/1453229
+ * Commit: https://review.openstack.org/#/c/181514/
+
For Developers
==============
diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst
index d603e102..17a508fe 100644
--- a/doc/source/plugins.rst
+++ b/doc/source/plugins.rst
@@ -83,7 +83,7 @@ so the version should not contain the leading 'v' character.
.. code-block:: python
- DEFAULT_OSCPLUGIN_API_VERSION = '1'
+ DEFAULT_API_VERSION = '1'
# Required by the OSC plugin interface
API_NAME = 'oscplugin'
@@ -123,10 +123,7 @@ so the version should not contain the leading 'v' character.
parser.add_argument(
'--os-oscplugin-api-version',
metavar='<oscplugin-api-version>',
- default=utils.env(
- 'OS_OSCPLUGIN_API_VERSION',
- default=DEFAULT_OSCPLUGIN_API_VERSION),
help='OSC Plugin API version, default=' +
- DEFAULT_OSCPLUGIN_API_VERSION +
+ DEFAULT_API_VERSION +
' (Env: OS_OSCPLUGIN_API_VERSION)')
return parser