cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
662
Views
0
Helpful
3
Replies

gnmi read operation on /openconfig-interfaces:interfaces/

ydkdev
Level 1
Level 1

The ydk-api generate is "/interfaces". How to append the origin yang name "/openconfig-interfaces:" to the path.

i.e., to generate path '/openconfig-interfaces:interfaces/'.

3 Replies 3

saalvare
Cisco Employee
Cisco Employee

Are you referring in the RPC?  It is captured as the origin:

 

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


2020-02-20 19:34:47,233 - ydk - INFO - 
============= Get Response Received =============
notification {
  timestamp: 1582256075784914578
  update {
    path {
      origin: "openconfig-interfaces"
      elem {
        name: "interfaces"
      }
    }
    val {
      json_ietf_val: " // snipped "
    }
  }
}
error {
}

The YDK builds the path internally based on provided model API object. Therefore it is not clear from your post, what are you trying to accomplish. Could you please elaborate on your task and script.

Yan Gorelik
YDK Solutions

Thanks, Fixed by handling "origin" in gnmi-server.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: