Deprecate Vanilla 2.6.0
This change deprecates vanilla 2.6.0 plugin. Vanilla 2.7.1 continues to be supported. Also, add default templates for vanilla 2.7.1. All possible occurences replaced with 2.7.1 version of plugin. Implements blueprint: deprecate-vanilla-2-6-0 Change-Id: I791417d76b7ef79227f99e7d2c85febdafef0f04
This commit is contained in:
parent
b7e4b7ceb7
commit
53776a3328
|
@ -18,6 +18,8 @@ from oslo_log import log as logging
|
|||
|
||||
from sahara import conductor
|
||||
from sahara import context
|
||||
from sahara import exceptions as ex
|
||||
from sahara.i18n import _
|
||||
from sahara.plugins import utils
|
||||
from sahara.plugins.vanilla import abstractversionhandler as avm
|
||||
from sahara.plugins.vanilla.hadoop2 import config as c
|
||||
|
@ -57,7 +59,10 @@ class VersionHandler(avm.AbstractVersionHandler):
|
|||
}
|
||||
|
||||
def validate(self, cluster):
|
||||
vl.validate_cluster_creating(self.pctx, cluster)
|
||||
raise ex.DeprecatedException(
|
||||
_("The vanilla 2.6.0 plugin is now deprecated and will be removed"
|
||||
" in M release. The vanilla 2.7.1 plugin remains and "
|
||||
" continues to be supported."))
|
||||
|
||||
def update_infra(self, cluster):
|
||||
pass
|
||||
|
|
|
@ -32,7 +32,7 @@ class VanillaPluginTest(base.SaharaWithDbTestCase):
|
|||
|
||||
@mock.patch('sahara.service.edp.hdfs_helper.create_dir_hadoop2')
|
||||
def test_edp_calls_hadoop2_create_dir(self, create_dir):
|
||||
for version in ['2.6.0']:
|
||||
for version in ['2.7.1']:
|
||||
cluster_dict = {
|
||||
'name': 'cluster' + version.replace('.', '_'),
|
||||
'plugin_name': 'vanilla',
|
||||
|
|
|
@ -84,7 +84,7 @@ class ValidationTest(base.SaharaTestCase):
|
|||
lst.append(self.ng[i])
|
||||
|
||||
return tu.create_cluster("cluster1", "tenant1", "vanilla",
|
||||
"2.6.0", lst, **kwargs)
|
||||
"2.7.1", lst, **kwargs)
|
||||
|
||||
def _validate_case(self, *args):
|
||||
cl = self._create_cluster(*args)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import mock
|
||||
|
||||
from sahara.plugins.vanilla.v2_6_0 import edp_engine
|
||||
from sahara.plugins.vanilla.v2_7_1 import edp_engine
|
||||
from sahara.tests.unit import base as sahara_base
|
||||
from sahara.utils import edp
|
||||
|
||||
|
@ -31,7 +31,7 @@ class Vanilla2ConfigHintsTest(sahara_base.SaharaTestCase):
|
|||
actual_config = edp_engine.EdpOozieEngine.get_possible_job_config(
|
||||
edp.JOB_TYPE_HIVE)
|
||||
get_possible_hive_config_from.assert_called_once_with(
|
||||
'plugins/vanilla/v2_6_0/resources/hive-default.xml')
|
||||
'plugins/vanilla/v2_7_1/resources/hive-default.xml')
|
||||
self.assertEqual(expected_config, actual_config)
|
||||
|
||||
@mock.patch('sahara.plugins.vanilla.hadoop2.edp_engine.EdpOozieEngine')
|
||||
|
@ -55,7 +55,7 @@ class Vanilla2ConfigHintsTest(sahara_base.SaharaTestCase):
|
|||
actual_config = edp_engine.EdpOozieEngine.get_possible_job_config(
|
||||
edp.JOB_TYPE_MAPREDUCE)
|
||||
get_possible_mapreduce_config_from.assert_called_once_with(
|
||||
'plugins/vanilla/v2_6_0/resources/mapred-default.xml')
|
||||
'plugins/vanilla/v2_7_1/resources/mapred-default.xml')
|
||||
self.assertEqual(expected_config, actual_config)
|
||||
|
||||
@mock.patch(
|
||||
|
@ -68,7 +68,7 @@ class Vanilla2ConfigHintsTest(sahara_base.SaharaTestCase):
|
|||
actual_config = edp_engine.EdpOozieEngine.get_possible_job_config(
|
||||
edp.JOB_TYPE_MAPREDUCE_STREAMING)
|
||||
get_possible_mapreduce_config_from.assert_called_once_with(
|
||||
'plugins/vanilla/v2_6_0/resources/mapred-default.xml')
|
||||
'plugins/vanilla/v2_7_1/resources/mapred-default.xml')
|
||||
self.assertEqual(expected_config, actual_config)
|
||||
|
||||
@mock.patch(
|
||||
|
@ -81,7 +81,7 @@ class Vanilla2ConfigHintsTest(sahara_base.SaharaTestCase):
|
|||
actual_config = edp_engine.EdpOozieEngine.get_possible_job_config(
|
||||
edp.JOB_TYPE_PIG)
|
||||
get_possible_pig_config_from.assert_called_once_with(
|
||||
'plugins/vanilla/v2_6_0/resources/mapred-default.xml')
|
||||
'plugins/vanilla/v2_7_1/resources/mapred-default.xml')
|
||||
self.assertEqual(expected_config, actual_config)
|
||||
|
||||
@mock.patch('sahara.plugins.vanilla.hadoop2.edp_engine.EdpOozieEngine')
|
Loading…
Reference in New Issue