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

gNMI get path origin invalid response from Cisco 9800 IOS XE #949

Open
srogers6 opened this issue Aug 22, 2019 · 4 comments
Open

gNMI get path origin invalid response from Cisco 9800 IOS XE #949

srogers6 opened this issue Aug 22, 2019 · 4 comments

Comments

@srogers6
Copy link

Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.

Expected Behavior

I sent an email to the DE and this was his response:
In below get request origin value looks incorrect. For open-config can you please try origin value as origin='openconfig' or origin=''.
And if you tried gNMI-get for Native models use origin='rfc7951'.

I don't see any way for me to control the value being sent by gNMI through YDK.

Current Behavior

=============== Get Request Sent ================
path {
origin: "openconfig-bgp"
elem {
name: "bgp"
}
}
type: CONFIG
encoding: JSON_IETF

2019-08-21 11:45:46,116 - ydk - ERROR - GetRequest failed with error:
Unsupported Path::Origin value[ openconfig-bgp ] in Request
Traceback (most recent call last):
File "/opt/ats/scoroger/pyats/wnbust/users/scoroger/gnmi_openconfig_test.py", line 49, in
x = gnmi_service.get(provider, inter, operation='OPERAtIONAL') # Perform get operation
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/gnmi/services/gnmi_service.py", line 48, in get
top_result = self._gs.get(provider, top_filters, operation)
File "/usr/lib64/python3.4/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "", line 1, in
ydk.errors.YServiceProviderError: GetRequest failed with error:
Unsupported Path::Origin value[ openconfig-bgp ] in Request
2019-08-21 11:45:46,141 - ydk - INFO - Disconnected from device

Steps to Reproduce

Your Script

import pprint
import logging

from ydk.path import Repository
from ydk.gnmi.providers import gNMIServiceProvider
from ydk.gnmi.services import gNMIService
from ydk.services.codec_service import CodecService
from ydk.providers.codec_provider import CodecServiceProvider
from ydk.models.wireless import openconfig_access_points as ap_access
from ydk.models.wireless import openconfig_ap_manager as ap_mgr
from ydk.models.openconfig import openconfig_bgp

logger = logging.getLogger("ydk")
handler = logging.StreamHandler()
formatter = logging.Formatter(("%(asctime)s - %(name)s - "
"%(levelname)s - %(message)s"))
handler.setFormatter(formatter)
logger.addHandler(handler)

if name == "main":
"""Main execution path"""

logger.setLevel(logging.DEBUG)

# create gRPC session
repository = Repository('/users/scoroger/_yang')
provider = gNMIServiceProvider(repo=repository, address='180.11.0.11', port=50052, username='xxx', password='xxx')
gnmi_service = gNMIService()

# Access Point
inter = openconfig_bgp.Bgp()
x = gnmi_service.get(provider, inter) # Perform get operation

exit()

Logs

Enable logging and post the logs below

