Skip to content

Commit 0e28331

Browse files
committed
update registrar cli readme
1 parent f9819ed commit 0e28331

File tree

1 file changed

+61
-57
lines changed

1 file changed

+61
-57
lines changed

registrar-cli/README.md

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ This tool allows users to create/get/update farm/account/node on a specified ne
2626

2727
## Usage
2828

29-
## Create Command
29+
## Account Command
3030

31-
Create command allows users to create an account or a farm
31+
Account command represents events on account on Threefold grid4
3232

3333
### Create New Account
3434

@@ -42,136 +42,140 @@ Create command allows users to create an account or a farm
4242
**Example Usage**:
4343

4444
```sh
45-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ ./registrar-cli create account --network dev
45+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ ./registrar-cli account create --network dev
4646
5:00PM INF New Seed (Hex): 7f40eb52530f1a1c1253873cf17d44bd66d3e5ba71a14d0deba7df5517c9ed12
4747
5:00PM INF public key (Hex): c394d84de07fac2b2477588dace29a165a469fe0a9dbc8056686d3340054bf9d
4848
5:00PM INF account is created successfully twinID=33
4949
```
5050

51-
### Create New Farm
51+
### Get Account
5252

5353
**Flags**:
5454

55-
- `--farm_name` (required): The name of the farm to create.
5655
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
57-
- `--seed` (required): A hexadecimal representation of the seed.
58-
- `--dedicated` (optional default: false): is the farm dedicated.
56+
- `--twin-id` (optional): twin id of the account needed to be loaded.
57+
- `--public-key` (optional): public key of the account needed to be loaded.
5958

6059
**Example Usage**:
6160

6261
```sh
63-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ ./registrar-cli create farm --farm-name testFarm1 --seed <seed> --network dev
64-
5:03PM INF farm is created successfully farmID=12
62+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go account get --network dev --twin-id 33
63+
5:00PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":[],"rmb_enc_key":"","twin_id":33}
64+
65+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go account get --network dev --public-key <public-key>
66+
5:01PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":[],"rmb_enc_key":"","twin_id":33}
6567
```
6668

67-
## Get Command
68-
69-
Get command allows users to get account, farm, node or zos version.
70-
71-
### Get Account
69+
### Update Account
7270

7371
**Flags**:
7472

7573
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
76-
- `--twin-id` (optional): twin id of the account needed to be loaded.
77-
- `--public-key` (optional): public key of the account needed to be loaded.
74+
- `--seed` (required): A hexadecimal representation of the seed.
75+
- `--relays` (optional): new relays urls.
76+
- `--rmb-enc-key` (optional): new rmb encryption key.
7877

7978
**Example Usage**:
8079

8180
```sh
82-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get account --network dev --twin-id 33
83-
5:00PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":[],"rmb_enc_key":"","twin_id":33}
81+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go account update --network dev --seed <seed> --relays wss://relay.dev.grid.tf
82+
5:02PM INF account is updated successfully
8483
85-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get account --network dev --public-key <public-key>
86-
5:01PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":[],"rmb_enc_key":"","twin_id":33}
84+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go account get --network dev --twin-id 33
85+
5:02PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":["wss://relay.dev.grid.tf"],"rmb_enc_key":"","twin_id":33}
8786
```
8887

89-
### Get Farm
88+
## Farm Command
89+
90+
Farm command represents events on farms on Threefold grid4
91+
92+
### Create New Farm
9093

9194
**Flags**:
9295

96+
- `--farm_name` (required): The name of the farm to create.
9397
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
94-
- `--farm-id` (optional): id of the farm needed to be loaded.
98+
- `--seed` (required): A hexadecimal representation of the seed.
99+
- `--dedicated` (optional default: false): is the farm dedicated.
95100

96101
**Example Usage**:
97102

98103
```sh
99-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get farm --farm-id 12 --network dev
100-
5:03PM INF farm={"dedicated":false,"farm_id":12,"farm_name":"testFarm1","twin_id":33}
104+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ ./registrar-cli farm create --farm-name testFarm1 --seed <seed> --network dev
105+
5:03PM INF farm is created successfully farmID=12
101106
```
102107

103-
### Get Node
108+
### Get Farm
104109

105110
**Flags**:
106111

107112
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
108-
- `--node-id` (optional): id of the node needed to be loaded.
109-
- `--twin-id` (optional): twin id of the node needed to be loaded.
113+
- `--farm-id` (optional): id of the farm needed to be loaded.
110114

111115
**Example Usage**:
112116

113117
```sh
114-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get node --network dev --node-id 1
115-
12:36PM INF node={"Approved":false,"farm_id":4,"interfaces":[{"ips":"192.168.123.22","mac":"54:fe:9a:b0:73:61","name":"zos"}],"location":{"city":"Cairo","country":"Egypt","latitude":"30.0588","longitude":"31.2268"},"node_id":1,"resources":{"cru":4,"hru":1073741824000,"mru":6230032384,"sru":1610612736000},"secure_boot":false,"serial_number":"Not Specified","twin_id":5,"uptime":null,"virtualized":true}
116-
117-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get node --network dev --twin-id 5
118-
12:36PM INF node={"Approved":false,"farm_id":4,"interfaces":[{"ips":"192.168.123.22","mac":"54:fe:9a:b0:73:61","name":"zos"}],"location":{"city":"Cairo","country":"Egypt","latitude":"30.0588","longitude":"31.2268"},"node_id":1,"resources":{"cru":4,"hru":1073741824000,"mru":6230032384,"sru":1610612736000},"secure_boot":false,"serial_number":"Not Specified","twin_id":5,"uptime":null,"virtualized":true}
118+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go farm get --farm-id 12 --network dev
119+
5:03PM INF farm={"dedicated":false,"farm_id":12,"farm_name":"testFarm1","twin_id":33}
119120
```
120121

