Enable plugins when setting attributes
without this patch plugin are not enabled and Nailgun fails
with error 500 when trying to assign node with a role defined by the
plugin.
Fixes-bug: #1543962
Change-Id: Ie22ff85c3eb65a0524d594ccfb2116ea87bd082f
(cherry picked from commit 06fd4c348a
)
This commit is contained in:
parent
84241afd0c
commit
4013e663e9
|
@ -2376,7 +2376,8 @@ class FuelWebClient(object):
|
|||
raise AssertionError("Plugin {0} version {1} is not "
|
||||
"found".format(plugin_name, version))
|
||||
|
||||
def update_plugin_settings(self, cluster_id, plugin_name, version, data):
|
||||
def update_plugin_settings(self, cluster_id, plugin_name, version, data,
|
||||
enabled=True):
|
||||
"""Update settings for specified version of plugin
|
||||
|
||||
:param plugin_name: string
|
||||
|
@ -2386,6 +2387,8 @@ class FuelWebClient(object):
|
|||
"""
|
||||
attr = self.client.get_cluster_attributes(cluster_id)
|
||||
plugin_versions = attr['editable'][plugin_name]['metadata']['versions']
|
||||
if enabled:
|
||||
attr['editable'][plugin_name]['metadata']['enabled'] = True
|
||||
plugin_data = None
|
||||
for item in plugin_versions:
|
||||
if item['metadata']['plugin_version'] == version:
|
||||
|
|
Loading…
Reference in New Issue