當前位置: 首頁>>代碼示例>>Python>>正文


Python base.BaseClient類代碼示例

本文整理匯總了Python中cps.base.BaseClient的典型用法代碼示例。如果您正苦於以下問題:Python BaseClient類的具體用法?Python BaseClient怎麽用?Python BaseClient使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseClient類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print "    add_nodes         serviceid count [cloud] # add the specified number of scalaris nodes."
     print "                                              # Set \'cloud\' to \'auto\' to automatically place nodes across multiple clouds."
     print "    remove_nodes      serviceid count [cloud] # remove the specified number of scalaris nodes"
     print "    list_nodes        serviceid               # list all nodes"
     print "    get_node_info     serviceid nodeid        # get information about the specified node"
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:7,代碼來源:scalaris.py

示例2: usage

 def usage(self, aid, sid ):
     BaseClient.usage(self, aid, sid)
     print ""
     print "    ----Service specific commands-------"
     print ""
     print "    get_helloworld appid serviceid"
     print "    add_nodes      appid serviceid count [cloud]"
     print "    remove_nodes   appid serviceid count"
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:8,代碼來源:helloworld.py

示例3: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print "    set_password      serviceid password"
     print "    add_nodes         serviceid count [cloud]"
     print "    add_glb_nodes     serviceid count [cloud]"
     print "    remove_nodes      serviceid count"
     print "    remove_glb_nodes  serviceid count"
     print "    sqldump           serviceid"
     print "    load_dump         serviceid filename"
     print "    migrate_nodes     serviceid origin_cloud:node_id:dest_cloud[,o_cloud:node_id:d_cloud]* [delay]"
開發者ID:mehulsbhatt,項目名稱:conpaas,代碼行數:10,代碼來源:galera.py

示例4: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print "    add_nodes         serviceid count [cloud] # add the specified number of osd nodes"
     print "    remove_nodes      serviceid count [cloud] # remove the specified number of osd nodes"
     print "    list_volumes      serviceid"
     print "    create_volume     serviceid vol_name"
     print "    delete_volume     serviceid vol_name"
     print "    list_policies     serviceid policy_type # [ osd_sel | replica_sel | replication ]"
     print "    set_policy        serviceid policy_type vol_name policy [factor]"
     print "    toggle_persistent serviceid"
     print "    set_osd_size      serviceid vol_size"
開發者ID:dzeno,項目名稱:conpaas,代碼行數:11,代碼來源:xtreemfs.py

示例5: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print "    add_nodes         serviceid b w p [cloud]     # add    b backend, w web and p proxy nodes"
     print "    remove_nodes      serviceid b w p     # remove b backend, w web and p proxy nodes"
     print "    list_keys         serviceid           # list authorized SSH keys"
     print "    upload_key        serviceid filename  # upload an SSH key"
     print "    list_uploads      serviceid           # list uploaded code versions"
     print "    upload_code       serviceid filename  # upload a new code version"
     print "    download_code     serviceid version   # download a specific code version"
     # implemented in {php,java}.py
     print "    enable_code       serviceid version   # set a specific code version active" 
開發者ID:dzeno,項目名稱:conpaas,代碼行數:11,代碼來源:web.py

示例6: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)

        print 'persistent:', service['persistent']
        print 'osd_volume_size:', service['osd_volume_size']

        nodes = self.callmanager(service['sid'], "list_nodes", False, {})
        if 'error' in nodes:
            return

        print nodes

        for role in ( 'dir', 'mrc', 'osd' ):
            print "\n", role.upper(), "nodes:"

            for node in nodes[role]:
                params = { 'serviceNodeId': node }
                details = self.callmanager(service['sid'], "get_node_info", False, params)

                if 'error' in details:
                    print node, details['error']
                    continue

                if role == 'dir':
                    port = 30638

                if role == 'osd':
                    port = 30640
                    
                if role == 'mrc':
                    port = 30636

                print "http://%s:%s" % (details['serviceNode']['ip'], port)
開發者ID:dzeno,項目名稱:conpaas,代碼行數:33,代碼來源:xtreemfs.py

示例7: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print " == HTC specific commands == "
     print "    hosts            serviceid "
     print "    create_job       serviceid   bot_file"
     print "    upload_file      serviceid   file"
     #print "    create_worker    serviceid    type [cloud]"
     print "    create_worker    serviceid   [cloud]"
     print "    remove_worker    serviceid   worker_id"
     print "    configuration    serviceid"
     print "    throughput       serviceid"
     print "    add              serviceid   job_id   bot_file"
     print "    remove           serviceid   job_id   bot_file"
     print "    sample           serviceid   job_id"
     print "    submit           serviceid   job_id"
     print "    stat             serviceid"
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:16,代碼來源:htc.py

示例8: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)
        nodes = self.callmanager(service['sid'], "list_nodes", False, {})
    	print type(nodes)    
        for n in nodes:
            print n + "	:	" +str(nodes[n])

        if 'dict' in service:
            print service['dict']
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:9,代碼來源:htc.py

