diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2015-07-22 10:51:07 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2015-07-22 11:06:41 -0500 |
| commit | 15fe0fae179b8b1f8c83144b22542d9b379d39ad (patch) | |
| tree | 1a8c25d031d464977dd049e869b9663840814071 /openstackclient/common/clientmanager.py | |
| parent | b3335b3474e559d8afb0b7f86796fbb68a0687a8 (diff) | |
| download | python-openstackclient-15fe0fae179b8b1f8c83144b22542d9b379d39ad.tar.gz | |
Add plugin interface version
External plugins need to know which plugin interface is being
used by the host OSC. Releases <1.6 (?) will not have a
version defined.
Plugins can add the following to their make_client() to discover
the interface version:
_plugin_interface_version = getattr(
instance,
"PLUGIN_INTERFACE_VERSION",
None,
)
Change-Id: Ifc0f40fec5bc27f6425139984936b7f6e032a580
Diffstat (limited to 'openstackclient/common/clientmanager.py')
| -rw-r--r-- | openstackclient/common/clientmanager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 742509e4..6abe16db 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -48,6 +48,10 @@ class ClientCache(object): class ClientManager(object): """Manages access to API clients, including authentication.""" + + # A simple incrementing version for the plugin to know what is available + PLUGIN_INTERFACE_VERSION = "2" + identity = ClientCache(identity_client.make_client) def __getattr__(self, name): |
