Reset command
This commit is contained in:
parent
cbd7aa2393
commit
1e236d3494
@ -25,3 +25,6 @@ services:
|
|||||||
image: cerc/laconic-registry-cli:local
|
image: cerc/laconic-registry-cli:local
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
laconicd-data:
|
||||||
|
@ -365,6 +365,7 @@ def _orchestrate_cluster_config(ctx, cluster_config, docker, container_exec_env)
|
|||||||
f" = {pd.source_container}.{pd.source_variable}")
|
f" = {pd.source_container}.{pd.source_variable}")
|
||||||
# TODO: add a timeout
|
# TODO: add a timeout
|
||||||
waiting_for_data = True
|
waiting_for_data = True
|
||||||
|
destination_output = "*** no output received yet ***"
|
||||||
while waiting_for_data:
|
while waiting_for_data:
|
||||||
# TODO: fix the script paths so they're consistent between containers
|
# TODO: fix the script paths so they're consistent between containers
|
||||||
source_value = None
|
source_value = None
|
||||||
|
@ -17,7 +17,7 @@ import click
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
from .deploy import up_operation, create_deploy_context
|
from .deploy import up_operation, down_operation, create_deploy_context
|
||||||
from .util import global_options
|
from .util import global_options
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@ -48,7 +48,6 @@ def command(ctx, dir):
|
|||||||
@click.argument('extra_args', nargs=-1) # help: command: up <service1> <service2>
|
@click.argument('extra_args', nargs=-1) # help: command: up <service1> <service2>
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def up(ctx, extra_args):
|
def up(ctx, extra_args):
|
||||||
print(f"Context: {global_options(ctx)}")
|
|
||||||
# Get the stack config file name
|
# Get the stack config file name
|
||||||
stack_file_path = ctx.obj.dir.joinpath("stack.yml")
|
stack_file_path = ctx.obj.dir.joinpath("stack.yml")
|
||||||
# TODO: add cluster name and env file here
|
# TODO: add cluster name and env file here
|
||||||
@ -58,9 +57,14 @@ def up(ctx, extra_args):
|
|||||||
|
|
||||||
|
|
||||||
@command.command()
|
@command.command()
|
||||||
|
@click.argument('extra_args', nargs=-1) # help: command: down <service1> <service2>
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def down(ctx):
|
def down(ctx, extra_args):
|
||||||
print(f"Context: {ctx.parent.obj}")
|
# Get the stack config file name
|
||||||
|
stack_file_path = ctx.obj.dir.joinpath("stack.yml")
|
||||||
|
# TODO: add cluster name and env file here
|
||||||
|
ctx.obj = create_deploy_context(ctx.parent.parent.obj, stack_file_path, None, None, None, None)
|
||||||
|
down_operation(ctx, extra_args, None)
|
||||||
|
|
||||||
|
|
||||||
@command.command()
|
@command.command()
|
||||||
@ -87,6 +91,12 @@ def status(ctx):
|
|||||||
print(f"Context: {ctx.parent.obj}")
|
print(f"Context: {ctx.parent.obj}")
|
||||||
|
|
||||||
|
|
||||||
|
@command.command()
|
||||||
|
@click.pass_context
|
||||||
|
def reset(ctx):
|
||||||
|
ctx.obj = create_deploy_context(ctx.parent.parent.obj, stack_file_path, None, None, None, None)
|
||||||
|
|
||||||
|
|
||||||
#from importlib import resources, util
|
#from importlib import resources, util
|
||||||
# TODO: figure out how to do this dynamically
|
# TODO: figure out how to do this dynamically
|
||||||
#stack = "mainnet-laconic"
|
#stack = "mainnet-laconic"
|
||||||
|
Loading…
Reference in New Issue
Block a user