Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def get(cluster_attributes, db_dir=None):
    #TODO: add brief description
    try:
        if cluster_attributes['cluster_type'].lower() == 'moab':
            return MoabAgent(
                cluster_attributes,
                0,
                db_dir,
                use_built_in=True    #temp use system built-in predictor
                )
        else:
            logging.error("Unknown cluster type: {0}".format(str(cluster_attributes['type'])))
    except Exception as e:
        #traceback.print_exception()
        logging.error('bundle agent creation failed: {} {}'.format(e.__class__, e))
        


src/t/r/troy-0.0.3/troy/external/bundle/src/bundle/impl/bundle_manager.py   troy(Download)
    def add_cluster(self, cluster_credential, finished_job_trace):
        #TODO check duplicated hostname
        cluster = bundle_agent.get(cluster_credential, finished_job_trace)
        if cluster:
            cluster_list[cluster_credential['hostname']] = cluster