Skip to content

Commit 15fe0fa

Browse files
author
Dean Troyer
committed
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
1 parent b3335b3 commit 15fe0fa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎openstackclient/common/clientmanager.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def __get__(self, instance, owner):
4848

4949
class ClientManager(object):
5050
"""Manages access to API clients, including authentication."""
51+
52+
# A simple incrementing version for the plugin to know what is available
53+
PLUGIN_INTERFACE_VERSION = "2"
54+
5155
identity = ClientCache(identity_client.make_client)
5256

5357
def __getattr__(self, name):

0 commit comments

Comments
 (0)