From the course: Cisco DevNet Associate (200-901) Cert Prep 3: Cisco Platforms and Development
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
YANG model example
From the course: Cisco DevNet Associate (200-901) Cert Prep 3: Cisco Platforms and Development
YANG model example
- [Instructor] Here is the yang definition models of examples, sports that we've seen on the Wiki page. As you could see, it defines a namespace, it has a prefixed to indicate this namespace and it imports other yang types. It's sort of similar to the subclasses of Python language so in inherits all the types of already defined in IETF yang types and it defines its own definition of a type called season which is a string that will be referred into the body of that model later on. Here's what we should be mostly concerned with. And we could collapse and expand, this one has a container note of sports and inside of the sports container, we have two lists. One is person and the other is teams. If we were to zero in on the person lists, we could see it has two leafs of name and birthday. One is a string and the other one is a date and time. Right here is where we take advantage of the inheritance where the yang already define a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.