121-
### Get Zos Version
122+
### Update Farm
122123

123124
**Flags**:
124125

125126
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
127+
- `--seed` (required): A hexadecimal representation of the seed.
128+
- `--farm-id` (optional): id of the farm needed to be loaded.
129+
- `--farm_name` (optional): The new name of the farm.
130+
- `--dedicated` (optional): update the farm to dedicated.
126131

127132
**Example Usage**:
128133

129134
```sh
130-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get version --network dev
131-
12:40PM INF zosVersion={"safe_to_upgrade":true,"version":"v0.1.8"}
135+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go farm update --farm-name notTestFarm1 --seed <seed> --network dev --farm-id 12
136+
5:04PM INF farm is updated successfully
137+
138+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go farm get --farm-id 12 --network dev
139+
5:04PM INF farm={"dedicated":false,"farm_id":12,"farm_name":"notTestFarm1","twin_id":33}
132140
```
133141

134-
## Update Command
142+
## Node Command
135143

136-
Update command allows users to update account, farm or zos version.
144+
Node command represents events on nodes on Threefold grid4
137145

138-
### Update Account
146+
### Get Node
139147

140148
**Flags**:
141149

142150
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
143-
- `--seed` (required): A hexadecimal representation of the seed.
144-
- `--relays` (optional): new relays urls.
145-
- `--rmb-enc-key` (optional): new rmb encryption key.
151+
- `--node-id` (optional): id of the node needed to be loaded.
152+
- `--twin-id` (optional): twin id of the node needed to be loaded.
146153

147154
**Example Usage**:
148155

149156
```sh
150-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go update account --network dev --seed <seed> --relays wss://relay.dev.grid.tf
151-
5:02PM INF account is updated successfully
157+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go node get --network dev --node-id 1
158+
12:36PM INF node={"Approved":false,"farm_id":4,"interfaces":[{"ips":"192.168.123.22","mac":"54:fe:9a:b0:73:61","name":"zos"}],"location":{"city":"Cairo","country":"Egypt","latitude":"30.0588","longitude":"31.2268"},"node_id":1,"resources":{"cru":4,"hru":1073741824000,"mru":6230032384,"sru":1610612736000},"secure_boot":false,"serial_number":"Not Specified","twin_id":5,"uptime":null,"virtualized":true}
152159
153-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get account --network dev --twin-id 33
154-
5:02PM INF account={"public_key":"w5TYTeB/rCskd1iNrOKaFlpGn+Cp28gFZobTNABUv50=","relays":["wss://relay.dev.grid.tf"],"rmb_enc_key":"","twin_id":33}
160+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go node get --network dev --twin-id 5
161+
12:36PM INF node={"Approved":false,"farm_id":4,"interfaces":[{"ips":"192.168.123.22","mac":"54:fe:9a:b0:73:61","name":"zos"}],"location":{"city":"Cairo","country":"Egypt","latitude":"30.0588","longitude":"31.2268"},"node_id":1,"resources":{"cru":4,"hru":1073741824000,"mru":6230032384,"sru":1610612736000},"secure_boot":false,"serial_number":"Not Specified","twin_id":5,"uptime":null,"virtualized":true}
155162
```
156163

157-
### Update Farm
164+
## Zos Version Command
165+
166+
Zos Version command represents events on zos version on Threefold grid4
167+
168+
### Get Zos Version
158169

159170
**Flags**:
160171

161172
- `--network` (required): Specifies the network (`dev`, `qa`, `test`, `main`).
162-
- `--seed` (required): A hexadecimal representation of the seed.
163-
- `--farm-id` (optional): id of the farm needed to be loaded.
164-
- `--farm_name` (optional): The new name of the farm.
165-
- `--dedicated` (optional): update the farm to dedicated.
166173

167174
**Example Usage**:
168175

169176
```sh
170-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go update farm --farm-name notTestFarm1 --seed <seed> --network dev --farm-id 12
171-
5:04PM INF farm is updated successfully
172-
173-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get farm --farm-id 12 --network dev
174-
5:04PM INF farm={"dedicated":false,"farm_id":12,"farm_name":"notTestFarm1","twin_id":33}
177+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go zos-version get --network dev
178+
12:40PM INF zosVersion={"safe_to_upgrade":true,"version":"v0.1.8"}
175179
```
176180

177181
### Update Zos Version
@@ -185,9 +189,9 @@ Update command allows users to update account, farm or zos version.
185189
**Example Usage**:
186190

187191
```sh
188-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go update version --network dev --version v0.1.8 --safe-to-upgrade --seed <seed>
192+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go zos-version update --network dev --version v0.1.8 --safe-to-upgrade --seed <seed>
189193
5:07PM INF farm is updated successfully
190194
191-
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go get version --network dev
195+
➜ registrar-cli git:(add-registrar-cli-tool) ✗ go run main.go zos-version get --network dev
192196
5:07PM INF zosVersion={"safe_to_upgrade":true,"version":"v0.1.8"}
193197
```

0 commit comments

Comments
 (0)