def __init__(self): super(VersionHandler, self).__init__() self.config_helper = config_helper.ConfigHelperV5() self.cloudera_utils = cloudera_utils.ClouderaUtilsV5() self.plugin_utils = plugin_utils.PluginUtilsV5() self.deploy = deploy self.edp_engine = edp_engine self.validation = validation.ValidatorV5()
class ValidatorV5(validation.Validator): PU = pu.PluginUtilsV5()
def __init__(self): cu.ClouderaUtils.__init__(self) self.pu = pu.PluginUtilsV5()
# 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. from sahara.i18n import _ from sahara.plugins.cdh.v5 import plugin_utils as pu from sahara.plugins import exceptions as ex from sahara.plugins import utils as u from sahara.utils import general as gu PU = pu.PluginUtilsV5() def validate_cluster_creating(cluster): mng_count = _get_inst_count(cluster, 'CLOUDERA_MANAGER') if mng_count != 1: raise ex.InvalidComponentCountException('CLOUDERA_MANAGER', 1, mng_count) nn_count = _get_inst_count(cluster, 'HDFS_NAMENODE') if nn_count != 1: raise ex.InvalidComponentCountException('HDFS_NAMENODE', 1, nn_count) snn_count = _get_inst_count(cluster, 'HDFS_SECONDARYNAMENODE') if snn_count != 1: raise ex.InvalidComponentCountException('HDFS_SECONDARYNAMENODE', 1,
def setUp(self): super(TestPluginUtilsV5, self).setUp() self.plug_utils = pu.PluginUtilsV5() self.version = "v5"