Skip to content

Commit 5283ec9

Browse files
authored
Merge pull request #634 from reubenmiller/docs-update-docs-for-release-2.54
docs: update docs for release 2.54
2 parents be9cdd4 + c307099 commit 5283ec9

23 files changed

Lines changed: 691 additions & 88 deletions

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,56 @@ See the following installation instructions
2424
* [PowerShell](https://goc8ycli.netlify.app/docs/installation/powershell-installation)
2525

2626

27+
## Testing an unreleased version
28+
29+
These instructions are for testing a version that has not yet been officially released, for example directly from a pull request or a specific commit. Go >= 1.25 must be installed on your machine.
30+
31+
### Install
32+
33+
1. Install `c8y` from a specific commit (replace the commit hash with the one you want to test)
34+
35+
```sh
36+
go install github.com/reubenmiller/go-c8y-cli/v2/cmd/c8y@<commit-or-branch>
37+
```
38+
39+
For example, to install from a specific commit:
40+
41+
```sh
42+
go install github.com/reubenmiller/go-c8y-cli/v2/cmd/c8y@7aace7646dfcb7c2a632da85e869daf99c749b90
43+
```
44+
45+
2. Make sure the Go binary path is on your `PATH` and takes precedence over any existing `c8y` installation
46+
47+
```sh
48+
export PATH="$(go env GOPATH)/bin:$PATH"
49+
hash -r
50+
```
51+
52+
3. Verify the binary is the expected version
53+
54+
```sh
55+
c8y version
56+
```
57+
58+
4. Try it out (note: tab completion won't work when using the `set-session` helper)
59+
60+
```sh
61+
# Option 1: Use an explicit host (no session file required)
62+
eval "$(c8y sessions login --from-prompt --host example.cumulocity.com)"
63+
64+
# To enable verbose/debug output, add the -v flag
65+
c8y currentuser get -v
66+
```
67+
68+
### Uninstall
69+
70+
To remove the dev binary and restore the previously installed version:
71+
72+
```sh
73+
rm "$(go env GOPATH)/bin/c8y"
74+
hash -r
75+
```
76+
2777
## Documentation
2878
2979
See the [documentation website](https://goc8ycli.netlify.app/) for instructions on how to install and use it.

docs/go-c8y-cli/docs/cli/c8y/alarms/assert/c8y_alarms_assert_count.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $ c8y devices list | c8y alarms assert count --maximum 0 --dateFrom -7d
4040
### Options
4141

4242
```
43+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4344
--dateFrom string Start date or date and time of alarm occurrence.
4445
--dateTo string End date or date and time of alarm occurrence.
4546
--device strings The ManagedObject which is the source of this event. (accepts pipeline)
@@ -50,7 +51,6 @@ $ c8y devices list | c8y alarms assert count --maximum 0 --dateFrom -7d
5051
--maximum int Maximum alarm count (inclusive). A value of -1 will disable this check (default -1)
5152
--minimum int Minimum alarm count (inclusive). A value of -1 will disable this check (default -1)
5253
--resolved When set to true only resolved alarms will be removed (the one with status CLEARED), false means alarms with status ACTIVE or ACKNOWLEDGED.
53-
--retries int Number of retries before giving up per id
5454
--severity string Alarm severity, for example CRITICAL, MAJOR, MINOR or WARNING.
5555
--status string Comma separated alarm statuses, for example ACTIVE,CLEARED.
5656
--strict Strict mode, fail if no match is found
@@ -99,6 +99,7 @@ $ c8y devices list | c8y alarms assert count --maximum 0 --dateFrom -7d
9999
--progress Show progress bar. This will also disable any other verbose output
100100
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
101101
-r, --raw Show raw response. This mode will force output=json and view=off
102+
--retries int Max number of attempts when a failed http call is encountered (default 3)
102103
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
103104
--session string Session configuration
104105
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/devices/assert/c8y_devices_assert_exists.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ $ echo 1 | c8y devices assert exists --strict
4242
### Options
4343

4444
```
45+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4546
--device strings The ManagedObject which is the source of this event. (accepts pipeline)
4647
--duration string Timeout duration. i.e. 30s or 1m (1 minute) (default "30s")
4748
-h, --help help for exists
4849
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
4950
--not Negate the match
50-
--retries int Number of retries before giving up per id
5151
--strict Strict mode, fail if no match is found
5252
```
5353

@@ -93,6 +93,7 @@ $ echo 1 | c8y devices assert exists --strict
9393
--progress Show progress bar. This will also disable any other verbose output
9494
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9595
-r, --raw Show raw response. This mode will force output=json and view=off
96+
--retries int Max number of attempts when a failed http call is encountered (default 3)
9697
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
9798
--session string Session configuration
9899
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/devices/assert/c8y_devices_assert_fragments.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ $ c8y devices list --device 1111 | c8y operations fragments --status "FAILED" --
3838
### Options
3939

4040
```
41+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4142
--device strings The ManagedObject which is the source of this event. (accepts pipeline)
4243
--duration string Timeout duration. i.e. 30s or 1m (1 minute) (default "30s")
4344
--fragments strings Fragments to fragments for. If multiple values are given, then it will be applied as an OR operation
4445
-h, --help help for fragments
4546
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
46-
--retries int Number of retries before giving up per id
4747
--strict Strict mode, fail if no match is found
4848
```
4949

@@ -89,6 +89,7 @@ $ c8y devices list --device 1111 | c8y operations fragments --status "FAILED" --
8989
--progress Show progress bar. This will also disable any other verbose output
9090
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9191
-r, --raw Show raw response. This mode will force output=json and view=off
92+
--retries int Max number of attempts when a failed http call is encountered (default 3)
9293
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
9394
--session string Session configuration
9495
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/events/assert/c8y_events_assert_count.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $ c8y devices list | c8y events assert count --maximum 0 --dateFrom -7d
4040
### Options
4141

4242
```
43+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4344
--dateFrom string Start date or date and time of event occurrence.
4445
--dateTo string End date or date and time of event occurrence.
4546
--device strings The ManagedObject which is the source of this event. (accepts pipeline)
@@ -49,7 +50,6 @@ $ c8y devices list | c8y events assert count --maximum 0 --dateFrom -7d
4950
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
5051
--maximum int Maximum event count (inclusive). A value of -1 will disable this check (default -1)
5152
--minimum int Minimum event count (inclusive). A value of -1 will disable this check (default -1)
52-
--retries int Number of retries before giving up per id
5353
--strict Strict mode, fail if no match is found
5454
--type string Event type.
5555
```
@@ -96,6 +96,7 @@ $ c8y devices list | c8y events assert count --maximum 0 --dateFrom -7d
9696
--progress Show progress bar. This will also disable any other verbose output
9797
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9898
-r, --raw Show raw response. This mode will force output=json and view=off
99+
--retries int Max number of attempts when a failed http call is encountered (default 3)
99100
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
100101
--session string Session configuration
101102
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/inventory/assert/c8y_inventory_assert_exists.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ $ echo 1 | c8y inventory assert exists --strict
4242
### Options
4343

4444
```
45+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4546
--duration string Timeout duration. i.e. 30s or 1m (1 minute) (default "30s")
4647
-h, --help help for exists
4748
--id strings Inventory id (required) (accepts pipeline)
4849
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
4950
--not Negate the match
50-
--retries int Number of retries before giving up per id
5151
--strict Strict mode, fail if no match is found
5252
```
5353

@@ -93,6 +93,7 @@ $ echo 1 | c8y inventory assert exists --strict
9393
--progress Show progress bar. This will also disable any other verbose output
9494
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9595
-r, --raw Show raw response. This mode will force output=json and view=off
96+
--retries int Max number of attempts when a failed http call is encountered (default 3)
9697
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
9798
--session string Session configuration
9899
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/inventory/assert/c8y_inventory_assert_fragments.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ $ c8y inventory list --device 1111 | c8y operations fragments --status "FAILED"
3838
### Options
3939

4040
```
41+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4142
--duration string Timeout duration. i.e. 30s or 1m (1 minute) (default "30s")
4243
--fragments strings Fragments to fragments for. If multiple values are given, then it will be applied as an OR operation
4344
-h, --help help for fragments
4445
--id strings Inventory id (required) (accepts pipeline)
4546
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
46-
--retries int Number of retries before giving up per id
4747
--strict Strict mode, fail if no match is found
4848
```
4949

@@ -89,6 +89,7 @@ $ c8y inventory list --device 1111 | c8y operations fragments --status "FAILED"
8989
--progress Show progress bar. This will also disable any other verbose output
9090
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9191
-r, --raw Show raw response. This mode will force output=json and view=off
92+
--retries int Max number of attempts when a failed http call is encountered (default 3)
9293
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
9394
--session string Session configuration
9495
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/measurements/assert/c8y_measurements_assert_count.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $ c8y devices list | c8y measurements assert count --maximum 0 --dateFrom -7d
4040
### Options
4141

4242
```
43+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4344
--dateFrom string Start date or date and time of measurement occurrence.
4445
--dateTo string End date or date and time of measurement occurrence.
4546
--device strings The ManagedObject which is the source of this event. (accepts pipeline)
@@ -48,7 +49,6 @@ $ c8y devices list | c8y measurements assert count --maximum 0 --dateFrom -7d
4849
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
4950
--maximum int Maximum measurement count (inclusive). A value of -1 will disable this check (default -1)
5051
--minimum int Minimum measurement count (inclusive). A value of -1 will disable this check (default -1)
51-
--retries int Number of retries before giving up per id
5252
--strict Strict mode, fail if no match is found
5353
--type string Measurement type.
5454
--valueFragmentSeries string value fragment series
@@ -97,6 +97,7 @@ $ c8y devices list | c8y measurements assert count --maximum 0 --dateFrom -7d
9797
--progress Show progress bar. This will also disable any other verbose output
9898
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9999
-r, --raw Show raw response. This mode will force output=json and view=off
100+
--retries int Max number of attempts when a failed http call is encountered (default 3)
100101
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
101102
--session string Session configuration
102103
--sessionMode string Override default session mode for a single command which would normally be disabled

docs/go-c8y-cli/docs/cli/c8y/operations/assert/c8y_operations_assert_count.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $ c8y devices list | c8y operations assert count --maximum 0 --dateFrom -7d
4040
### Options
4141

4242
```
43+
--attempts int Number of attempts before giving up per id (-1 = unlimited) (default -1)
4344
--bulkOperationId string Bulk operation id. Only retrieve operations related to the given bulk operation.
4445
--dateFrom string Start date or date and time of operation.
4546
--dateTo string End date or date and time of operation.
@@ -50,7 +51,6 @@ $ c8y devices list | c8y operations assert count --maximum 0 --dateFrom -7d
5051
--interval string Interval to check on the status, i.e. 10s or 1min (default "5s")
5152
--maximum int Maximum operation count (inclusive). A value of -1 will disable this check (default -1)
5253
--minimum int Minimum operation count (inclusive). A value of -1 will disable this check (default -1)
53-
--retries int Number of retries before giving up per id
5454
--status string Operation status, can be one of SUCCESSFUL, FAILED, EXECUTING or PENDING.
5555
--strict Strict mode, fail if no match is found
5656
```
@@ -97,6 +97,7 @@ $ c8y devices list | c8y operations assert count --maximum 0 --dateFrom -7d
9797
--progress Show progress bar. This will also disable any other verbose output
9898
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
9999
-r, --raw Show raw response. This mode will force output=json and view=off
100+
--retries int Max number of attempts when a failed http call is encountered (default 3)
100101
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
101102
--session string Session configuration
102103
--sessionMode string Override default session mode for a single command which would normally be disabled
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"key": "c8y-scripts", "label": "scripts"}

0 commit comments

Comments
 (0)