Skip to content

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

CommandDescription
ou listList organizational units
ou describeShow OU details
ou createCreate a new OU
ou deleteDelete an OU
ou renameRename an OU
ou device-listList devices in an OU
ou add-deviceAdd a device to an OU
ou remove-deviceRemove a device from an OU
ou templateManage OU templates

ou list

List organizational units in your organization.

Terminal window
ndcli ou list [flags]

Flags

FlagTypeDefaultDescription
--namestringFilter by name (regex pattern)
--statusstringallFilter by status: all, enabled
--created-afterstringFilter by created date
--created-beforestringFilter by created date
--sort-bystringnameSort field: name, device_count, created_at, updated_at
--sort-orderstringascSort order: asc, desc
--pageint1Page number
--per-pageint20Items per page (1-100)

Examples

Terminal window
ndcli ou list
ndcli ou list --name "prod.*"
ndcli ou list --sort-by device_count --sort-order desc
ndcli ou list --created-after 7d

ou describe

Show detailed information about an organizational unit.

Terminal window
ndcli ou describe [name]

Arguments

ArgumentRequiredDescription
nameYesOU name

Output

Shows:

  • OU name and description
  • Status
  • Device count
  • Assigned templates
  • Creation and update timestamps

Examples

Terminal window
ndcli ou describe production
ndcli ou describe staging -f json

ou create

Create a new organizational unit.

Terminal window
ndcli ou create [name] [flags]

Arguments

ArgumentRequiredDescription
nameYesOU name

Flags

FlagTypeDescription
--descriptionstringOU description

Examples

Terminal window
ndcli ou create production
ndcli ou create staging --description "Pre-production testing environment"

ou delete

Delete an organizational unit.

Terminal window
ndcli ou delete [name]

Arguments

ArgumentRequiredDescription
nameYesOU name to delete

Examples

Terminal window
ndcli ou delete deprecated-ou

ou rename

Rename an organizational unit.

Terminal window
ndcli ou rename [old-name] [new-name]

Arguments

ArgumentRequiredDescription
old-nameYesCurrent OU name
new-nameYesNew OU name

Examples

Terminal window
ndcli ou rename test staging

ou device-list

List all devices assigned to an organizational unit.

Terminal window
ndcli ou device-list [ou]

Arguments

ArgumentRequiredDescription
ouYesOU name

Examples

Terminal window
ndcli ou device-list production
ndcli ou device-list staging -f json

ou add-device

Add a device to an organizational unit.

Terminal window
ndcli ou add-device [ou] [device]

Arguments

ArgumentRequiredDescription
ouYesOU name
deviceYesDevice name to add

Examples

Terminal window
ndcli ou add-device production fw-datacenter-01

Notes

  • 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.

Terminal window
ndcli ou remove-device [ou] [device]

Arguments

ArgumentRequiredDescription
ouYesOU name
deviceYesDevice name to remove

Examples

Terminal window
ndcli ou remove-device production old-firewall

ou template

Manage templates assigned to an organizational unit.

ou template list

List templates assigned to an OU.

Terminal window
ndcli ou template list [ou]

Arguments

ArgumentRequiredDescription
ouYesOU name

Examples

Terminal window
ndcli ou template list production

ou template add

Add a template to an OU. Devices in the OU will receive configurations from this template.

Terminal window
ndcli ou template add [ou] [template]

Arguments

ArgumentRequiredDescription
ouYesOU name
templateYesTemplate name to add

Examples

Terminal window
ndcli ou template add production base-firewall-config

ou template remove

Remove a template from an OU.

Terminal window
ndcli ou template remove [ou] [template]

Arguments

ArgumentRequiredDescription
ouYesOU name
templateYesTemplate name to remove

Examples

Terminal window
ndcli ou template remove staging deprecated-template