-
Notifications
You must be signed in to change notification settings - Fork 14
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
How to use other .yang moduels? #29
Comments
Hi Dave, https://github.com/cisco-ie/ios-xr-grpc-python/tree/brmcdoug/examples/json We use pyang to walk the structure of a given data model, then manually create json objects by following the output of pyang. https://pypi.org/project/pyang/ A couple pyang examples: |
Ah! I didn't think to look in a different branch. Now I know they are under your branch "brmcdoug". I am familiar with pyang, also familiar with those commands. To confirm, there is no automated way of working with the yang files. The Yang files only define the structure of the data. It is up to the developer to create parts of that structure that want to point point with a different data format (json seems to be the only format supported with your scripts?). That's fairly impressive that so many of these json files were manually created. Unrelated, I can't find the ems.pem file anywhere on my cisco box. I checked in /misc/config/grpc/ (No grpc/ dir) or /var/xr/config/grpc (No xr/ dir). Any idea how to generate a ems.pem file or where it would be hiding (Running 7.2.1)? I appreciate your quick response and patience with my simple questions :) |
Haha, yeah, those were manually created...caffeine and lots of ctrl-c-ctrl-v. As for ems.pem, make sure to configure grpc on the box itself with TLS enabled (this is the default setting). RP/0/RP0/CPU0:IE-5508-2#sho run grpc RP/0/RP0/CPU0:IE-5508-2#run |
@brmcdoug, thanks that worked, tls / ems.pem available now. |
You're right, this isn't a great discussion board. You could try https://developer.cisco.com/yangsuite/ |
Hi,
First of all, understand I am learning gRPC to use with our CiscoXR. Therefore if anything I ask seems amateurish, that is why.
I read though the wiki and Readme.
It looks like this repo has two .json files which you use as the structure for sending GRPC commands to adjust BGP.
How does one use other yang modules?
Looking at the yang/cisco repo, there are a variety of modules to use. Would like to use one based on my version (7.2.1).
I tried converting the same .yang module you used to xml then from xml to json, but the structure looks completely different.
How did you create / convert your .json files?
The text was updated successfully, but these errors were encountered: