Skip to content

Cisco-IOS-XR-um-router-bgp-cfg presence containers such as advertise-as-vpn don't work #1506

@JonasKs

Description

@JonasKs

Hi,
Tested on 771.

The advertise-as-vpn presence containers cannot be fetched with gNMI/NETCONF using the UM Cisco-IOS-XR-um-router-bgp-cfg.yang.

gnmic -a <ip:port> --insecure get --path "/Cisco-IOS-XR-um-vrf-cfg:vrfs/vrf/address-family/ipv4/unicast/Cisco-IOS-XR-um-router-bgp-cfg:import/from/vrf" -e json_ietf
[
  {
    "source": "10.242.0.33:4126",
    "timestamp": 1700253262950613603,
    "time": "2023-11-17T21:34:22.950613603+01:00",
    "updates": [
      {
        "Path": "Cisco-IOS-XR-um-vrf-cfg:vrfs/vrf/address-family/ipv4/unicast/Cisco-IOS-XR-um-router-bgp-cfg:import/from/vrf",
        "values": {
          "Cisco-IOS-XR-um-vrf-cfg:vrfs/vrf/address-family/ipv4/unicast/Cisco-IOS-XR-um-router-bgp-cfg:import/from/vrf": null
        }
      }
    ]
  }
] 

Getting the VRF directly:

{
  "path": [
    {
      "origin": "Cisco-IOS-XR-um-vrf-cfg",
      "elem": [
        {
          "name": "vrfs"
        },
        {
          "name": "vrf",
          "key": {
            "vrf-name": "adsfg"
          }
        },
        {
          "name": "address-family"
        }
      ]
    }
  ],
  "encoding": "JSON_IETF"
}

returns

{
  "ipv4": {
    "unicast": {
      "Cisco-IOS-XR-um-router-bgp-cfg:import": {
        "route-policy": "my-route-policy"
      }
    }
  }
} 

even though the configuration is:

RP/0/RP0/CPU0:iosxr-golang-1(config-vrf)#do sh run vrf adsfg
Fri Nov 17 20:39:55.888 UTC
vrf adsfg
 description adsf
 address-family ipv4 unicast
  import route-policy my-route-policy
  import from vrf advertise-as-vpn
 ! 

The normal, non UM interface, Cisco-IOS-XR-ipv4-bgp-cfg.yang exposes the same setting, advertise-as-vpn as a leaf instead of a presence container, and works as expected:

{
  "path": [
    {
      "origin": "Cisco-IOS-XR-infra-rsi-cfg",
      "elem": [
        {
          "name": "vrfs"
        },
        {
          "name": "vrf",
          "key": {
            "vrf-name": "adsfg"
          }
        },
        {
          "name": "afs"
        },
        {
          "name": "af",
          "key": {
            "saf-name": "unicast",
            "af-name": "ipv4"
          }
        },
        {
          "name": "Cisco-IOS-XR-ipv4-bgp-cfg:bgp"
        }
      ]
    }
  ],
  "encoding": "JSON_IETF"
}

returns:

{
  "import-route-policy": "my-route-policy",
  "import-vrf-options": {
    "advertise-as-vpn": true,
    "import-allow-backup": false,
    "import-allow-best-external": false
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions