INNER CODE UNIT · Python

resolve_cluster_id

aehrc/VariantSpark · cloud/aws-emr/python/vs_emr/cli.py:72

def resolve_cluster_id(aws_ctx, cluster_id, cluster_id_file):
    if cluster_id is None:
        if cluster_id_file is not None:
            aws_ctx.echo("Loading cluster info from: %s" % cluster_id_file)
            with open(cluster_id_file, "r") as input:
                cluster_info = json.load(input)
            aws_ctx.debug("Cluster info is: %s" % str(cluster_info))
            cluster_id = cluster_info['ClusterId']    
        else:
            raise click.BadOptionUsage('--cluster-id or --cluster-id-file is required')                
    return cluster_id
                
'''
'''
def dict_put_path(dictionary, path_key, value):
    path = path_key.split(".")
    current_dict = dictionary
    for key in path[:-1]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…