diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-04-13 09:09:41 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-05-02 11:01:56 +0800 |
commit | d5918a87f12fdef9bd7408c4554c42606c4896d8 (patch) | |
tree | d6b5ce364ae8a425bd3a538655d14872a9f0b0e9 /tests/os_clients.py | |
parent | 51b2ad855f0dad6527e5ec436f6b29758c21fb80 (diff) |
add image code
JIRA: DOCTOR-93
Change-Id: I6551d5e31799b967ce442cb05a664c0d64a3dcf8
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/os_clients.py')
-rw-r--r-- | tests/os_clients.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/os_clients.py b/tests/os_clients.py new file mode 100644 index 00000000..2eb406e0 --- /dev/null +++ b/tests/os_clients.py @@ -0,0 +1,21 @@ +##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+from oslo_config import cfg
+
+import glanceclient.client as glanceclient
+
+
+OPTS = [
+ cfg.StrOpt('glance_version', default='2', help='glance version'),
+]
+
+
+def glance_client(version, session):
+ return glanceclient.Client(version=version,
+ session=session)
|