2019-08-22 08:36:08,511 - ydk - DEBUG - Capabilities Received:
2019-08-22 08:36:08,512 - ydk - DEBUG -
2019-08-22 08:36:08,512 - ydk - DEBUG - ==============gNMI Version==============
2019-08-22 08:36:08,512 - ydk - DEBUG - gNMI Version: 0.7.0
2019-08-22 08:36:08,512 - ydk - DEBUG - ============Supported Models============
2019-08-22 08:36:08,512 - ydk - DEBUG - ====Capabilities Response Received====
2019-08-22 08:36:08,512 - ydk - DEBUG - Cisco-IOS-XE-aaa-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,513 - ydk - DEBUG - Cisco-IOS-XE-acl-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,513 - ydk - DEBUG - Cisco-IOS-XE-app-hosting-cfg, Cisco Systems, Inc., 2019-06-12
2019-08-22 08:36:08,513 - ydk - DEBUG - Cisco-IOS-XE-app-hosting-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,513 - ydk - DEBUG - Cisco-IOS-XE-arp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,513 - ydk - DEBUG - Cisco-IOS-XE-ios-common-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-bfd-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-bgp-common-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-bgp-oper, Cisco Systems, Inc., 2019-06-12
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-bgp-route-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-cdp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,514 - ydk - DEBUG - Cisco-IOS-XE-cellwan-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-cfm-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-checkpoint-archive-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-common-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-crypto-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-crypto-pki-events, Cisco Systems, Inc., 2019-07-23
2019-08-22 08:36:08,515 - ydk - DEBUG - Cisco-IOS-XE-crypto-pki-oper, Cisco Systems, Inc., 2019-06-21
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-device-hardware-oper, Cisco Systems, Inc., 2019-03-28
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-dhcp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-efp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-eigrp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-environment-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-event-history-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-fib-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-flow-monitor-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,516 - ydk - DEBUG - Cisco-IOS-XE-gir-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-ha-oper, Cisco Systems, Inc., 2019-08-09
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-interfaces-oper, Cisco Systems, Inc., 2019-07-12
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-ios-events-oper, Cisco Systems, Inc., 2019-05-16
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-utd-common-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-ip-sla-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-ipv6-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-lisp-oper, Cisco Systems, Inc., 2019-06-25
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-lldp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-mdt-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-mdt-common-defs, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,517 - ydk - DEBUG - Cisco-IOS-XE-mdt-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-memory-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-mlppp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-mpls-forwarding-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-mpls-ldp-oper, Cisco Systems, Inc., 2019-07-31
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-nat-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-ntp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-ospf-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-platform-oper, Cisco Systems, Inc., 2019-07-11
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-platform-software-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-ppp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-process-cpu-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,518 - ydk - DEBUG - Cisco-IOS-XE-process-memory-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-sm-enum-types, Cisco Systems, Inc., 2019-08-05
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-sm-events-oper, Cisco Systems, Inc., 2019-08-05
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-stack-oper, Cisco Systems, Inc., 2019-06-06
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-trustsec-oper, Cisco Systems, Inc., 2019-05-29
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-tunnel-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-tunnel-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-umbrella-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-utd-oper, Cisco Systems, Inc., 2019-06-06
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-vlan-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-vrf-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,519 - ydk - DEBUG - Cisco-IOS-XE-vrrp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-access-point-oper, Cisco Systems, Inc., 2019-08-11
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-enum-types, Cisco Systems, Inc., 2019-07-24
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-types, Cisco Systems, Inc., 2019-05-17
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-ap-types, Cisco Systems, Inc., 2019-08-11
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-ap-cfg, Cisco Systems, Inc., 2019-06-25
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-apf-cfg, Cisco Systems, Inc., 2019-06-02
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-awips-oper, Cisco Systems, Inc., 2019-07-30
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-ble-mgmt-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-client-oper, Cisco Systems, Inc., 2019-07-25
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-mobility-types, Cisco Systems, Inc., 2019-06-11
2019-08-22 08:36:08,520 - ydk - DEBUG - Cisco-IOS-XE-wireless-client-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-cts-sxp-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-cts-sxp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-dot11-cfg, Cisco Systems, Inc., 2019-06-28
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-events-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wsa-types, Cisco Systems, Inc., 2019-05-21
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-fabric-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-flex-cfg, Cisco Systems, Inc., 2019-06-10
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-fqdn-cfg, Cisco Systems, Inc., 2019-05-17
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-general-cfg, Cisco Systems, Inc., 2019-08-11
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-general-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,521 - ydk - DEBUG - Cisco-IOS-XE-wireless-hotspot-cfg, Cisco Systems, Inc., 2019-04-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-hyperlocation-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-lisp-agent-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-location-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-location-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-rrm-types, Cisco Systems, Inc., 2019-06-18
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mcast-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mdns-oper, Cisco Systems, Inc., 2019-05-10
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mesh-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mesh-oper, Cisco Systems, Inc., 2019-07-02
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mobility-cfg, Cisco Systems, Inc., 2019-06-26
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mobility-oper, Cisco Systems, Inc., 2019-05-31
2019-08-22 08:36:08,522 - ydk - DEBUG - Cisco-IOS-XE-wireless-mstream-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,523 - ydk - DEBUG - Cisco-IOS-XE-wireless-nmsp-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,523 - ydk - DEBUG - Cisco-IOS-XE-wireless-radio-cfg, Cisco Systems, Inc., 2019-07-09
2019-08-22 08:36:08,523 - ydk - DEBUG - Cisco-IOS-XE-wireless-rf-cfg, Cisco Systems, Inc., 2019-06-26
2019-08-22 08:36:08,523 - ydk - DEBUG - Cisco-IOS-XE-wireless-rfid-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,523 - ydk - DEBUG - Cisco-IOS-XE-wireless-rfid-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rlan-cfg, Cisco Systems, Inc., 2019-06-10
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rogue-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rogue-oper, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rogue-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rrm-cfg, Cisco Systems, Inc., 2019-06-28
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-rrm-oper, Cisco Systems, Inc., 2019-06-11
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-security-cfg, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-site-cfg, Cisco Systems, Inc., 2019-08-11
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-tunnel-cfg, Cisco Systems, Inc., 2019-05-23
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-tunnel-types, Cisco Systems, Inc., 2019-05-01
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-wireless-wlan-cfg, Cisco Systems, Inc., 2019-07-24
2019-08-22 08:36:08,524 - ydk - DEBUG - Cisco-IOS-XE-yang-interfaces-cfg, Cisco Systems, Inc., 2019-05-21
2019-08-22 08:36:08,525 - ydk - DEBUG - ietf-interfaces, IETF NETMOD (NETCONF Data Modeling Language) Working Group, 2014-05-08
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-ietf-ip-deviation, Cisco Systems, Inc., 2016-08-10
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-ietf-ipv4-unicast-routing-deviation, Cisco Systems, Inc., 2015-09-11
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-ietf-ipv6-unicast-routing-deviation, Cisco Systems, Inc., 2015-09-11
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-ietf-ospf-deviation, Cisco Systems, Inc., 2018-02-09
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-ietf-routing-deviation, Cisco Systems, Inc., 2016-07-09
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-openconfig-access-points-deviation, Cisco Systems, Inc., 2018-12-04
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-openconfig-acl-deviation, Cisco Systems, Inc., 2017-08-25
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-openconfig-acl-ext, Cisco, 1.0.2
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-openconfig-aft-deviation, Cisco Systems, Inc., 2018-12-05
2019-08-22 08:36:08,525 - ydk - DEBUG - cisco-xe-openconfig-bgp-deviation, Cisco Systems, Inc., 2018-05-21
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-bgp-policy-deviation, Cisco Systems, Inc., 2017-07-24
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-if-ethernet-ext, OpenConfig working group, 1.0.2
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-if-ip-deviation, Cisco Systems, Inc., 2017-03-04
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-interfaces-deviation, C Systems, Inc., 2018-08-21
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-interfaces-ext, OpenConfig working group, 1.0.2
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-isis-deviation, Cisco Systems, Inc., 2018-12-05
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-lldp-deviation, Cisco Systems, Inc., 2018-07-25
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-mpls-deviation, Cisco Systems, Inc., 2019-06-27
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-network-instance-deviation, Cisco Systems, Inc., 2017-02-14
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-rib-bgp-ext, Cisco Systems, Inc., 2016-11-30
2019-08-22 08:36:08,526 - ydk - DEBUG - openconfig-bgp-types, OpenConfig working group, 2.1.1
2019-08-22 08:36:08,526 - ydk - DEBUG - cisco-xe-openconfig-routing-policy-deviation, Cisco Systems, Inc., 2017-03-30
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-openconfig-segment-routing-deviation, Cisco Systems, Inc., 2018-12-05
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-openconfig-system-ext, Cisco, 1.0.2
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-openconfig-system-management-deviation, Cisco Systems, Inc., 2019-07-01
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-openconfig-vlan-ext, Cisco Systems, 2017-06-14
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-wireless-openconfig-if-ethernet-deviation, Cisco Systems, Inc., 2018-12-12
2019-08-22 08:36:08,527 - ydk - DEBUG - cisco-xe-wireless-openconfig-vlan-deviation, Cisco Systems, 2019-04-24
2019-08-22 08:36:08,527 - ydk - DEBUG - openconfig-inet-types, OpenConfig working group, 0.3.1
2019-08-22 08:36:08,527 - ydk - DEBUG - iana-if-type, IANA, 2014-05-08
2019-08-22 08:36:08,527 - ydk - DEBUG - ietf-diffserv-action, IETF NETMOD (Netmod Working Group) Working Group, 2015-04-07
2019-08-22 08:36:08,527 - ydk - DEBUG - ietf-diffserv-classifier, IETF NETMOD (Netmod Working Group) Working Group, 2015-04-07
2019-08-22 08:36:08,527 - ydk - DEBUG - ietf-diffserv-policy, IETF NETMOD (Netmod Working Group) Working Group, 2015-04-07
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-diffserv-target, IETF NETMOD (Netmod Working Group) Working Group, 2015-04-07
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-ipv6-unicast-routing, IETF NETMOD (NETCONF Data Modeling Language) Working Group, 2015-05-25
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-ip, IETF NETMOD (NETCONF Data Modeling Language) Working Group, 2014-06-16
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-interfaces-ext, IETF NETMOD (NETCONF Data Modeling Language) Working Group,
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-ipv4-unicast-routing, IETF NETMOD (NETCONF Data Modeling Language) Working Group, 2015-05-25
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-key-chain, Cisco Systems
170 West Tasman Drive
San Jose, CA 95134-1706
USA, 2015-02-24
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-netconf-acm, IETF NETCONF (Network Configuration) Working Group, 2012-02-22
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-ospf, Cisco Systems
170 West Tasman Drive
San Jose, CA 95134-1706
USA, 2015-03-09
2019-08-22 08:36:08,528 - ydk - DEBUG - ietf-routing, IETF NETMOD (NETCONF Data Modeling Language) Working Group, 2015-05-25
2019-08-22 08:36:08,528 - ydk - DEBUG - openconfig-policy-types, OpenConfig working group, 2.0.1
2019-08-22 08:36:08,528 - ydk - DEBUG - openconfig-aaa, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-aaa-types, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-access-points, OpenConfig working group, 0.2.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-wifi-types, OpenConfig working group, 0.1.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-vlan-types, OpenConfig working group, 1.0.2
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-types, OpenConfig working group, 0.5.1
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-yang-types, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-acl, OpenConfig working group, 1.0.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-interfaces, OpenConfig working group, 2.3.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-packet-match-types, OpenConfig working group, 1.0.0
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-aft, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-aft-network-instance, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,529 - ydk - DEBUG - openconfig-aft-types, OpenConfig Working Group, 0.2.1
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-alarm-types, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-alarms, OpenConfig working group, 0.1.0
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-ap-manager, OpenConfig working group, 0.1.0
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-bgp, OpenConfig working group, 2.1.1
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-routing-policy, OpenConfig working group, 2.0.1
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-bgp-policy, OpenConfig working group, 2.1.1
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-extensions, OpenConfig working group, 2018-10-17
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-if-aggregate, OpenConfig working group, 2.3.0
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-if-ethernet, OpenConfig working group, 2.3.0
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-if-ip, OpenConfig working group, 2.3.0
2019-08-22 08:36:08,530 - ydk - DEBUG - openconfig-if-ip-ext, OpenConfig working group, 2.3.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-vlan, OpenConfig working group, 1.0.2
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-isis, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-isis-lsdb-types, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-isis-policy, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-isis-types, OpenConfig working group, 0.2.1
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-lacp, OpenConfig working group, 1.0.2
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-lldp, OpenConfig working group, 0.1.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-lldp-types, OpenConfig working group, 0.1.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-local-routing, OpenConfig working group, 1.0.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-mpls, OpenConfig working group, 2.1.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-mpls-ldp, OpenConfig working group, 2.1.0
2019-08-22 08:36:08,531 - ydk - DEBUG - openconfig-mpls-rsvp, OpenConfig working group, 2.1.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-mpls-sr, OpenConfig working group, 2.1.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-mpls-types, OpenConfig working group, 2.1.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-network-instance, OpenConfig working group, 0.6.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-network-instance-types, OpenConfig working group, 0.5.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-network-instance-l3, OpenConfig working group, 0.6.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-packet-match, OpenConfig working group, 1.0.0
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-platform, OpenConfig working group, 0.12.1
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-platform-cpu, OpenConfig working group, 0.1.1
2019-08-22 08:36:08,532 - ydk - DEBUG - openconfig-platform-types, OpenConfig working group, 0.10.1
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-procmon, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-rib-bgp, OpenConfig working group, 0.2.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-rib-bgp-ext, OpenConfig working group, 0.2.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-rib-bgp-types, OpenConfig working group, 0.2.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-segment-routing, OpenConfig working group, 0.0.3
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-system, OpenConfig working group, 0.6.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-system-wifi-ext, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-system-logging, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-system-management, OpenConfig working group, 0.1.2
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-system-terminal, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,533 - ydk - DEBUG - openconfig-wifi-mac, OpenConfig working group, 0.3.0
2019-08-22 08:36:08,534 - ydk - DEBUG - openconfig-wifi-phy, OpenConfig working group, 0.2.0
2019-08-22 08:36:08,534 - ydk - DEBUG - ===========Supported Encodings===========
2019-08-22 08:36:08,535 - ydk - DEBUG - Encoding JSON
2019-08-22 08:36:08,535 - ydk - DEBUG - Encoding JSON_IETF
2019-08-22 08:36:08,535 - ydk - DEBUG - =========================================
2019-08-22 08:36:08,535 - ydk - DEBUG -
2019-08-22 08:36:08,536 - ydk - DEBUG - Creating libyang context in path: /users/scoroger/_yang
2019-08-22 08:36:08,536 - ydk - DEBUG - [libyang] Extension plugin "/usr/local/lib/libyang/libyang_ext_test.so" successfully loaded.
2019-08-22 08:36:08,537 - ydk - DEBUG - [libyang] Extension plugin "/usr/local/lib/libyang/metadata.so" successfully loaded.
2019-08-22 08:36:08,538 - ydk - DEBUG - [libyang] Extension plugin "/usr/local/lib/libyang/nacm.so" successfully loaded.
2019-08-22 08:36:08,539 - ydk - DEBUG - [libyang] Reading module "ietf-yang-metadata".
2019-08-22 08:36:08,540 - ydk - DEBUG - [libyang] Module "ietf-yang-metadata@2016-08-05" successfully parsed as implemented.
2019-08-22 08:36:08,540 - ydk - DEBUG - [libyang] Reading module "yang".
2019-08-22 08:36:08,541 - ydk - DEBUG - [libyang] Resolving "yang" unresolved schema nodes and their constraints...
2019-08-22 08:36:08,541 - ydk - DEBUG - [libyang] All "yang" schema nodes and constraints resolved.
2019-08-22 08:36:08,541 - ydk - DEBUG - [libyang] Module "yang@2017-02-20" successfully parsed as implemented.
2019-08-22 08:36:08,543 - ydk - DEBUG - [libyang] Reading module "ietf-inet-types".
2019-08-22 08:36:08,543 - ydk - DEBUG - [libyang] Resolving derived type "union" failed, it will be attempted later.
2019-08-22 08:36:08,543 - ydk - DEBUG - [libyang] Resolving derived type "union" failed, it will be attempted later.
2019-08-22 08:36:08,544 - ydk - DEBUG - [libyang] Resolving derived type "union" failed, it will be attempted later.
2019-08-22 08:36:08,544 - ydk - DEBUG - [libyang] Resolving derived type "union" failed, it will be attempted later.
2019-08-22 08:36:08,544 - ydk - DEBUG - [libyang] Resolving "ietf-inet-types" unresolved schema nodes and their constraints...
2019-08-22 08:36:08,545 - ydk - DEBUG - [libyang] All "ietf-inet-types" schema nodes and constraints resolved.
2019-08-22 08:36:08,545 - ydk - DEBUG - [libyang] Module "ietf-inet-types@2013-07-15" successfully parsed as implemented.
2019-08-22 08:36:08,546 - ydk - DEBUG - [libyang] Reading module "ietf-yang-types".
2019-08-22 08:36:08,547 - ydk - DEBUG - [libyang] Module "ietf-yang-types@2013-07-15" successfully parsed as implemented.
2019-08-22 08:36:08,547 - ydk - DEBUG - [libyang] Reading module "ietf-datastores".
2019-08-22 08:36:08,547 - ydk - DEBUG - [libyang] Module "ietf-datastores@2017-08-17" successfully parsed as implemented.
2019-08-22 08:36:08,548 - ydk - DEBUG - [libyang] Reading module "ietf-yang-library".
2019-08-22 08:36:08,548 - ydk - DEBUG - [libyang] Module "ietf-yang-library@2017-08-17" successfully parsed as implemented.
2019-08-22 08:36:08,549 - ydk - DEBUG - Loading module 'ydk', revision '2016-02-26'
2019-08-22 08:36:08,549 - ydk - DEBUG - Getting module 'ydk' submodule 'none'
2019-08-22 08:36:08,549 - ydk - DEBUG - Looking for file in folder: /users/scoroger/_yang
2019-08-22 08:36:08,549 - ydk - DEBUG - Opening file '/users/scoroger/_yang/[email protected]'
2019-08-22 08:36:08,551 - ydk - DEBUG - Path found with revision: /users/scoroger/_yang/[email protected]
2019-08-22 08:36:08,556 - ydk - DEBUG - [libyang] Module "ydk@2016-02-26" successfully parsed as implemented.
2019-08-22 08:36:08,556 - ydk - DEBUG - Loading module 'ietf-netconf', revision '2011-06-01'
2019-08-22 08:36:08,556 - ydk - DEBUG - Getting module 'ietf-netconf' submodule 'none'
2019-08-22 08:36:08,556 - ydk - DEBUG - Looking for file in folder: /users/scoroger/_yang
2019-08-22 08:36:08,556 - ydk - DEBUG - Opening file '/users/scoroger/_yang/[email protected]'
2019-08-22 08:36:08,558 - ydk - DEBUG - Path found with revision: /users/scoroger/yang/[email protected]
2019-08-22 08:36:08,563 - ydk - DEBUG - [libyang] Module "ietf-netconf@2011-06-01" successfully parsed as implemented.
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'ietf-yang-metadata'
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'yang'
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'ietf-inet-types'
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'ietf-yang-types'
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'ietf-datastores'
2019-08-22 08:36:08,563 - ydk - DEBUG - Populating new module schema 'ietf-yang-library'
2019-08-22 08:36:08,564 - ydk - DEBUG - Populating new module schema 'ydk'
2019-08-22 08:36:08,564 - ydk - DEBUG - Populating new module schema 'ietf-netconf'
2019-08-22 08:36:08,564 - ydk - DEBUG - gNMISession: Connected to 180.11.0.11 using Insecure Channel
2019-08-22 08:36:08,564 - ydk - INFO - gNMIServiceProvider Connected to 180.11.0.11 via Insecure Channel
2019-08-22 08:36:08,580 - ydk - DEBUG - Executing 'get' gRPC on single entity
2019-08-22 08:36:08,580 - ydk.types.Entity - DEBUG - Get name leaf data for "bgp". Count: 0
2019-08-22 08:36:08,580 - ydk - DEBUG - parse_entity_prefix: Entity path: 'openconfig-bgp:bgp'
2019-08-22 08:36:08,580 - ydk - DEBUG - parse_prefix_to_path: Got data node path prefix: 'openconfig-bgp:bgp'
2019-08-22 08:36:08,580 - ydk - DEBUG - gnmi_util::add_path_elem: Adding elem: 'bgp'
2019-08-22 08:36:08,581 - ydk - DEBUG -
2019-08-22 08:36:08,581 - ydk.types.Entity - DEBUG - Get name leaf data for "global". Count: 0
2019-08-22 08:36:08,581 - ydk - DEBUG - gnmi_util::parse_entity_children: Looking at child 'global
': 'global'
2019-08-22 08:36:08,582 - ydk - DEBUG - Child has no data and no operations
2019-08-22 08:36:08,582 - ydk - DEBUG -
2019-08-22 08:36:08,582 - ydk.types.Entity - DEBUG - Get name leaf data for "neighbors". Count: 0
2019-08-22 08:36:08,582 - ydk - DEBUG - gnmi_util::parse_entity_children: Looking at child 'neighbors': 'neighbors'
2019-08-22 08:36:08,583 - ydk - DEBUG - Child has no data and no operations
2019-08-22 08:36:08,583 - ydk - DEBUG -
2019-08-22 08:36:08,583 - ydk.types.Entity - DEBUG - Get name leaf data for "peer-groups". Count: 0
2019-08-22 08:36:08,583 - ydk - DEBUG - gnmi_util::parse_entity_children: Looking at child 'peer_groups': 'peer-groups'
2019-08-22 08:36:08,583 - ydk - DEBUG - Child has no data and no operations
2019-08-22 08:36:08,583 - ydk - DEBUG - Executing 'get' gRPC on multiple paths
2019-08-22 08:36:08,583 - ydk - INFO -
=============== Get Request Sent ================
path {
origin: "openconfig-bgp"
elem {
name: "bgp"
}
}
type: CONFIG
encoding: JSON_IETF

