예제 #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
파일: info.py 프로젝트: tom-dierckx/stackl
def info():
    stackl_context = StacklContext()
    about_api = stackl_client.AboutApi(api_client=stackl_context.api_client)
    click.echo(about_api.get_hostname())