当前位置: 首页>>代码示例>>Python>>正文


Python ServiceRole.to_string方法代码示例

本文整理汇总了Python中cm.services.ServiceRole.to_string方法的典型用法代码示例。如果您正苦于以下问题:Python ServiceRole.to_string方法的具体用法?Python ServiceRole.to_string怎么用?Python ServiceRole.to_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cm.services.ServiceRole的用法示例。


在下文中一共展示了ServiceRole.to_string方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(PostgresService, self).__init__(app)
     self.name = ServiceRole.to_string(ServiceRole.GALAXY_POSTGRES)
     self.svc_roles = [ServiceRole.GALAXY_POSTGRES]
     self.psql_port = app.path_resolver.psql_db_port
     self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_DATA),
                          ServiceDependency(self, ServiceRole.MIGRATION)]
开发者ID:blankenberg,项目名称:cloudman,代码行数:9,代码来源:postgres.py

示例2: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
    def __init__(self, app):
        super(ClouderaManagerService, self).__init__(app)
        self.svc_roles = [ServiceRole.CLOUDERA_MANAGER]
        self.name = ServiceRole.to_string(ServiceRole.CLOUDERA_MANAGER)
        self.dependencies = []
        self.db_pwd = misc.random_string_generator()
        # Indicate if the web server has been configured and started
        self.started = False
        self.cm_port = 7180

        # Default cluster configuration
        self.cm_host = socket.gethostname()
        self.host_list = [self.cm_host]
        self.cluster_name = "Cluster 1"
        self.cdh_version = "CDH5"
        self.cdh_version_number = "5"
        self.cm_username = "admin"
        self.cm_password = "admin"
        self.cm_service_name = "ManagementService"
        self.host_username = "ubuntu"
        # Read the password from the system!
        self.host_password = self.app.config.get('password')
        self.cm_repo_url = None
        self.service_types_and_names = {
            "HDFS": "HDFS",
            "YARN": "YARN",
            "ZOOKEEPER": "ZooKeeper"
        }
开发者ID:martenson,项目名称:cloudman,代码行数:30,代码来源:clouderamanager.py

示例3: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app, instance_role='master'):
     super(PSSService, self).__init__(app)
     self.svc_roles = [ServiceRole.PSS]
     self.name = ServiceRole.to_string(ServiceRole.PSS)
     self.svc_type = ServiceType.CM_SERVICE
     self.instance_role = instance_role
     log.debug("Configured PSS as {0}".format(self.instance_role))
开发者ID:martenson,项目名称:cloudman,代码行数:9,代码来源:pss.py

示例4: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(HadoopService, self).__init__(app)
     self.svc_roles = [ServiceRole.HADOOP]
     self.name = ServiceRole.to_string(ServiceRole.HADOOP)
     self.dependencies = [ServiceDependency(self, ServiceRole.SGE)]
     self.id_rsa_path = os.path.join(paths.P_HADOOP_HOME, "id_rsa")
     self.id_rsa_pub_key_path = os.path.join(
         paths.P_HADOOP_HOME, "id_rsa.pub")
开发者ID:jmchilton,项目名称:cloudman,代码行数:10,代码来源:hadoop.py

示例5: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(NodejsProxyService, self).__init__(app)
     self.svc_roles = [ServiceRole.NODEJSPROXY]
     self.name = ServiceRole.to_string(ServiceRole.NODEJSPROXY)
     self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_TOOLS),
                          ServiceDependency(self, ServiceRole.SUPERVISOR)]
     self.np_port = 8800
     self.supervisor_conf_dir = '/etc/supervisor/conf.d'
     self.supervisor_prog_name = 'galaxy_nodejs_proxy'
开发者ID:blankenberg,项目名称:cloudman,代码行数:11,代码来源:nodejsproxy.py

示例6: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(CloudgeneService, self).__init__(app)
     self.svc_roles = [ServiceRole.CLOUDGENE]
     self.name = ServiceRole.to_string(ServiceRole.CLOUDGENE)
     self.dependencies = [ServiceDependency(self, ServiceRole.CLOUDERA_MANAGER)]
     self.port = 8085
     self.cg_url = "https://cloudman.s3.amazonaws.com/files/cloudgene-cloudman-daemon.tar.gz"
     self.cg_base_dir = '/mnt/galaxy/cloudgene/'
     self.cg_home = os.path.join(self.cg_base_dir, 'cloudgene-daemon')
开发者ID:blankenberg,项目名称:cloudman,代码行数:11,代码来源:cloudgene.py

示例7: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(SlurmdService, self).__init__(app)
     self.svc_roles = [ServiceRole.SLURMD]
     self.name = ServiceRole.to_string(ServiceRole.SLURMD)
     self.dependencies = [
         ServiceDependency(self, ServiceRole.SLURMCTLD),
     ]
     self.num_restarts = 0
     self.max_restarts = 3
开发者ID:blankenberg,项目名称:cloudman,代码行数:11,代码来源:slurmd.py

示例8: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(PulsarService, self).__init__(app)
     self.pulsar_home = None
     self.pulsar_port = DEFAULT_PULSAR_PORT
     self.name = ServiceRole.to_string(ServiceRole.PULSAR)
     self.svc_roles = [ServiceRole.PULSAR]
     self.dependencies = [
         ServiceDependency(self, ServiceRole.JOB_MANAGER)
     ]