2019-08-22 08:36:09,002 - ydk - ERROR - GetRequest failed with error:
Unsupported Path::Origin value[ openconfig-bgp ] in Request
Traceback (most recent call last):
File "/opt/ats/scoroger/pyats/wnbust/users/scoroger/gnmi_openconfig_test_copy.py", line 33, in
x = gnmi_service.get(provider, inter) # Perform get operation
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/gnmi/services/gnmi_service.py", line 48, in get
top_result = self._gs.get(provider, top_filters, operation)
File "/usr/lib64/python3.4/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/opt/ats/scoroger/pyats/lib64/python3.4/site-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "", line 1, in
ydk.errors.YServiceProviderError: GetRequest failed with error:
Unsupported Path::Origin value[ openconfig-bgp ] in Request
2019-08-22 08:36:09,026 - ydk - INFO - Disconnected from device

Process finished with exit code 1

System Information

(pyats) -bash-4.2$ python
Python 3.4.10 (default, Jun 24 2019, 13:20:56)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.

@valeriodigregorio
Copy link

valeriodigregorio commented Jun 10, 2020

I can see this in my testbed:

        repo = Repository()
        provider = gNMIServiceProvider(repo=repo,
                                       address=args.gnmi.hostname,
                                       port=args.gnmi.port,
                                       username=args.gnmi.username,
                                       password=args.gnmi.password)
        crud = CRUDService()
        entries = crud.read(provider, Cisco_IOS_XE_wireless_wlan_cfg.WlanCfgData.WlanCfgEntries())