示例9: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)

        nodes = self.callmanager(service['sid'], "list_nodes", False, {})
        if not 'error' in nodes:
            for node in nodes['helloworld']:
                params = { 'serviceNodeId': node }
                details = self.callmanager(service['sid'], "get_node_info", False, params)
                print "helloworld agent:", details['serviceNode']['ip']
開發者ID:mehulsbhatt,項目名稱:conpaas,代碼行數:9,代碼來源:helloworld.py

示例10: info

 def info(self, service_id):
     service = BaseClient.info(self, service_id)
     
     nodes = self.callmanager(service['sid'], "list_nodes", False, {})
     if 'node' in nodes:
         # Multiple nodes
         for node in nodes['node']:
             params = { 'serviceNodeId': node }
             details = self.callmanager(service['sid'], "get_node_info", False, params)
             print "node url:", "http://%s:3306" % details['serviceNode']['ip']
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:10,代碼來源:blueprint.py

示例11: usage

 def usage(self, cmdname):
     BaseClient.usage(self, cmdname)
     print "    add_nodes         serviceid count [cloud] # add the specified number of nodes"
     print "    remove_nodes      serviceid count     # remove the specified number of nodes"
     print "    upload_code       serviceid filename  # upload a new code version"
     print "    list_keys         serviceid           # list authorized SSH keys"
     print "    upload_key        serviceid filename  # upload an SSH key"
     print "    list_uploads      serviceid           # list uploaded code versions"
     print "    download_code     serviceid version   # download a specific code version"
     print "    enable_code       serviceid version   # set a specific code version active"
     print "    delete_code       serviceid version   # delete a specific code version"
     print "    list_volumes      serviceid           # list the volumes in use by the Generic agents"
     print "    create_volume     serviceid vol_name size(MB) agent_id # create a volume and attatch it to a Generic agent"
     print "    delete_volume     serviceid vol_name  # detach and delete a volume"
     print "    run               serviceid [param]   # execute the run.sh script"
     print "    interrupt         serviceid [param]   # execute the interrupt.sh script"
     print "    cleanup           serviceid [param]   # execute the cleanup.sh script"
     print "    get_script_status serviceid           # get the status of the scripts for each Generic agent"
     print "    get_agent_log     serviceid agent_id [filename] # get the agent logs"
開發者ID:mehulsbhatt,項目名稱:conpaas,代碼行數:19,代碼來源:generic.py

示例12: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)

        nodes = self.callmanager(service['sid'], "list_nodes", False, {})
        if 'scalaris' in nodes:
            for node in nodes['scalaris']:
                params = { 'serviceNodeId': node }
                details = self.callmanager(service['sid'], 
                    "get_node_info", False, params)

                print "management server url:",
                print "http://%s:8000" % details['serviceNode']['ip']
開發者ID:ConPaaS-team,項目名稱:conpaas,代碼行數:12,代碼來源:scalaris.py

示例13: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)
        
        nodes = self.callmanager(service['sid'], "list_nodes", False, {})

        for node in nodes['masters']:
            params = { 'serviceNodeId': node }
            details = self.callmanager(service['sid'], "get_node_info", False, params)
            print "master url:", "mysql://%s:3306" % details['serviceNode']['ip']

        for node in nodes['slaves']:
            params = { 'serviceNodeId': node }
            details = self.callmanager(service['sid'], "get_node_info", False, params)
            print "slave url: ", "mysql://%s:3306" % details['serviceNode']['ip']
開發者ID:mihaisoloi,項目名稱:conpaas,代碼行數:14,代碼來源:mysql.py

示例14: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)

        nodes = self.callmanager(service['sid'], "list_nodes", False, {})
        if 'error' in nodes:
            return 

        for what in 'proxy', 'web', 'backend':
            print what,
            for proxy in nodes[what]:
                params = { 'serviceNodeId': proxy }
                details = self.callmanager(service['sid'], "get_node_info", False, params)
                print details['serviceNode']['ip'],

            print
開發者ID:dzeno,項目名稱:conpaas,代碼行數:15,代碼來源:web.py

示例15: info

    def info(self, service_id):
        service = BaseClient.info(self, service_id)

        nodes = self.callmanager(service["sid"], "list_nodes", False, {})

        for node in nodes["nodes"]:
            params = {"serviceNodeId": node}
            details = self.callmanager(service["sid"], "get_node_info", False, params)
            node_info = details["serviceNode"]
            print "node: ip=%s cloud=%s vmid=%s" % (node_info["ip"], node_info["cloud"], node_info["vmid"])

        for node in nodes["glb_nodes"]:
            params = {"serviceNodeId": node}
            details = self.callmanager(service["sid"], "get_node_info", False, params)
            node_info = details["serviceNode"]
            print "glb node: ip=%s cloud=%s vmid=%s" % (node_info["ip"], node_info["cloud"], node_info["vmid"])
開發者ID:mehulsbhatt,項目名稱:conpaas,代碼行數:16,代碼來源:galera.py


注:本文中的cps.base.BaseClient類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。