From 55dc2d8dc272888d8f0a5f4efd6b77e0874334d1 Mon Sep 17 00:00:00 2001 From: Telles Nobrega Date: Tue, 4 Apr 2017 09:29:21 -0300 Subject: [PATCH] Adding labels support to Storm Adding support to labels to the Storm plugin as well as marking storm version 0.9.2 as deprecated. Change-Id: If58ddce1324341da48fb1d1d3da3d456316c1d10 --- ...-storm-version-092.yaml-b9ff2b9ebbb983fc.yaml | 3 +++ sahara/plugins/storm/plugin.py | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/deprecate-storm-version-092.yaml-b9ff2b9ebbb983fc.yaml diff --git a/releasenotes/notes/deprecate-storm-version-092.yaml-b9ff2b9ebbb983fc.yaml b/releasenotes/notes/deprecate-storm-version-092.yaml-b9ff2b9ebbb983fc.yaml new file mode 100644 index 00000000..98c57793 --- /dev/null +++ b/releasenotes/notes/deprecate-storm-version-092.yaml-b9ff2b9ebbb983fc.yaml @@ -0,0 +1,3 @@ +--- +deprecations: + - Storm version 0.9.2 is deprecated. diff --git a/sahara/plugins/storm/plugin.py b/sahara/plugins/storm/plugin.py index 2502c6a4..90f8881e 100644 --- a/sahara/plugins/storm/plugin.py +++ b/sahara/plugins/storm/plugin.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import copy + from oslo_log import log as logging import six import yaml @@ -50,8 +52,20 @@ class StormProvider(p.ProvisioningPluginBase): _("This plugin provides an ability to launch Storm " "cluster without any management consoles.")) + def get_labels(self): + default = {'enabled': {'status': True}, 'stable': {'status': True}} + deprecated = {'enabled': {'status': True}, + 'deprecated': {'status': True}} + result = {'plugin_labels': copy.deepcopy(default)} + result['version_labels'] = { + '1.1.0': copy.deepcopy(default), + '1.0.1': copy.deepcopy(default), + '0.9.2': copy.deepcopy(deprecated), + } + return result + def get_versions(self): - return ['0.9.2', '1.0.1'] + return ['0.9.2', '1.0.1', '1.1.0'] def get_configs(self, storm_version): return c_helper.get_plugin_configs()