Output is:

2020-06-10 10:03:35,494 - ydk - INFO - Path where models are to be downloaded: /users/vadigreg/.ydk/10.51.65.177
2020-06-10 10:03:35,509 - ydk - INFO - gNMIServiceProvider Connected to 10.51.65.177 via Insecure Channel
2020-06-10 10:03:35,541 - ydk - INFO - Executing CRUD read operation on [Cisco-IOS-XE-wireless-wlan-cfg:wlan-cfg-data]
2020-06-10 10:03:35,542 - ydk - INFO - 
=============== Get Request Sent ================
path {
  origin: "Cisco-IOS-XE-wireless-wlan-cfg"
  elem {
    name: "wlan-cfg-data"
  }
  elem {
    name: "wlan-cfg-entries"
  }
}
encoding: JSON_IETF


2020-06-10 10:03:36,490 - ydk - ERROR - GetRequest failed with error:
Unsupported Path::Origin value[ cisco-ios-xe-wireless-wlan-cfg ] in Request
Traceback (most recent call last):
  File "main.py", line 59, in <module>
    entries = crud.read(provider, Cisco_IOS_XE_wireless_wlan_cfg.WlanCfgData.WlanCfgEntries())
  File "/nobackup/pyats/lib/python3.6/site-packages/ydk/services/crud_service.py", line 60, in read
    return _crud_read(provider, read_filter, False, self._crud.read)
  File "/nobackup/pyats/lib/python3.6/site-packages/ydk/services/crud_service.py", line 88, in _crud_read
    read_top_entity = crud_call(provider, top_filters)
  File "/auto/pysw/cel8x/python64/3.6.10/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/nobackup/pyats/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
    _raise(_exc)
  File "/nobackup/pyats/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 54, in _raise
    exec("raise exc from None")
  File "<string>", line 1, in <module>
