From 6f83bdef6b944719f361ceba1e235898aad3c680 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Mon, 14 Jan 2019 17:40:03 +0000 Subject: [PATCH] Use existing (but not indexed) interface The send_storage_backend_data method was written before I realised that a cinder-backend interface already existed. This change updates send_storage_backend_data to use the existing interface which has a slightly different method name and signature for sending relation data to principle. Change-Id: I6eeedffe2961e97f8ea04ad85be5f9aa9b8820ed --- charms_openstack/charm/classes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/charms_openstack/charm/classes.py b/charms_openstack/charm/classes.py index 7671071..bdd5a83 100644 --- a/charms_openstack/charm/classes.py +++ b/charms_openstack/charm/classes.py @@ -1,6 +1,5 @@ import base64 import contextlib -import json import os import random import re @@ -899,8 +898,7 @@ class CinderStoragePluginCharm(OpenStackCharm): def send_storage_backend_data(self): cbend = relations.endpoint_from_flag('storage-backend.connected') - cbend.send_plugin_configuration( + cbend.configure_principal( backend_name=self.service_name, - subordinate_configuration=json.dumps( - self.cinder_configuration()), + configuration=self.cinder_configuration(), stateless=self.stateless)