示例#1
0
文件: apply.py 项目: stgrace/stackl
def apply(directory, config_file, params, tags, secrets, service_params,
          replicas, instance_name, show_progress):
    stackl_context = StacklContext()
    if instance_name is None:
        upload_files(directory, stackl_context)
    else:
        apply_stack_instance(config_file, params, tags, secrets,
                             service_params, replicas, stackl_context,
                             instance_name, show_progress)
示例#2
0
def info():
    try:
        stackl_context = StacklContext()
        about_api = stackl_apis.AboutApi(api_client=stackl_context.api_client)
        click.echo(about_api.get_hostname())
    except (NewConnectionError, MaxRetryError) as e:
        click.echo("Unable to connect to Stackl host")
        click.echo(e)
        exit(1)
示例#3
0
文件: apply.py 项目: EvelienS/stackl
def apply(directory, config_file, params, tags, secrets, service_params,
          service_secrets, replicas, services, instance_name, show_progress):
    try:
        stackl_context = StacklContext()
        if instance_name is None:
            upload_files(directory, stackl_context)
        else:
            apply_stack_instance(config_file, params, tags, secrets,
                                 service_params, service_secrets, replicas,
                                 services, stackl_context, instance_name,
                                 show_progress)
    except ApiException as e:
        click.echo(e.body)
        exit(1)
    except ApiValueError as e:
        click.echo(e.body)
        exit(1)
    except (NewConnectionError, MaxRetryError) as e:
        click.echo("Unable to connect to Stackl host")
        click.echo(e)
        exit(1)
示例#4
0
def create(ctx):
    ctx.obj = StacklContext()
示例#5
0
def get_stackl_context():
    return StacklContext()
示例#6
0
def update(ctx):
    ctx.obj = StacklContext()
示例#7
0
def get(ctx):
    ctx.obj = StacklContext()
示例#8
0
def delete(ctx):
    ctx.obj = StacklContext()
示例#9
0
def edit(ctx):
    ctx.obj = StacklContext()
示例#10
0
def info():
    stackl_context = StacklContext()
    about_api = stackl_client.AboutApi(api_client=stackl_context.api_client)
    click.echo(about_api.get_hostname())