开发者ID:martenson,项目名称:cloudman,代码行数:11,代码来源:pulsar.py

示例9: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(LwrService, self).__init__(app)
     self.lwr_home = self.app.path_resolver.lwr_home
     self.lwr_port = DEFAULT_LWR_PORT
     self.name = ServiceRole.to_string(ServiceRole.LWR)
     self.svc_roles = [ServiceRole.LWR]
     self.dependencies = [
         ServiceDependency(self, ServiceRole.SGE),  # Well someday anyway :)
         ServiceDependency(self, ServiceRole.GALAXY_TOOLS)  # Anyway to make this depend on where LWR installed?
     ]
开发者ID:jmchilton,项目名称:cloudman,代码行数:12,代码来源:lwr.py

示例10: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     """
     Initialize the service class by setting role and indicating dependencies
     """
     super(ProFTPdService, self).__init__(app)
     log.debug("Initializing ProFTPdService")
     self.svc_roles = [ServiceRole.PROFTPD]
     self.name = ServiceRole.to_string(ServiceRole.PROFTPD)
     self.dependencies = [ServiceDependency(self, ServiceRole.GALAXY_POSTGRES),
                          ServiceDependency(self, ServiceRole.GALAXY_DATA)]
开发者ID:jmchilton,项目名称:cloudman,代码行数:12,代码来源:proftpd.py

示例11: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(GalaxyReportsService, self).__init__(app)
     self.galaxy_home = self.app.path_resolver.galaxy_home
     self.reports_port = DEFAULT_REPORTS_PORT
     self.name = ServiceRole.to_string(ServiceRole.GALAXY_REPORTS)
     self.svc_roles = [ServiceRole.GALAXY_REPORTS]
     self.dependencies = [ServiceDependency(
         self, ServiceRole.GALAXY)]  # Hopefully Galaxy dependency alone enough to ensure database migrated, etc...
     self.conf_dir = os.path.join(
         self.app.path_resolver.galaxy_home, 'reports.conf.d')
开发者ID:jmchilton,项目名称:cloudman,代码行数:12,代码来源:galaxyreports.py

示例12: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app, as_min=-1, as_max=-1, instance_type=None):
     super(AutoscaleService, self).__init__(app)
     self.state = service_states.UNSTARTED
     self.svc_roles = [ServiceRole.AUTOSCALE]
     self.svc_type = ServiceType.CM_SERVICE
     self.name = ServiceRole.to_string(ServiceRole.AUTOSCALE)
     self.dependencies = [ServiceDependency(self, ServiceRole.MIGRATION)]
     self.as_max = as_max  # Max number of nodes autoscale should maintain
     self.as_min = as_min  # Min number of nodes autoscale should maintain
     self.instance_type = instance_type  # Type of instances to start
开发者ID:kaktus42,项目名称:cloudman,代码行数:12,代码来源:autoscale.py

示例13: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app):
     super(SupervisorService, self).__init__(app)
     self.svc_roles = [ServiceRole.SUPERVISOR]
     self.name = ServiceRole.to_string(ServiceRole.SUPERVISOR)
     self.dependencies = []
     self.sv_port = 9002
     self.pid_file = '/var/run/supervisord.pid'
     self.main_conf_file = '/etc/supervisord.conf'
     self.conf_dir = '/etc/supervisor/conf.d'
     self.server = None
     self.log_file = '/var/log/supervisor/supervisord.log'
开发者ID:AAFC-MBB,项目名称:cloudman,代码行数:13,代码来源:supervisor.py

示例14: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, app, instance_role='master'):
     super(PSSService, self).__init__(app)
     self.svc_roles = [ServiceRole.PSS]
     self.name = ServiceRole.to_string(ServiceRole.PSS)
     self.instance_role = instance_role
     log.debug("Configured PSS as {0}".format(self.instance_role))
     # Name of the default script to run
     self.pss_filename = 'post_start_script' if self.instance_role == 'master' \
         else 'worker_post_start_script'
     self.pss_url = self.app.ud.get('post_start_script_url', None) if self.instance_role == 'master' \
         else self.app.ud.get('worker_post_start_script_url', None)
开发者ID:jmchilton,项目名称:cloudman,代码行数:13,代码来源:pss.py

示例15: __init__

# 需要导入模块: from cm.services import ServiceRole [as 别名]
# 或者: from cm.services.ServiceRole import to_string [as 别名]
 def __init__(self, filesystem, from_archive=None):
     """
     Instance's transient storage exposed over NFS.
     """
     super(TransientStorage, self).__init__(filesystem.app)
     self.fs = filesystem
     self.app = self.fs.app
     self.device = None
     self.from_archive = from_archive
     self.svc_roles = [ServiceRole.TRANSIENT_NFS]
     self.name = ServiceRole.to_string(ServiceRole.TRANSIENT_NFS)
开发者ID:martenson,项目名称:cloudman,代码行数:13,代码来源:transient_storage.py


注:本文中的cm.services.ServiceRole.to_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。