summaryrefslogtreecommitdiff
path: root/ceilometer
diff options
context:
space:
mode:
authorTobias Urdin <tobias.urdin@binero.se>2018-09-26 17:25:01 +0200
committerTobias Urdin <tobias.urdin@binero.se>2018-09-26 17:25:01 +0200
commitbe524d2b74ad61fd208a505980af00fefe37022c (patch)
tree5a3075529765913108947ff2f1873629eae07121 /ceilometer
parentaf18f2be7b02cdbe2d821cbfa66a7489f7372bad (diff)
downloadceilometer-be524d2b74ad61fd208a505980af00fefe37022c.tar.gz
Volume discovery minimum 3.43 api version
Set the volume api version to 3.43 to make sure we get 3.41 change where it exposes the user_id for snapshots. This will fix the volume.snapshot.size metric that is not working when trying to access the user_id throws a AttributeError. Change-Id: I2414717e7c9e64b0092fe93c97a062a48dbf09a8 Closes-Bug: 1794475
Diffstat (limited to 'ceilometer')
-rw-r--r--ceilometer/volume/discovery.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ceilometer/volume/discovery.py b/ceilometer/volume/discovery.py
index 65c84348..eefa36de 100644
--- a/ceilometer/volume/discovery.py
+++ b/ceilometer/volume/discovery.py
@@ -28,8 +28,10 @@ class _BaseDiscovery(plugin_base.DiscoveryBase):
def __init__(self, conf):
super(_BaseDiscovery, self).__init__(conf)
creds = conf.service_credentials
+ # NOTE(tobias-urdin): We set 3.43 (the maximum for Pike) because
+ # we need atleast 3.41 to get user_id on snapshots.
self.client = cinder_client.Client(
- version='3',
+ version='3.43',
session=keystone_client.get_session(conf),
region_name=creds.region_name,
interface=creds.interface,