Device
Devices represent individual IOS-XR network devices that will be configured and managed. Each device is identified by a unique name and requires a host IP for connectivity.
Device configurations have the highest precedence in the configuration hierarchy, allowing you to override global and device group settings for specific devices. This provides fine-grained control while maintaining consistency across your network infrastructure.
Key device attributes:
- name: Unique identifier for the device
- host: IP for device connectivity (gNMI), optionally a port can be added with
:12345. The default port is57400 - managed: Boolean flag to temporarily exclude devices from configuration (useful for maintenance)
- device_groups: List of device groups this device belongs to
- variables: Device-specific variables that override group and global variables
- configuration: Device-specific configuration that takes highest precedence
The managed attribute can be set to false to temporarily skip a device during deployment, which is useful for maintenance windows or staged rollouts.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”devices (iosxr)
Section titled “devices (iosxr)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| host | String | Yes | ||
| tls | Boolean | true, false | No | |
| managed | Boolean | true, false | No | true |
| protocol | Choice | gnmi, netconf | No | |
| version | String | No | ||
| platform | Choice | NCS, C8000, XRV9K, XRd | No | |
| device_groups | List | String | No | |
| variables | Map | No | ||
| templates | List | String | No |
Examples
Section titled “Examples”iosxr: devices: # Basic device configuration - name: router-1 host: 10.10.10.1 managed: true
# Device with specified port - name: router-1 host: 10.10.10.1:57402 managed: true
# Device with group membership and variables - name: router-1 host: 10.10.10.1 device_groups: - CORE_ROUTERS variables: bgp_router_id: "10.10.10.1"
# Device with specific configuration override - name: router-1 host: 10.10.10.1 device_groups: [EDGE_ROUTERS] configuration: hostname: EDGE-ROUTER-03 interfaces: - interface_name: "GigabitEthernet0/0/0/0" description: "LAN Interface" shutdown: false mtu: 9000 load_interval: 90 bandwidth: 1000000 ipv4_address: "192.168.100.1" ipv4_netmask: "255.255.255.0" ipv6_enable: true ipv6_addresses: - address: "2001:db8:100::1" prefix_length: 64 zone: "0"
# Device temporarily excluded from management - name: router-1 host: 10.10.10.1 managed: false # Skip during maintenance