

@cpo.event_wrapper(True, step=_('Create services'), param=('cluster', 1))
def create_services(self, cluster):
    api = self.get_api_client(cluster)
    fullversion = ('5.0.0' if (cluster.hadoop_version == '5') else cluster.hadoop_version)
    cm_cluster = api.create_cluster(cluster.name, fullVersion=fullversion)
    if (len(self.pu.get_zookeepers(cluster)) > 0):
        cm_cluster.create_service(self.ZOOKEEPER_SERVICE_NAME, ZOOKEEPER_SERVICE_TYPE)
    cm_cluster.create_service(self.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(self.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(self.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
    if self.pu.get_hive_metastore(cluster):
        cm_cluster.create_service(self.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
    if self.pu.get_hue(cluster):
        cm_cluster.create_service(self.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
    if self.pu.get_spark_historyserver(cluster):
        api.create_service(self.SPARK_SERVICE_NAME, SPARK_SERVICE_TYPE)
    if self.pu.get_hbase_master(cluster):
        cm_cluster.create_service(self.HBASE_SERVICE_NAME, HBASE_SERVICE_TYPE)

dataset/ETHPy150Open openstack/sahara/sahara/plugins/cdh/v5/cloudera_utils.py ClouderaUtilsV5.create_services/VarMisuse@201/313 `cm_cluster`->`api`