Remove convert to cluster template feature
the only plugin with support of this feature was HDP 1.3.2 which was removed long time ago. Change-Id: I6e21ac676899293575c444e37f8b5fc68b44cbb6
This commit is contained in:
parent
5fefb63270
commit
f41c51ad03
|
@ -129,15 +129,6 @@ that.
|
|||
|
||||
*Returns*: None
|
||||
|
||||
convert(config, plugin_name, version, template_name, cluster_template_create)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Provides plugin with ability to create cluster based on plugin-specific config.
|
||||
Sahara expects plugin to fill in all the required fields.
|
||||
The last argument is the function that plugin should call to save the Cluster
|
||||
Template.
|
||||
See “Cluster Lifecycle for Config File Mode” section below for clarification.
|
||||
|
||||
on_terminate_cluster(cluster)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
deprecations:
|
||||
- Convert to cluster template feature is no longer
|
||||
supported by all plugins.
|
|
@ -210,10 +210,11 @@ def plugins_get_version(plugin_name, version):
|
|||
@rest.post_file('/plugins/<plugin_name>/<version>/convert-config/<name>')
|
||||
@acl.enforce("data-processing:plugins:convert_config")
|
||||
@v.check_exists(api.get_plugin, plugin_name='plugin_name', version='version')
|
||||
@v.validate(v_p.CONVERT_TO_TEMPLATE_SCHEMA, v_p.check_convert_to_template)
|
||||
@v.validate(None, v_p.check_convert_to_template)
|
||||
def plugins_convert_to_cluster_template(plugin_name, version, name, data):
|
||||
return u.to_wrapped_dict(
|
||||
api.convert_to_cluster_template, plugin_name, version, name, data)
|
||||
# There is no plugins that supports converting to cluster template
|
||||
# The last plugin with support of that is no longer supported
|
||||
pass
|
||||
|
||||
|
||||
# Image Registry ops
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
from sahara.api import acl
|
||||
from sahara.service.api.v2 import plugins as api
|
||||
from sahara.service import validation as v
|
||||
from sahara.service.validations import plugins as v_p
|
||||
import sahara.utils.api as u
|
||||
|
||||
|
||||
|
@ -41,12 +40,3 @@ def plugins_get(plugin_name):
|
|||
@v.check_exists(api.get_plugin, plugin_name='plugin_name', version='version')
|
||||
def plugins_get_version(plugin_name, version):
|
||||
return u.render(api.get_plugin(plugin_name, version).wrapped_dict)
|
||||
|
||||
|
||||
@rest.post_file('/plugins/<plugin_name>/<version>/convert-config/<name>')
|
||||
@acl.enforce("data-processing:plugins:convert_config")
|
||||
@v.check_exists(api.get_plugin, plugin_name='plugin_name', version='version')
|
||||
@v.validate(v_p.CONVERT_TO_TEMPLATE_SCHEMA, v_p.check_convert_to_template)
|
||||
def plugins_convert_to_cluster_template(plugin_name, version, name, data):
|
||||
return u.to_wrapped_dict(
|
||||
api.convert_to_cluster_template, plugin_name, version, name, data)
|
||||
|
|
|
@ -85,11 +85,6 @@ class ProvisioningPluginBase(plugins_base.PluginInterface):
|
|||
def validate_images(self, cluster, reconcile=True):
|
||||
pass
|
||||
|
||||
@plugins_base.optional
|
||||
def convert(self, config, plugin_name, version, template_name,
|
||||
cluster_template_create):
|
||||
pass
|
||||
|
||||
@plugins_base.required_with_default
|
||||
def on_terminate_cluster(self, cluster):
|
||||
pass
|
||||
|
|
|
@ -17,7 +17,6 @@ from oslo_config import cfg
|
|||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
import six
|
||||
from six.moves.urllib import parse as urlparse
|
||||
|
||||
from sahara import conductor as c
|
||||
from sahara import context
|
||||
|
@ -239,14 +238,6 @@ def get_plugin(plugin_name, version=None):
|
|||
return res
|
||||
|
||||
|
||||
def convert_to_cluster_template(plugin_name, version, template_name,
|
||||
config_file):
|
||||
plugin = plugin_base.PLUGINS.get_plugin(plugin_name)
|
||||
return plugin.convert(config_file, plugin_name, version,
|
||||
urlparse.unquote(template_name),
|
||||
conductor.cluster_template_create)
|
||||
|
||||
|
||||
def construct_ngs_for_scaling(cluster, additional_node_groups):
|
||||
ctx = context.ctx()
|
||||
additional = {}
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from six.moves.urllib import parse as urlparse
|
||||
|
||||
from sahara import conductor as c
|
||||
from sahara import context
|
||||
from sahara.plugins import base as plugin_base
|
||||
|
@ -46,14 +44,6 @@ def get_plugin(plugin_name, version=None):
|
|||
return res
|
||||
|
||||
|
||||
def convert_to_cluster_template(plugin_name, version, template_name,
|
||||
config_file):
|
||||
plugin = plugin_base.PLUGINS.get_plugin(plugin_name)
|
||||
return plugin.convert(config_file, plugin_name, version,
|
||||
urlparse.unquote(template_name),
|
||||
conductor.cluster_template_create)
|
||||
|
||||
|
||||
def construct_ngs_for_scaling(cluster, additional_node_groups):
|
||||
ctx = context.ctx()
|
||||
additional = {}
|
||||
|
|
|
@ -15,14 +15,9 @@
|
|||
|
||||
import sahara.exceptions as ex
|
||||
from sahara.i18n import _
|
||||
from sahara.plugins import base as plugin_base
|
||||
|
||||
|
||||
CONVERT_TO_TEMPLATE_SCHEMA = None
|
||||
|
||||
|
||||
def check_convert_to_template(plugin_name, version, **kwargs):
|
||||
if not plugin_base.PLUGINS.is_plugin_implements(plugin_name, 'convert'):
|
||||
raise ex.InvalidReferenceException(
|
||||
_("Requested plugin '%s' doesn't support converting config files "
|
||||
"to cluster templates") % plugin_name)
|
||||
raise ex.InvalidReferenceException(
|
||||
_("Requested plugin '%s' doesn't support converting config files "
|
||||
"to cluster templates") % plugin_name)
|
||||
|
|
Loading…
Reference in New Issue