d49398cc97
This change implements the optional methods in the Plugins SPI to support the job-types endpoint for the MapR plugin. Config hints at this point are unchanged. Additional work may be needed to provide config-hints specific to MapR plugin versions. Partial-Implements: blueprint edp-job-types-endpoint Change-Id: I8e3919060f12769ffa26d755cf3d8f7d2c839b2f
82 lines
1.9 KiB
Python
82 lines
1.9 KiB
Python
# Copyright (c) 2015, MapR Technologies
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
|
|
import abc
|
|
|
|
import six
|
|
|
|
|
|
@six.add_metaclass(abc.ABCMeta)
|
|
class AbstractVersionHandler(object):
|
|
@abc.abstractmethod
|
|
def get_node_processes(self):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def get_configs(self):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def configure_cluster(self, cluster):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def start_cluster(self, cluster):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def validate(self, cluster):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def validate_scaling(self, cluster, existing, additional):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def scale_cluster(self, cluster, instances):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def decommission_nodes(self, cluster, instances):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def get_edp_engine(self, cluster, job_type):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def get_edp_job_types(self):
|
|
return []
|
|
|
|
@abc.abstractmethod
|
|
def get_edp_config_hints(self, job_type):
|
|
return {}
|
|
|
|
@abc.abstractmethod
|
|
def get_context(self, cluster, added=None, removed=None):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def get_services(self):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def get_required_services(self):
|
|
return
|
|
|
|
@abc.abstractmethod
|
|
def get_open_ports(self, node_group):
|
|
return
|