All YANG Suite, all the time, DevNet Snack Minute, Episode 9

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Applause] [Music] hey snackers matt dinapoli here i'm a manager of developer advocacy with the cisco devnet program yo snackers this is curry miskander i'm a developer advocate with cisco devnet welcome to episode 9 of devnet snack minutes if this is your first time with us devnet snack minutes is your weekly 10 minutes all things devnet where we talk about coding apis and just cool stuff that we think you guys might like to enjoy on this episode we have a special guest for you um coming in to talk to us about network programmability and what cisco is doing towards that with the new release of yang sui jeremy welcome to the party man hey kareem hi snackers thanks for having me here very happy to join today and talk about the cisco yang suite the tooling that we're releasing to help with network automation and programmability i'm so excited that we're doing this because i've been looking forward to the release of this tool for a year if i'm being honest who is it matt yeah exactly well we have um yang explorer that's the tooling the each the flash based tooling that's been out for quite some time we have lots of users using this it's public open source and available here from cisco devnet github page but really this is the legacy tooling it's flash based it's end of life and really today now we're talking about the yang suite which is the evolution in the yang based tooling that we have here so yank suite it works with primarily with cisco ios xe but it's supporting xr and nx operating systems and it works with the netconf api the rest conf api as well as some of the next-gen apis from the google apis like grpc and gmi so it's a full-fledged tooling that's available to work with the apis on all of our network devices that cisco offers that have these yang-based apis so can you tell us how developers or even network engineers that are that are starting to get into automation can leverage yang suite to kind of help move their path forward make things a little bit easier understand the inner workings of netcoff and rest conf a little bit better yeah absolutely so as you know the yang-based apis they use the yang data models here and right now we publish them all on github but the tooling has availability to download the yang models directly from the network device and then give us information or metadata or details about all of the data models so it lets us understand information about the specific models that we're working with so an example here when we're working with interfaces we can load that interface's data model through the tooling and then understand exactly what's contained in that data model for example counters and statistics for the ethernet interfaces is one very common example that a lot of customers use for monitoring as well as doing just gets or sets to configure the interface or to get the statistics or the configuration of the end of that interface so yank suite allows us to download that data model load it understand what's uh exposed within it and then taking that one step further we're actually able to construct and test the apis so we can use yank suite to build an api call and yanks will also send and transmit and receive that api call for us to the network device and then give us details about the results there so in the example here again we're just doing uh interfaces and i have just a pre-generated api call here to just give me the the interface statistics so if when we go over into the demo and actually run this then we'll actually see the data that comes back from the network device from the from the yang based api yeah that'd be awesome jeremy before we get into the the demo and i'm super excited about look seeing this what is as a developer that i'm looking to adopt this and i'm looking to automate my network how do i get my hands on this and what's what is the release like uh for me yeah good question so how do you get this this publicly available tool now so uh some of us are familiar with yang explorer that's been around for quite some time so that's available on devnet and as well as on github and we're following the same approach with the yang suite so first and foremost on the devnet site developer.cisco.com yang suite you'll be able to go there and access all the links and the resources the documentation and actual the install files so um on the developer.cisco.com that's one option and then also we're publishing it onto github as well also under the cisco.net domain um and the repository is likewise just called yank suite so you can go to the github repository there and also find all the links and resources there so you have a couple options you can also install it directly using pip so you can just do a pip install yank suite and then the tool will be installed into your python environment that you already have in your in your system so if we take a look over here at the demo here this is the the main login page to yank suite so let me just log in you're running this locally right this is a locally run application yeah i'm just running this locally so that's why i just connect the local host here and upon the first login we need to accept the end user license agreement so we can click the button here just to review the eula and then once we're ready to accept that we can accept it do people actually review that stuff then yeah absolutely right so it is it is something worth calling out that the yang explorer is free and open source and the yang suite is covered under the cisco eula so it is a completely separate license agreement that's covering the two different products obviously yank suite is a much newer product here with much more capabilities so this is what it looks like when we first log into the tool and as we discussed earlier about accessing and downloading the tool the documentation is also built in to the tool so of course you can go onto the devnet site or onto github and read the documentation there but if you've also installed it locally like i've done here we have access to the exact same set of documentation built into the tool so that's all here along the right side um but really what i want to showcase here today is the pre the prerequisites and some of the setup that i already did so first and foremost when we're working with yang suite we're typically working with a network device now in this case i've already added my catalyst 9300 device and i can go ahead and do a reachability check what happens here is it just goes out there's a quick ping and it checks that the api is open and connected and that we can authenticate to it so that's what's happening right now the tool is just going in and validating that the api is is accessible and we get this green check mark check mark here next to netcomp saying that it's all good to go i have uh things icmp disabled in my network so of course uh it's no surprise that we have ping failures but this just tells us that the netconf api is ready to go the next kind of step that we're doing when we set this up is to set up the repository and i've already downloaded the data models from the device so within each of our network devices there's repositories of data models that map to the features that are supported on that network network device so i've downloaded all of the data models over netconf into my tooling here so that i can now go and work with these data models and interact with them as well as interact with the apis for this particular device that you would use netconf instead of raskoff um is there i'm not i'm just yep uh the difference is between netconf and rescoff definitely um in the initial release of this tool we're just supporting netconf and we will have support for rest comp company that's that's on the roadmap for sure um also for downloading the data models themselves the the yang files themselves um that's a supported operation from netconf and that operation has different levels of support over resconf so it's a little bit more difficult to download the individual data models over resconf well it is still possible much easier much more supported by the rfc for netconf ah very cool i didn't know that that's some interesting information thanks jeremy for sure so here we are exploring the yang models again i just selected the repository from of the data models that i have and now we can just type in whatever data model that we're looking for so i'm just going to search for interfaces and it brings up a list of all the interfaces that we have all the all the data models that match uh interfaces i'm just going to load the one of the most common data models here which is the interfaces oper this is the operational yang data model that gives us details about the interfaces on this device so when we expand this we get to see all of the leafs and the containers and the lists that are available to describe the data that we're working with here so if we select just one of these for example the interface type we get some information about the description the xpath the prefix these are all informations that we're using as developers when we're building payloads and when we orchestrating network management systems so this is just giving us all the details about the model so that we can understand you know when we go and do a get against this or when we subscribe to telemetry against this what is this actually going to give us so it tells us the description about it as well as what kind of data to expect back um as well as which datas are supported so this is just a get operation and it's a read-only access so we can't actually go and modify anything in this particular data model so that's just exploring the data model now that we've done that we can actually go and interact with the device and for all of us that have worked with yang data models before and you know trying to grab this information directly from the devices this is such a nice jump ahead to even even from where we were with yang explorer um you know just looking at this right now it makes your life so much easier as a developer totally yeah that's the whole point of this is making developers lives easier having a gui tool that we can go into click around understand the apis and the data models a little bit better and then we can take either the payloads from this or the data models themselves and then build those into whatever tooling or systems that we're working with very cool if i look at this and i'm looking at the tool itself if i'm looking at it from an api perspective just if i'm messing around with just some apis it reminds me a lot of postman for network programmability and yang within postman i know you can go in and you know build out your your header your api method and call whatnots but you can also generate the code at the end is this something that's available here am i just jumping ahead yep you're jumping ahead for sure there are uh plugins available to generate python code very similar to like ydk or capabilities that we've had in yang explorer as well so yeah generating code so that we can easily take that and put those into other systems absolutely that's supported it's awesome so let's take a look at how we can actually build up an example payload that we might put into some other tooling that we're building so again i'm going to go in to select the data model set that i'm working with and then let's use the same example here of the interface's oper data model let's work with interfaces and and understand the counters and the statistics that are going through this device so we can use a netcomp netconf operation of a get right we're going to get data from this and the device that we're working against here is this my catalyst 9300 again here we have the data model expanded a little bit further but this time you'll notice it looks a little different right we don't actually see the metadata about the model now we actually have options to select specific leafs or containers that we're interested in that's what i'm going to do here i'm going to put a tick box next to the statistics so that we can get all of these uh these counters and packet counters and information about what's happening as well as put a tick next to the interface name so we can know which interface all these counters are for now that i've selected what i want to instrument and what i want to see we can build this rpc and this is really the power of yank sweeter one of the main points of yank suite here is generating this xml4s this is now is going to be transmitted to the device the device will parse this and then send us back the results of what we're asking for this is the equivalent of a cli which is like a show interface details or show interface detail where we see every single interface listed and all of the counter statistics details for them let's go ahead and run this here i'm going to click the run command and it's going to transmit that xml payload and then give us back the results here so if i just scroll if i wait for this to wait for the demo to work all right so we got the results back that's good uh and here we can take a look at some of the results so specifically here's for interface vlan 128 and here's the counters and the statistics that we were looking for we can scroll up and as you scroll up you can see there's tons of interfaces here and let's just stop on one at random here gig 40. right so we can see you know there's pretty much nothing on gig 40 or let's scroll up to some of these other ones where we actually do have some some connectivity here so here's gig right and how we can actually see the the in packets the broadcast packets and everything that we have that's defined within the data model so here's just a really quick example of uh building that payload in yank suite and then transmitting it to the tool and then just reviewing the results that come back that's super cool jeremy that's about all the time we have today but before we let you go we always have one question we like to ask our guests and so coming at you uh what's one superpower you would like to have should superpowers actually exist oh man which which ones would i like to have if superpowers exist like i was thinking more like what is my superpower yeah so definitely you know my passion and hobby over the past year or two has really been clean healthy eating so my superpower definitely i'd like that to be like the ability to have like really good quality food and the skills and expertise to prepare and cook and enjoy all of that so i think that's what i would like to strive for and that's where my superpower would be that's awesome that's awesome yeah that's great nice it's a pretty creative answer we've uh we've heard many answers throughout the show but this is uh pretty cool um great demo great presentation thank you for joining us jeremy and thank you snackers for joining us on this episode of snack minute see you next time see you next time bye [Music] you
Info
Channel: Cisco DevNet
Views: 1,642
Rating: undefined out of 5
Keywords: Cisco, DevNet
Id: 3zmNDfn8b38
Channel Id: undefined
Length: 14min 52sec (892 seconds)
Published: Tue Feb 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.