summaryrefslogtreecommitdiffstats
path: root/tests/os_clients.py
blob: 2eb406e0835133f2ace94d9f92ea2e87b5e2ac74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)