Skip to content

gNMI

The iosxr_gnmi resource provides low-level access to manage IOS-XR configuration objects via gNMI (gRPC Network Management Interface) calls. This resource should only be used when the configuration element you need is not available in the standard YAML data model schema. It offers direct interaction with YANG data models but bypasses schema validation and type checking.

Diagram
NameTypeConstraintMandatoryDefault Value
gnmiMapNo

Example-1: Configure a hostname on a device.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
gnmi:
hostname_config:
path: "Cisco-IOS-XR-um-hostname-cfg:hostname"
attributes:
system-network-name: "gnmi-ROUTER-1"

Example-2: Configure an interface on a device.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
gnmi:
interface_config:
path: "Cisco-IOS-XR-um-interface-cfg:/interfaces/interface[interface-name=GigabitEthernet0/0/0/4]"
attributes:
interface-name: "GigabitEthernet0/0/0/4"
description: "gnmi-interface-config"