Skip to content

Commit 0a1c782

Browse files
authored
IHS-136: Update click version (#1024)
* IHS-136: Update click version * update docs
1 parent 98bb218 commit 0a1c782

8 files changed

Lines changed: 163 additions & 163 deletions

docs/docs/infrahubctl/infrahubctl-branch.mdx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,28 @@ $ infrahubctl branch [OPTIONS] COMMAND [ARGS]...
1818

1919
**Commands**:
2020

21+
* `list`: List all existing branches.
2122
* `create`: Create a new branch.
2223
* `delete`: Delete a branch.
23-
* `list`: List all existing branches.
24-
* `merge`: Merge a Branch with main.
2524
* `rebase`: Rebase a Branch with main.
26-
* `report`: Generate branch cleanup status report.
25+
* `merge`: Merge a Branch with main.
2726
* `validate`: Validate if a branch has some conflict and...
27+
* `report`: Generate branch cleanup status report.
28+
29+
## `infrahubctl branch list`
30+
31+
List all existing branches.
32+
33+
**Usage**:
34+
35+
```console
36+
$ infrahubctl branch list [OPTIONS]
37+
```
38+
39+
**Options**:
40+
41+
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
42+
* `--help`: Show this message and exit.
2843

2944
## `infrahubctl branch create`
3045

@@ -66,16 +81,20 @@ $ infrahubctl branch delete [OPTIONS] BRANCH_NAME
6681
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
6782
* `--help`: Show this message and exit.
6883

69-
## `infrahubctl branch list`
84+
## `infrahubctl branch rebase`
7085

71-
List all existing branches.
86+
Rebase a Branch with main.
7287

7388
**Usage**:
7489

7590
```console
76-
$ infrahubctl branch list [OPTIONS]
91+
$ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
7792
```
7893

94+
**Arguments**:
95+
96+
* `BRANCH_NAME`: [required]
97+
7998
**Options**:
8099

81100
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
@@ -100,14 +119,14 @@ $ infrahubctl branch merge [OPTIONS] BRANCH_NAME
100119
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
101120
* `--help`: Show this message and exit.
102121

103-
## `infrahubctl branch rebase`
122+
## `infrahubctl branch validate`
104123

105-
Rebase a Branch with main.
124+
Validate if a branch has some conflict and is passing all the tests (NOT IMPLEMENTED YET).
106125

107126
**Usage**:
108127

109128
```console
110-
$ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
129+
$ infrahubctl branch validate [OPTIONS] BRANCH_NAME
111130
```
112131

113132
**Arguments**:
@@ -138,22 +157,3 @@ $ infrahubctl branch report [OPTIONS] BRANCH_NAME
138157
* `--update-diff`: Update diff before generating report
139158
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
140159
* `--help`: Show this message and exit.
141-
142-
## `infrahubctl branch validate`
143-
144-
Validate if a branch has some conflict and is passing all the tests (NOT IMPLEMENTED YET).
145-
146-
**Usage**:
147-
148-
```console
149-
$ infrahubctl branch validate [OPTIONS] BRANCH_NAME
150-
```
151-
152-
**Arguments**:
153-
154-
* `BRANCH_NAME`: [required]
155-
156-
**Options**:
157-
158-
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
159-
* `--help`: Show this message and exit.

docs/docs/infrahubctl/infrahubctl-object.mdx

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,53 @@ $ infrahubctl object [OPTIONS] COMMAND [ARGS]...
1616

1717
**Commands**:
1818

19+
* `get`: Query and display Infrahub objects.
1920
* `create`: Create a new object in Infrahub.
21+
* `update`: Update an existing object in Infrahub.
2022
* `delete`: Delete an Infrahub object.
21-
* `get`: Query and display Infrahub objects.
2223
* `load`: Load one or multiple objects files into...
23-
* `update`: Update an existing object in Infrahub.
2424
* `validate`: Validate one or multiple objects files.
2525

26+
## `infrahubctl object get`
27+
28+
Query and display Infrahub objects.
29+
30+
When IDENTIFIER is omitted the command lists all objects of the given
31+
KIND. When IDENTIFIER is provided it displays a single object in
32+
detail view. Empty columns are hidden by default (use --all-columns).
33+
34+
Examples:
35+
infrahubctl object get InfraDevice
36+
infrahubctl object get InfraDevice spine01
37+
infrahubctl object get InfraDevice --filter name__value=spine01
38+
infrahubctl object get InfraDevice --output json
39+
infrahubctl object get InfraDevice --output yaml > backup.yml
40+
41+
Exit codes: 0 = results found, 1 = error (including not found in detail
42+
mode), 80 = list query succeeded but returned zero objects.
43+
44+
**Usage**:
45+
46+
```console
47+
$ infrahubctl object get [OPTIONS] KIND [IDENTIFIER]
48+
```
49+
50+
**Arguments**:
51+
52+
* `KIND`: Infrahub schema kind to query [required]
53+
* `[IDENTIFIER]`: UUID, name, or HFID (use / for multi-part, for example: Cisco/NX-OS)
54+
55+
**Options**:
56+
57+
* `--filter TEXT`: Filter in attr__value=x format
58+
* `-o, --output [table|json|csv|yaml]`: Output format
59+
* `-b, --branch TEXT`: Target branch
60+
* `--limit INTEGER`: Maximum results
61+
* `--offset INTEGER`: Skip first N results
62+
* `--all-columns`: Show all columns including empty ones
63+
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
64+
* `--help`: Show this message and exit.
65+
2666
## `infrahubctl object create`
2767

2868
Create a new object in Infrahub.
@@ -53,21 +93,22 @@ $ infrahubctl object create [OPTIONS] KIND
5393
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
5494
* `--help`: Show this message and exit.
5595

56-
## `infrahubctl object delete`
96+
## `infrahubctl object update`
5797

58-
Delete an Infrahub object.
98+
Update an existing object in Infrahub.
5999

60-
Fetches the object by KIND and IDENTIFIER, then deletes it.
61-
Unless --yes is provided, a confirmation prompt is shown first.
100+
Fetches the object by KIND and IDENTIFIER, applies the requested
101+
changes, and saves back to the server. Use --set or --file.
62102

63103
Examples:
64-
infrahubctl object delete InfraDevice spine01
65-
infrahubctl object delete InfraDevice spine01 --yes
104+
infrahubctl object update InfraDevice spine01 --set status=active
105+
infrahubctl object update InfraDevice spine01 --set location=DC1
106+
infrahubctl object update InfraDevice spine01 --file updates.yml
66107

67108
**Usage**:
68109

69110
```console
70-
$ infrahubctl object delete [OPTIONS] KIND IDENTIFIER
111+
$ infrahubctl object update [OPTIONS] KIND IDENTIFIER
71112
```
72113

73114
**Arguments**:
@@ -77,48 +118,38 @@ $ infrahubctl object delete [OPTIONS] KIND IDENTIFIER
77118

78119
**Options**:
79120

80-
* `-y, --yes`: Skip confirmation prompt
121+
* `--set TEXT`: Field value in key=value format
122+
* `-f, --file PATH`: JSON or YAML file with update data
81123
* `-b, --branch TEXT`: Target branch
82124
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
83125
* `--help`: Show this message and exit.
84126

85-
## `infrahubctl object get`
127+
## `infrahubctl object delete`
86128

87-
Query and display Infrahub objects.
129+
Delete an Infrahub object.
88130

89-
When IDENTIFIER is omitted the command lists all objects of the given
90-
KIND. When IDENTIFIER is provided it displays a single object in
91-
detail view. Empty columns are hidden by default (use --all-columns).
131+
Fetches the object by KIND and IDENTIFIER, then deletes it.
132+
Unless --yes is provided, a confirmation prompt is shown first.
92133

93134
Examples:
94-
infrahubctl object get InfraDevice
95-
infrahubctl object get InfraDevice spine01
96-
infrahubctl object get InfraDevice --filter name__value=spine01
97-
infrahubctl object get InfraDevice --output json
98-
infrahubctl object get InfraDevice --output yaml > backup.yml
99-
100-
Exit codes: 0 = results found, 1 = error (including not found in detail
101-
mode), 80 = list query succeeded but returned zero objects.
135+
infrahubctl object delete InfraDevice spine01
136+
infrahubctl object delete InfraDevice spine01 --yes
102137

103138
**Usage**:
104139

105140
```console
106-
$ infrahubctl object get [OPTIONS] KIND [IDENTIFIER]
141+
$ infrahubctl object delete [OPTIONS] KIND IDENTIFIER
107142
```
108143

109144
**Arguments**:
110145

111-
* `KIND`: Infrahub schema kind to query [required]
112-
* `[IDENTIFIER]`: UUID, name, or HFID (use / for multi-part, for example: Cisco/NX-OS)
146+
* `KIND`: Infrahub schema kind [required]
147+
* `IDENTIFIER`: UUID, name, or HFID (use / for multi-part, for example: Cisco/NX-OS) [required]
113148

114149
**Options**:
115150

116-
* `--filter TEXT`: Filter in attr__value=x format
117-
* `-o, --output [table|json|csv|yaml]`: Output format
151+
* `-y, --yes`: Skip confirmation prompt
118152
* `-b, --branch TEXT`: Target branch
119-
* `--limit INTEGER`: Maximum results
120-
* `--offset INTEGER`: Skip first N results
121-
* `--all-columns`: Show all columns including empty ones
122153
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
123154
* `--help`: Show this message and exit.
124155

@@ -143,37 +174,6 @@ $ infrahubctl object load [OPTIONS] PATHS...
143174
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
144175
* `--help`: Show this message and exit.
145176

146-
## `infrahubctl object update`
147-
148-
Update an existing object in Infrahub.
149-
150-
Fetches the object by KIND and IDENTIFIER, applies the requested
151-
changes, and saves back to the server. Use --set or --file.
152-
153-
Examples:
154-
infrahubctl object update InfraDevice spine01 --set status=active
155-
infrahubctl object update InfraDevice spine01 --set location=DC1
156-
infrahubctl object update InfraDevice spine01 --file updates.yml
157-
158-
**Usage**:
159-
160-
```console
161-
$ infrahubctl object update [OPTIONS] KIND IDENTIFIER
162-
```
163-
164-
**Arguments**:
165-
166-
* `KIND`: Infrahub schema kind [required]
167-
* `IDENTIFIER`: UUID, name, or HFID (use / for multi-part, for example: Cisco/NX-OS) [required]
168-
169-
**Options**:
170-
171-
* `--set TEXT`: Field value in key=value format
172-
* `-f, --file PATH`: JSON or YAML file with update data
173-
* `-b, --branch TEXT`: Target branch
174-
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
175-
* `--help`: Show this message and exit.
176-
177177
## `infrahubctl object validate`
178178

179179
Validate one or multiple objects files.

docs/docs/infrahubctl/infrahubctl-repository.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ $ infrahubctl repository [OPTIONS] COMMAND [ARGS]...
1919
**Commands**:
2020

2121
* `add`: Add a new repository.
22-
* `init`: Initialize a new Infrahub repository.
2322
* `list`
23+
* `init`: Initialize a new Infrahub repository.
2424

2525
## `infrahubctl repository add`
2626

@@ -48,31 +48,31 @@ $ infrahubctl repository add [OPTIONS] NAME LOCATION
4848
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
4949
* `--help`: Show this message and exit.
5050

51-
## `infrahubctl repository init`
52-
53-
Initialize a new Infrahub repository.
51+
## `infrahubctl repository list`
5452

5553
**Usage**:
5654

5755
```console
58-
$ infrahubctl repository init [OPTIONS]
56+
$ infrahubctl repository list [OPTIONS]
5957
```
6058

6159
**Options**:
6260

61+
* `--branch TEXT`: Branch on which to list repositories.
62+
* `--debug / --no-debug`: [default: no-debug]
63+
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
6364
* `--help`: Show this message and exit.
6465

65-
## `infrahubctl repository list`
66+
## `infrahubctl repository init`
67+
68+
Initialize a new Infrahub repository.
6669

6770
**Usage**:
6871

6972
```console
70-
$ infrahubctl repository list [OPTIONS]
73+
$ infrahubctl repository init [OPTIONS]
7174
```
7275

7376
**Options**:
7477

75-
* `--branch TEXT`: Branch on which to list repositories.
76-
* `--debug / --no-debug`: [default: no-debug]
77-
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
7878
* `--help`: Show this message and exit.

docs/docs/infrahubctl/infrahubctl-schema.mdx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,34 @@ $ infrahubctl schema [OPTIONS] COMMAND [ARGS]...
1616

1717
**Commands**:
1818

19+
* `load`: Load one or multiple schema files into...
1920
* `check`: Check if schema files are valid and what...
2021
* `export`: Export the schema from Infrahub as YAML...
2122
* `list`: List all available schema kinds.
22-
* `load`: Load one or multiple schema files into...
2323
* `show`: Show details for a specific schema kind.
2424

25+
## `infrahubctl schema load`
26+
27+
Load one or multiple schema files into Infrahub.
28+
29+
**Usage**:
30+
31+
```console
32+
$ infrahubctl schema load [OPTIONS] SCHEMAS...
33+
```
34+
35+
**Arguments**:
36+
37+
* `SCHEMAS...`: [required]
38+
39+
**Options**:
40+
41+
* `--debug / --no-debug`: [default: no-debug]
42+
* `--branch TEXT`: Branch on which to load the schema.
43+
* `--wait INTEGER`: Time in seconds to wait until the schema has converged across all workers [default: 0]
44+
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
45+
* `--help`: Show this message and exit.
46+
2547
## `infrahubctl schema check`
2648

2749
Check if schema files are valid and what would be the impact of loading them with Infrahub.
@@ -86,28 +108,6 @@ $ infrahubctl schema list [OPTIONS]
86108
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
87109
* `--help`: Show this message and exit.
88110

89-
## `infrahubctl schema load`
90-
91-
Load one or multiple schema files into Infrahub.
92-
93-
**Usage**:
94-
95-
```console
96-
$ infrahubctl schema load [OPTIONS] SCHEMAS...
97-
```
98-
99-
**Arguments**:
100-
101-
* `SCHEMAS...`: [required]
102-
103-
**Options**:
104-
105-
* `--debug / --no-debug`: [default: no-debug]
106-
* `--branch TEXT`: Branch on which to load the schema.
107-
* `--wait INTEGER`: Time in seconds to wait until the schema has converged across all workers [default: 0]
108-
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
109-
* `--help`: Show this message and exit.
110-
111111
## `infrahubctl schema show`
112112

113113
Show details for a specific schema kind.

0 commit comments

Comments
 (0)