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.

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

List organizational units in your organization.

Terminal window
ndcli ou list [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)
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

Show detailed information about an organizational unit.

Terminal window
ndcli ou describe [name]
ArgumentRequiredDescription
nameYesOU name

Shows:

  • OU name and description
  • Status
  • Device count
  • Assigned templates
  • Creation and update timestamps
Terminal window
ndcli ou describe production
ndcli ou describe staging -f json

Create a new organizational unit.

Terminal window
ndcli ou create [name] [flags]
ArgumentRequiredDescription
nameYesOU name
FlagTypeDescription
--descriptionstringOU description
Terminal window
ndcli ou create production
ndcli ou create staging --description "Pre-production testing environment"

Delete an organizational unit.

Terminal window
ndcli ou delete [name]
ArgumentRequiredDescription
nameYesOU name to delete
Terminal window
ndcli ou delete deprecated-ou

Rename an organizational unit.

Terminal window
ndcli ou rename [old-name] [new-name]
ArgumentRequiredDescription
old-nameYesCurrent OU name
new-nameYesNew OU name
Terminal window
ndcli ou rename test staging

List all devices assigned to an organizational unit.

Terminal window
ndcli ou device-list [ou]
ArgumentRequiredDescription
ouYesOU name
Terminal window
ndcli ou device-list production
ndcli ou device-list staging -f json

Add a device to an organizational unit.

Terminal window
ndcli ou add-device [ou] [device]
ArgumentRequiredDescription
ouYesOU name
deviceYesDevice name to add
Terminal window
ndcli ou add-device production fw-datacenter-01
  • A device can only belong to one OU at a time
  • Adding a device to an OU removes it from its previous OU

Remove a device from an organizational unit.

Terminal window
ndcli ou remove-device [ou] [device]
ArgumentRequiredDescription
ouYesOU name
deviceYesDevice name to remove
Terminal window
ndcli ou remove-device production old-firewall

Manage templates assigned to an organizational unit.

List templates assigned to an OU.

Terminal window
ndcli ou template list [ou]
ArgumentRequiredDescription
ouYesOU name
Terminal window
ndcli ou template list production

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

Terminal window
ndcli ou template add [ou] [template]
ArgumentRequiredDescription
ouYesOU name
templateYesTemplate name to add
Terminal window
ndcli ou template add production base-firewall-config

Remove a template from an OU.

Terminal window
ndcli ou template remove [ou] [template]
ArgumentRequiredDescription
ouYesOU name
templateYesTemplate name to remove
Terminal window
ndcli ou template remove staging deprecated-template