Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JonasKs opened this issue Nov 21, 2023 · 2 comments

Comments

@JonasKs
Copy link

JonasKs commented Nov 21, 2023

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
  }
}
@einarnn
Copy link
Member

einarnn commented Dec 3, 2023

@JonasKs I've passed this on to Cisco's XR team.

@ncorran
Copy link

ncorran commented Dec 4, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants