Exemplo n.º 1
0
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)
Exemplo n.º 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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
def create(ctx):
    ctx.obj = StacklContext()
Exemplo n.º 5
0
def get_stackl_context():
    return StacklContext()
Exemplo n.º 6
0
def update(ctx):
    ctx.obj = StacklContext()
Exemplo n.º 7
0
def get(ctx):
    ctx.obj = StacklContext()
Exemplo n.º 8
0
def delete(ctx):
    ctx.obj = StacklContext()
Exemplo n.º 9
0
def edit(ctx):
    ctx.obj = StacklContext()
Exemplo n.º 10
0
def info():
    stackl_context = StacklContext()
    about_api = stackl_client.AboutApi(api_client=stackl_context.api_client)
    click.echo(about_api.get_hostname())