From 15fe0fae179b8b1f8c83144b22542d9b379d39ad Mon Sep 17 00:00:00 2001
From: Dean Troyer <dtroyer@gmail.com>
Date: Wed, 22 Jul 2015 10:51:07 -0500
Subject: [PATCH] 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
---
 openstackclient/common/clientmanager.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index 742509e4fd..6abe16db51 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):