From 0eab4248849fb44aac235e8703ea5ab3261c0e14 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Thu, 9 Feb 2017 11:20:07 +0000 Subject: [PATCH] Re-enable plugins ability to send local_settings In the past the plugin interface was renamed but the context was not updated meaning that subordinates could no longer send plugin data. This change fixes the relation name the context uses and updates the Newton template to render these settings (earlier templates already do this) Closes-Bug: 1578824 Change-Id: I57e4e526019bc91bdf1df77c60da33ae108e0b49 --- hooks/horizon_contexts.py | 2 +- templates/newton/local_settings.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/horizon_contexts.py b/hooks/horizon_contexts.py index 2658fd1c..ae96116b 100644 --- a/hooks/horizon_contexts.py +++ b/hooks/horizon_contexts.py @@ -272,7 +272,7 @@ class LocalSettingsContext(OSContextGenerator): relations = [] - for rid in relation_ids("plugin"): + for rid in relation_ids("dashboard-plugin"): try: unit = related_units(rid)[0] except IndexError: diff --git a/templates/newton/local_settings.py b/templates/newton/local_settings.py index cd44f39d..45125cac 100644 --- a/templates/newton/local_settings.py +++ b/templates/newton/local_settings.py @@ -973,3 +973,4 @@ ALLOWED_PRIVATE_SUBNET_CIDR = {'ipv4': [], 'ipv6': []} #USER_TABLE_EXTRA_INFO = { # 'phone_num': _('Phone Number'), #} +{{ settings|join('\n\n') }}