ou
Organizational unit (OU) management commands for NDCLI. OUs allow you to organize devices into logical groups and assign templates to groups of devices.
Commands
| Command | Description |
|---|---|
ou list | List organizational units |
ou describe | Show OU details |
ou create | Create a new OU |
ou delete | Delete an OU |
ou rename | Rename an OU |
ou device-list | List devices in an OU |
ou add-device | Add a device to an OU |
ou remove-device | Remove a device from an OU |
ou template | Manage OU templates |
ou list
List organizational units in your organization.
ndcli ou list [flags]Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | Filter by name (regex pattern) | |
--status | string | all | Filter by status: all, enabled |
--created-after | string | Filter by created date | |
--created-before | string | Filter by created date | |
--sort-by | string | name | Sort field: name, device_count, created_at, updated_at |
--sort-order | string | asc | Sort order: asc, desc |
--page | int | 1 | Page number |
--per-page | int | 20 | Items per page (1-100) |
Examples
ndcli ou list
ndcli ou list --name "prod.*"
ndcli ou list --sort-by device_count --sort-order desc
ndcli ou list --created-after 7dou describe
Show detailed information about an organizational unit.
ndcli ou describe [name]Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | OU name |
Output
Shows:
- OU name and description
- Status
- Device count
- Assigned templates
- Creation and update timestamps
Examples
ndcli ou describe productionndcli ou describe staging -f jsonou create
Create a new organizational unit.
ndcli ou create [name] [flags]Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | OU name |
Flags
| Flag | Type | Description |
|---|---|---|
--description | string | OU description |
Examples
ndcli ou create production
ndcli ou create staging --description "Pre-production testing environment"ou delete
Delete an organizational unit.
ndcli ou delete [name]Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | OU name to delete |
Examples
ndcli ou delete deprecated-ouou rename
Rename an organizational unit.
ndcli ou rename [old-name] [new-name]Arguments
| Argument | Required | Description |
|---|---|---|
old-name | Yes | Current OU name |
new-name | Yes | New OU name |
Examples
ndcli ou rename test stagingou device-list
List all devices assigned to an organizational unit.
ndcli ou device-list [ou]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
Examples
ndcli ou device-list productionndcli ou device-list staging -f jsonou add-device
Add a device to an organizational unit.
ndcli ou add-device [ou] [device]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
device | Yes | Device name to add |
Examples
ndcli ou add-device production fw-datacenter-01Notes
- A device can only belong to one OU at a time
- Adding a device to an OU removes it from its previous OU
ou remove-device
Remove a device from an organizational unit.
ndcli ou remove-device [ou] [device]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
device | Yes | Device name to remove |
Examples
ndcli ou remove-device production old-firewallou template
Manage templates assigned to an organizational unit.
ou template list
List templates assigned to an OU.
ndcli ou template list [ou]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
Examples
ndcli ou template list productionou template add
Add a template to an OU. Devices in the OU will receive configurations from this template.
ndcli ou template add [ou] [template]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
template | Yes | Template name to add |
Examples
ndcli ou template add production base-firewall-configou template remove
Remove a template from an OU.
ndcli ou template remove [ou] [template]Arguments
| Argument | Required | Description |
|---|---|---|
ou | Yes | OU name |
template | Yes | Template name to remove |
Examples
ndcli ou template remove staging deprecated-template