ydk.errors.YServiceProviderError:  GetRequest failed with error:
Unsupported Path::Origin value[ cisco-ios-xe-wireless-wlan-cfg ] in Request

My C9800 can reply correctly to this:

{
  "prefix": {
    "origin": "rfc7951",
    "elem": [{"name": "Cisco-IOS-XE-wireless-wlan-cfg:wlan-cfg-data"}]
  },
  "path": [{"origin": "rfc7951", "elem": [{"name": "wlan-cfg-entries"}]}],
  "type": "CONFIG",
  "encoding": "JSON_IETF",
  "action": "get_request"
}

Is there any known workaround?

@valeriodigregorio
Copy link

valeriodigregorio commented Jun 10, 2020

I just needed a workaround for my PoC that is issuing a simple GET. Here is a diff that worked, but this is not a usable patch. You can just take it as a reference, in case you need:

diff --git a/sdk/cpp/gnmi/src/gnmi_client.cpp b/sdk/cpp/gnmi/src/gnmi_client.cpp
index 513e397f..7b6e8fe4 100644
--- a/sdk/cpp/gnmi/src/gnmi_client.cpp
+++ b/sdk/cpp/gnmi/src/gnmi_client.cpp
@@ -357,12 +357,16 @@ static pair<string,string> get_path_from_update(gnmi::Update update)
         int elem_size = path.elem_size();
         if (elem_size > 0) {
             string origin = path.origin();
-            if (origin.length() > 0) {
+            if (origin.length() > 0 && origin.compare("rfc7951") != 0) {
                 path_to_prepend.append("\"" + origin + ":");
             }
+
             int l;
             for (l = 0; l < elem_size; l++)
             {
+                if (origin.compare("rfc7951") == 0) {
+                    continue;
+                }
                 path_element_to_add = path.elem(l).name();
                 if (l>0 || path_to_prepend.length()==0)
                     path_to_prepend.append("\"");
diff --git a/sdk/cpp/gnmi/src/gnmi_util.cpp b/sdk/cpp/gnmi/src/gnmi_util.cpp
index 952670e8..234c276d 100644
--- a/sdk/cpp/gnmi/src/gnmi_util.cpp
+++ b/sdk/cpp/gnmi/src/gnmi_util.cpp
@@ -284,8 +284,8 @@ void parse_prefix_to_path(const string& prefix, gnmi::Path* path)
         mod = prefix.substr(0, p);
         con = prefix.substr(p+1);
         YLOG_DEBUG("parse_prefix_to_path: Got data node path prefix: '{}:{}'", mod, con);
-        path->set_origin(mod);
-        add_path_elem(path, con);
+        path->set_origin("rfc7951");
+        add_path_elem(path, prefix);
     }
     else {
         YLOG_DEBUG("parse_prefix_to_path: Got unexpected data node path: '{}', missing prefix.", prefix);

@ygorelik
Copy link
Collaborator

In my opinion use of 'rfc7951' as origin in the path does not have any sense. It is not a part of YANG model and therefore cannot be derived from it. Hence YDK will not be able to support such path format.

@valeriodigregorio
Copy link

valeriodigregorio commented Sep 11, 2020

I explored ways to fix this (and I have a patch that supports rfc7951). In practice I have:

enum class Origin {   // ORIGIN       | PREFIX
    MODULE,           // Module name  | None
    BLANK,            // Blank        | None
    OPENCONFIG,       // "openconfig" | None
    RFC7951,          // "rfc7951"    | Module name
//  LEGACY            // "legacy"     | Module prefix
};

Now the "MODULE" case is the current (and default) way YDK works. I then added a provider.set_origin(Origin.RFC7951) that you can run at any time to start sending requests with the different type of origin. I do not need all possible cases, I actually only need RFC7951. The OPENCONFIG and BLANK cases would work pretty much like the default MODULE case, but I haven't tested them (although my patch takes them into account). I just assumed that I could safely drop support for LEGACY that is only for pre-16.10 wireless controllers. That means my patch would be a good starting point to fix gNMI Namespacing issues. I need some help to ensure I'm not breaking stuff and someone actually interested in testing BLANK/OPENCONFIG because I've no clue what a meaningful test for them is. Should I share this in a PR? Or there's no chance we'll see any support for this weird gNMI Namespacing used in wireless controllers?

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

No branches or pull requests

3 participants