Skip to content

CLI Snippet

CLI snippets provide a mechanism to inject raw IOS-XE command-line interface commands directly into the device configuration, extending beyond the structured data model capabilities. This feature enables administrators to configure advanced or vendor-specific features that may not yet be supported through the declarative YAML configuration model. CLI snippets serve as a bridge between structured configuration management and traditional CLI-based device configuration, ensuring complete feature coverage while maintaining the benefits of infrastructure-as-code practices.

Diagram
NameTypeConstraintMandatoryDefault Value
cli_snippetsList[cli_snippets]No

cli_snippets (iosxe.devices.configuration.extensions)

Section titled “cli_snippets (iosxe.devices.configuration.extensions)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
contentStringYes

iosxe:
devices:
- name: Device1
configuration:
extensions:
cli_snippets:
- name: extra_snmp_traps
content: |
snmp-server enable traps power-ethernet group 1 threshold 90