Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions docs/docs/infrahubctl/infrahubctl-branch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,28 @@ $ infrahubctl branch [OPTIONS] COMMAND [ARGS]...

**Commands**:

* `list`: List all existing branches.
* `create`: Create a new branch.
* `delete`: Delete a branch.
* `list`: List all existing branches.
* `merge`: Merge a Branch with main.
* `rebase`: Rebase a Branch with main.
* `report`: Generate branch cleanup status report.
* `merge`: Merge a Branch with main.
* `validate`: Validate if a branch has some conflict and...
* `report`: Generate branch cleanup status report.

## `infrahubctl branch list`

List all existing branches.

**Usage**:

```console
$ infrahubctl branch list [OPTIONS]
```

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch create`

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

## `infrahubctl branch list`
## `infrahubctl branch rebase`

List all existing branches.
Rebase a Branch with main.

**Usage**:

```console
$ infrahubctl branch list [OPTIONS]
$ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

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

## `infrahubctl branch rebase`
## `infrahubctl branch validate`

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

**Usage**:

```console
$ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
$ infrahubctl branch validate [OPTIONS] BRANCH_NAME
```

**Arguments**:
Expand Down Expand Up @@ -138,22 +157,3 @@ $ infrahubctl branch report [OPTIONS] BRANCH_NAME
* `--update-diff`: Update diff before generating report
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch validate`

Validate if a branch has some conflict and is passing all the tests (NOT IMPLEMENTED YET).

**Usage**:

```console
$ infrahubctl branch validate [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: [required]

**Options**:

* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.
124 changes: 62 additions & 62 deletions docs/docs/infrahubctl/infrahubctl-object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,53 @@ $ infrahubctl object [OPTIONS] COMMAND [ARGS]...

**Commands**:

* `get`: Query and display Infrahub objects.
* `create`: Create a new object in Infrahub.
* `update`: Update an existing object in Infrahub.
* `delete`: Delete an Infrahub object.
* `get`: Query and display Infrahub objects.
* `load`: Load one or multiple objects files into...
* `update`: Update an existing object in Infrahub.
* `validate`: Validate one or multiple objects files.

## `infrahubctl object get`

Query and display Infrahub objects.

When IDENTIFIER is omitted the command lists all objects of the given
KIND. When IDENTIFIER is provided it displays a single object in
detail view. Empty columns are hidden by default (use --all-columns).

Examples:
infrahubctl object get InfraDevice
infrahubctl object get InfraDevice spine01
infrahubctl object get InfraDevice --filter name__value=spine01
infrahubctl object get InfraDevice --output json
infrahubctl object get InfraDevice --output yaml > backup.yml

Exit codes: 0 = results found, 1 = error (including not found in detail
mode), 80 = list query succeeded but returned zero objects.

**Usage**:

```console
$ infrahubctl object get [OPTIONS] KIND [IDENTIFIER]
```

**Arguments**:

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

**Options**:

* `--filter TEXT`: Filter in attr__value=x format
* `-o, --output [table|json|csv|yaml]`: Output format
* `-b, --branch TEXT`: Target branch
* `--limit INTEGER`: Maximum results
* `--offset INTEGER`: Skip first N results
* `--all-columns`: Show all columns including empty ones
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl object create`

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

## `infrahubctl object delete`
## `infrahubctl object update`

Delete an Infrahub object.
Update an existing object in Infrahub.

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

Examples:
infrahubctl object delete InfraDevice spine01
infrahubctl object delete InfraDevice spine01 --yes
infrahubctl object update InfraDevice spine01 --set status=active
infrahubctl object update InfraDevice spine01 --set location=DC1
infrahubctl object update InfraDevice spine01 --file updates.yml

**Usage**:

```console
$ infrahubctl object delete [OPTIONS] KIND IDENTIFIER
$ infrahubctl object update [OPTIONS] KIND IDENTIFIER
```

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

**Options**:

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

## `infrahubctl object get`
## `infrahubctl object delete`

Query and display Infrahub objects.
Delete an Infrahub object.

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

Examples:
infrahubctl object get InfraDevice
infrahubctl object get InfraDevice spine01
infrahubctl object get InfraDevice --filter name__value=spine01
infrahubctl object get InfraDevice --output json
infrahubctl object get InfraDevice --output yaml > backup.yml

Exit codes: 0 = results found, 1 = error (including not found in detail
mode), 80 = list query succeeded but returned zero objects.
infrahubctl object delete InfraDevice spine01
infrahubctl object delete InfraDevice spine01 --yes

**Usage**:

```console
$ infrahubctl object get [OPTIONS] KIND [IDENTIFIER]
$ infrahubctl object delete [OPTIONS] KIND IDENTIFIER
```

**Arguments**:

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

**Options**:

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

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

## `infrahubctl object update`

Update an existing object in Infrahub.

Fetches the object by KIND and IDENTIFIER, applies the requested
changes, and saves back to the server. Use --set or --file.

Examples:
infrahubctl object update InfraDevice spine01 --set status=active
infrahubctl object update InfraDevice spine01 --set location=DC1
infrahubctl object update InfraDevice spine01 --file updates.yml

**Usage**:

```console
$ infrahubctl object update [OPTIONS] KIND IDENTIFIER
```

**Arguments**:

* `KIND`: Infrahub schema kind [required]
* `IDENTIFIER`: UUID, name, or HFID (use / for multi-part, for example: Cisco/NX-OS) [required]

**Options**:

* `--set TEXT`: Field value in key=value format
* `-f, --file PATH`: JSON or YAML file with update data
* `-b, --branch TEXT`: Target branch
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl object validate`

Validate one or multiple objects files.
Expand Down
20 changes: 10 additions & 10 deletions docs/docs/infrahubctl/infrahubctl-repository.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ $ infrahubctl repository [OPTIONS] COMMAND [ARGS]...
**Commands**:

* `add`: Add a new repository.
* `init`: Initialize a new Infrahub repository.
* `list`
* `init`: Initialize a new Infrahub repository.

## `infrahubctl repository add`

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

## `infrahubctl repository init`

Initialize a new Infrahub repository.
## `infrahubctl repository list`

**Usage**:

```console
$ infrahubctl repository init [OPTIONS]
$ infrahubctl repository list [OPTIONS]
```

**Options**:

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

## `infrahubctl repository list`
## `infrahubctl repository init`

Initialize a new Infrahub repository.

**Usage**:

```console
$ infrahubctl repository list [OPTIONS]
$ infrahubctl repository init [OPTIONS]
```

**Options**:

* `--branch TEXT`: Branch on which to list repositories.
* `--debug / --no-debug`: [default: no-debug]
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.
46 changes: 23 additions & 23 deletions docs/docs/infrahubctl/infrahubctl-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,34 @@ $ infrahubctl schema [OPTIONS] COMMAND [ARGS]...

**Commands**:

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

## `infrahubctl schema load`

Load one or multiple schema files into Infrahub.

**Usage**:

```console
$ infrahubctl schema load [OPTIONS] SCHEMAS...
```

**Arguments**:

* `SCHEMAS...`: [required]

**Options**:

* `--debug / --no-debug`: [default: no-debug]
* `--branch TEXT`: Branch on which to load the schema.
* `--wait INTEGER`: Time in seconds to wait until the schema has converged across all workers [default: 0]
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl schema check`

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

## `infrahubctl schema load`

Load one or multiple schema files into Infrahub.

**Usage**:

```console
$ infrahubctl schema load [OPTIONS] SCHEMAS...
```

**Arguments**:

* `SCHEMAS...`: [required]

**Options**:

* `--debug / --no-debug`: [default: no-debug]
* `--branch TEXT`: Branch on which to load the schema.
* `--wait INTEGER`: Time in seconds to wait until the schema has converged across all workers [default: 0]
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl schema show`

Show details for a specific schema kind.
Expand Down
Loading