ockam icon indicating copy to clipboard operation
ockam copied to clipboard

feat(rust): add `--config` argument to `node create` command

Open adrianbenavides opened this issue 3 years ago • 2 comments

It loads a json file containing a list of commands that will be executed after creating a node. To generate this json file, the user can use the global --export, --export-as, and --depends-on arguments on any command, that will copy the command input to the desired file.

How to test

ockam node list --export commands.json
ockam node create blue --config commands.json

Other options to export commands to a json file

# Will generate random name for the command
$ ockam node list --export commands.json

# Set name for command 
$ ockam node list --export commands.json --export-as node-list

# Depend on other command
$ ockam node list --export commands.json --depends-on node-create

Structure of the config file

{
  "node-list": {
    "args": [
      "node",
      "list"
    ],
    "depends_on": null
  }
}

adrianbenavides avatar Sep 16 '22 14:09 adrianbenavides

@mergifyio rebase

adrianbenavides avatar Sep 19 '22 14:09 adrianbenavides

rebase

✅ Branch has been successfully rebased

mergify[bot] avatar Sep 19 '22 14:09 mergify[bot]

@mergifyio rebase

adrianbenavides avatar Sep 22 '22 15:09 adrianbenavides

rebase

✅ Branch has been successfully rebased

mergify[bot] avatar Sep 22 '22 15:09 mergify[bot]