--- /dev/null
+##############################################################################\r
+# Copyright (c) 2017 ZTE Corporation and others.\r
+#\r
+# All rights reserved. This program and the accompanying materials\r
+# are made available under the terms of the Apache License, Version 2.0\r
+# which accompanies this distribution, and is available at\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+##############################################################################\r
+from oslo_config import cfg\r
+\r
+import glanceclient.client as glanceclient\r
+\r
+\r
+OPTS = [\r
+ cfg.StrOpt('glance_version', default='2', help='glance version'),\r
+]\r
+\r
+\r
+def glance_client(version, session):\r
+ return glanceclient.Client(version=version,\r
+ session=session)\r