From f9713e6363e0de4473b37cd850e9fba1caef149b Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Wed, 27 Mar 2024 20:54:10 +0000 Subject: [PATCH] revert 5308ab1e4e60f0b2b272295f04537b62884c5755 revert Blind commit to fix laconic CLI calls after rename. (#784) `laconic cns` got renamed to `laconic registry` which breaks all the scripts and commands that use it. Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/784 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- .../create-demo-records.sh | 2 +- .../data/stacks/fixturenet-laconic-loaded/README.md | 2 +- .../data/stacks/fixturenet-laconicd/README.md | 2 +- stack_orchestrator/deploy/webapp/util.py | 13 ++++++------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh b/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh index a95d73bd..5a5dc34c 100755 --- a/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh +++ b/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh @@ -5,7 +5,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -registry_command="laconic registry" +registry_command="laconic cns" demo_records_dir="scripts/demo-records" # Check we have funds diff --git a/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md b/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md index 6d0f82a6..94f9eb36 100644 --- a/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md +++ b/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md @@ -49,7 +49,7 @@ $ laconic-so --stack fixturenet-laconic-loaded deploy logs ``` ## 6. Test with the Registry CLI ``` -$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic registry status" +$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic cns status" ``` ## 7. View the laconic console Get the URL for the console web app with this command (the port number will be different for each deployment): diff --git a/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md b/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md index d939d0a4..1b04b875 100644 --- a/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md +++ b/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md @@ -44,5 +44,5 @@ $ laconic-so --stack fixturenet-laconicd deploy logs ``` ## 6. Test with the Registry CLI ``` -$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic registry status" +$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status" ``` diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 822eca4e..5c484ed1 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -94,7 +94,7 @@ class LaconicRegistryClient: ) def list_records(self, criteria={}, all=False): - args = ["laconic", "-c", self.config_file, "registry", "record", "list"] + args = ["laconic", "-c", self.config_file, "cns", "record", "list"] if all: args.append("--all") @@ -140,7 +140,7 @@ class LaconicRegistryClient: if name in self.cache.name_or_id: return self.cache.name_or_id[name] - args = ["laconic", "-c", self.config_file, "registry", "name", "resolve", name] + args = ["laconic", "-c", self.config_file, "cns", "name", "resolve", name] parsed = [AttrDict(r) for r in json.loads(logged_cmd(self.log_file, *args))] if parsed: @@ -165,7 +165,7 @@ class LaconicRegistryClient: "laconic", "-c", self.config_file, - "registry", + "cns", "record", "get", "--id", @@ -203,8 +203,7 @@ class LaconicRegistryClient: print(open(record_fname, 'r').read(), file=self.log_file) new_record_id = json.loads( - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", - "record", "publish", "--filename", record_fname) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "record", "publish", "--filename", record_fname) )["id"] for name in names: self.set_name(name, new_record_id) @@ -213,10 +212,10 @@ class LaconicRegistryClient: logged_cmd(self.log_file, "rm", "-rf", tmpdir) def set_name(self, name, record_id): - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", "name", "set", name, record_id) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "name", "set", name, record_id) def delete_name(self, name): - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", "name", "delete", name) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "name", "delete", name) def file_hash(filename): -- 2.45.2