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