YANG Boot Camp The YANG Gang IETF 71. YANG Boot Camp The YANG Gang IETF 71.

Slides:



Advertisements
Similar presentations
XCAP Tutorial Jonathan Rosenberg.
Advertisements

Management Information Base for Version 2 of the Simple Network Management Protocol Presented by Zhou Ji (MIB for SNMPv2) By SNMPv2 Working Group.
OLAC Metadata Steven Bird University of Melbourne / University of Pennsylvania OLAC Workshop 10 December 2002.
LIS650lecture 1 XHTML 1.0 strict Thomas Krichel
Complex Types and Typed Instance Identifiers as YANG Extension
Project Proposal Anton Tkacik, Lukas Sedlak
Web Service Architecture
Introduction to WSDL presented by Xiang Fu. Source WSDL 1.1 specification WSDL 1.1 specification – WSDL 1.2 working draft WSDL.
XCON - IETF 62 (March 2005) - Minneapolis 1 XCON data modeling – NETCONF, RDF and others draft-schulzrinne-sipping-emergency-req-01 draft-sipping-sos Henning.
Developing a Metadata Exchange Format for Mathematical Literature David Ruddy Project Euclid Cornell University Library DML 2010 Paris 7 July 2010.
RDF Tutorial.
Simple tutorial Yang & Netconf.
1 HTML’s Transition to XHTML. 2 XHTML is the next evolution of HTML Extensible HTML eXtensible based on XML (extensible markup language) XML like HTML.
Introducing the Specifications of the MEF
SNMP & MIME Rizwan Rehman, CCS, DU. Basic tasks that fall under this category are: What is Network Management? Fault Management Dealing with problems.
NETMOD Architecture Phil Shafer IETF 72.
ONF Configuration and Management WG Jürgen Quittek
1 © 1999 BMC SOFTWARE, INC. 2/10/00 SNMP Simple Network Management Protocol.
SNMP ITL. ITL: © Hans Kruse, Shawn Ostermann, Carl Bruggeman2 Objectives Overview of SNMP SNMP Tools SNMP Monitoring Infrastructure.
DP&NM Lab. POSTECH, Korea - 1 -Interaction Translation Methods for XML/SNMP Gateway Interaction Translation Methods for XML/SNMP Gateway Using XML Technologies.
SMI to XSD Translations IETF70 David Harrington. Agenda The Need The Approaches Comparisons.
Abierman-nanog-30may03 1 XML Router Configs BOF Operator Involvement Andy Bierman
© Hitachi, Ltd All rights reserved. NETCONF Configuration I/F Advertisement by WSDL and XSD Hideki Okita, Tomoyuki Iijima, Yoshifumi Atarashi, Ray.
Abierman-netconf-mar03 1 NETCONF BOF 56th IETF San Francisco, California March 17, 2003 Discussion: Admin:
68th IETF – OPS area – XML MIB Modules XML MIB Modules draft-stephan-ops-xml-mib-module-template-00 draft-stephan-ops-xml-mib-module-template-00.
429 SNMP. (c) 2001, Hans Kruse and Shawn Ostermann 2 Objectives  Overview of SNMP  SNMP Tools  Direct Access to Cisco Routers.
FIMS v1.1 Version numbers in schema Richard Cartwright Quantel July 2013.
Do We Need a New Network Management Framework? David Harrington IETF66 OPS Area Meeting Montreal, Quebec, Canada.
YANG in a Nutshell The YANG Gang IETF 71. YANG has... A reasonable self-contained specification A focus on readers and reviewers Text-based , patch,
I2RS draft-rfernando-yang-mods.txt I2RS Yang Extensions draft-rfernando-yang-data-mods R.Fernando, P.Chinnakannan, M.Madhayyan, A.Clemm.
PG 1 Netconf Data Model Netmod BOF – IETF 60 Sharon Chisholm – Randy Presuhn -
Protocol for I2RS I2RS WG IETF #89 London, UK Dean Bogdanovic v0.1.
Representing Netconf Data Models using Document Schema Definition Languages (DSDL) Rohan Mahy Sharon Chisholm Lada Lhotka IETF 72 - Dublin.
Management Considerations Sharon Chisholm
Abierman-netconf-mar04 1 NETCONF WG 59th IETF Seoul, Korea March 3, 2003 March 4, 2003.
Using DSDL plus annotations for Netconf (+) data modeling Rohan Mahy draft-mahy-canmod-dsdl-01.
PG 1 Framework for Netconf Data Models Netmod BOF – IETF 60 Sharon Chisholm –
Using XML Schema to define NETCONF Content Sharon Chisholm Alex Clemm TJ Tjong
1 SNMPv2 by Behzad Akbari Fall 2008 In the Name of the Most High.
1 IETF69 BOF XSD for accessing SMIv2 data models Yan Li
YANG Background and Discussion: Why we need a new language for NETCONF configuration modeling The YANG Gang IETF 70 Vancouver, Canada.
I2rs Requirements for NETCONF IETF 93. Requirement Documents
Netmod Netconf Data Modeling Sharon Chisholm Nortel
ITL Getting Information: Packet Sniffing Cisco Router Commands SNMP.
Netconf Notifications Sharon Chisholm Hector Trevino IETF 67 November 2006.
YANG Modelling and NETCONF Protocol Discussion
YANG Roque Gagliano.
Using DSDL plus annotations for Netconf (+) data modeling
Convergence of Network Management Protocols
IETF69 BOF XSD for accessing SMIv2 data models
“with-defaults” capability in NETCONF
draft-clacla-netmod-yang-model-update-02
Subscribing to YANG datastore push updates draft-netconf-yang-push-00 IETF #94 Yokohama A. Clemm A. Gonzalez Prieto
Rest Style Large MeAsurement Platform Protocol
NETCONF Configuration I/F Advertisement by WSDL and XSD
Sharon Chisholm Netconf Phase 2 Musing Sharon Chisholm
draft-levin-xcon-cccp-02.txt Orit Levin
UDP based Publication Channel for Streaming Telemetry
Factory default Setting draft-wu-netmod-factory-default-01
Henning Schulzrinne Dept. of Computer Science Columbia University
Binary encoding draft-MAHESH-NETCONF-binary-encoding
Stream Issues Alex, Ambika, Eric, Tim
NMDA Q & A draft-dsdt-nmda-guidelines &
Post WG LC NMDA datastore architecture draft
Evolution of the Subscription & Event Notification Drafts IETF #98 Chicago Eric Voit 28-Mar-2017 DRAFT Authors on at least 1 drafts Andy Bierman Alexander.
WebDAV Design Overview
Job Attribute and Event Monitoring Methods
YANG Instance Data for Documenting Server Capabilities
Getting to Know Model-Driven Management With the YANG Catalog
Subscription to Multiple Stream Originators
Presentation transcript:

YANG Boot Camp The YANG Gang IETF 71

NETCONF Modeling Language NETCONF base protocol (rfc 4741) RPC mechanism and operations Left content and data models for future work Operations allow any XML <get>, <get-config> and <edit-config> Mgmt Application Devices YANG modules

YANG is …. A NETCONF modeling language Think SMI for NETCONF Models semantics and data organization Syntax falls out of semantics Able to model config data, state data, RPCs, and notifications Based on SMIng syntax Text-based Email, patch, and RFC friendly

YANG Concepts Standard Models Proprietary Models config data RPCs notifications containers leafs types

YANG .... Directly maps to XML content (on the wire) Extensible Add new content to existing data models Without changing the original model Add new statements to the YANG language Vendor extensions and future proofing Preserves investment in SNMP MIBs libsmi translates MIBs to YANG See tools at www.yang-central.org

Semantics and syntax Semantic World YANG Syntactic World XML Schema Relax-NG Anything Else Out going XML Legacy tools Validation

YANG values .... Readers and reviewers time and learning curve Readability is highest priority Limited Scope Doesn't boil the ocean Maximize utility within that scope Can be extended in the future Experience gained by existing implementations Based on four proprietary modeling languages Years of experience within multiple vendors Quality draft backed by running code

Modules and submodules Header statements yang-version, namespace, prefix Linkage statement import and include Meta information organization, contact Revision history revision Mod1 Import Mod2 Include SubA Include SubX SubY SubZ

module acme-module { namespace "http://acme.example.com/module"; prefix acme; import "yang-types" { prefix yang; } include "acme-system"; organization "ACME Inc."; contact joe@acme.example.com; description "The module for entities implementing the ACME products"; revision 2007-06-09 { description "Initial revision."; …

The "leaf" Statement A leaf has one value no children one instance YANG Example: leaf host-name { type string; mandatory true; config true; description "Hostname for this system"; } NETCONF XML Encoding: <host-name>my.example.com</host-name>

The "leaf-list" Statement A leaf-list has one value no children multiple instances YANG Example: leaf-list domain-search { type string; ordered-by user; description "List of domain names to search"; } NETCONF XML Encoding: <domain-search>high.example.com</domain-search> <domain-search>low.example.com</domain-search> <domain-search>everywhere.example.com</domain-search>

The "container" Statement A container has no value holds related children one instance YANG Example: container system { container services { container ssh { presence "Enables SSH"; description "SSH service specific configuration"; // more leafs, containers and stuff here... } May have specific meaning (presence) Or may simply contain other nodes NETCONF XML Encoding: <system> <services> <ssh/> </services> </system>

The "must" Statement Constrains nodes by XPath expression container timeout { leaf access-timeout { description "Maximum time without server response"; units seconds; mandatory true; type uint32; } leaf retry-timer { description "Period to retry operation"; must "$this < ../access-timeout" { error-app-tag retry-timer-invalid; error-message "The retry timer must be " + "less than the access timeout";

The "list" Statement A list is uniquely identified by key(s) holds related children no value multiple instances YANG Example: list user { key name; leaf name { type string; } leaf uid { type uint32; leaf full-name { leaf class { default viewer; NETCONF XML Encoding: <user> <name>glocks</name> <full-name>Goldie</full-name> <class>intruder</class> </user> <user> <name>snowey</name> <full-name>Snow</full-name> <class>free-loader</class> <name>rzull</name> <full-name>Repun</full-name>

The "augment" Statement Extends data model Inserts nodes Current or imported modules Inserts nodes Into an existing hierarchy Nodes appear in current module's namespace Original (augmented) module is unchanged YANG Example: augment system/login/user { leaf expire { type yang:date-and-time; } NETCONF XML Encoding: <user> <name>alicew</name> <class>drop-out</class> <other:expire>2112-04-01T12:00:00</other:expire> </user>

The "when" Statement Makes sparse augmentation YANG Example: augment system/login/user { when "class = wheel"; leaf shell { type string; } Makes sparse augmentation Nodes are only added when condition is true "when" is XPath expression NETCONF XML Encoding: <user> <name>alicew</name> <class>wheel</class> <other:shell>/bin/tcsh</other:shell> </user>

Built-in types Category Types Integral {,u}int{8,16,32,64} String string, enumeration, boolean Binary Data binary Bit fields bits References instance-identifier, keyref Other empty

Derived types Constraints YANG Example: typedef percent { type uint16 { range "0 .. 100"; } description "Percentage"; leaf completed { type percent; Constraints range length pattern regex A modules may use types imported from other modules NETCONF XML Encoding: <completed>20</completed>

The "union" type Allows a leaf to contain a superset of types YANG Example: leaf limit { description "Number to allow"; type union { type uint16 { range "0 .. 100"; } type enumeration { enum none { description "No limit"; NETCONF XML Encoding: <limit>none</limit> NETCONF XML Encoding: <limit>20</limit>

The "grouping" Statement Defines a reusable collection of nodes Use multiple times A modules may use groupings imported from other modules Refinement Use as structure, record, or object YANG Example grouping target { leaf address { type inet:ip-address; description "Target IP address"; } leaf port { type inet:ip-port; description "Target port number"; container peer { container destination { uses target; NETCONF XML Encoding: <peer> <destination> <address>192.0.2.1</address> <port>22</port> </destination> </peer>

The "choice" Statement Allow only one member of the choice to exist in a valid config datastore YANG Example: choice transfer-method { leaf transfer-interval { description "Frequency at which file transfer happens"; type uint { range "15 .. 2880"; } units minutes; leaf transfer-on-commit { description "Transfer after each commit"; type empty; NETCONF XML Encoding: <transfer-on-commit/>

The "anyxml" Statement Allows arbitrary XML content to be carried in YANG-based models Opaque Limited operations Bulk only YANG Example: anyxml software-version { description "Number to allow"; } NETCONF XML Encoding: <software-version> <base>A10.2</base> <routing>B4.2</routing> <snmp>C87.12</snmp> </software-version>

The "rpc" Statement Defines RPC method names input parameters rpc activate-software-image { input { leaf image-name { type string; } output { leaf status { Defines RPC method names input parameters output parameters <rpc xmlns="urn:mumble"> <activate-software-image> <image-name>image.tgz</image-name> </activate-software-image> </rpc>

The "notification" Statement Defines notification Name Content YANG Example: notification link-failure { description "A link failure has been detected"; leaf if-index { type int32 { range "1 .. max"; } } leaf if-name { type keyref { path "/interfaces/interface/name";

Semantic Differentiators Notice that YANG is modeling the semantics and data organization Not just the syntax Statement Purpose unique Ensure unique values within list siblings keyref Ensure referential integrity config Indicate if a node is config data or not default Supply default value for leafs error-app-tag Define the tag used when constraint fails error-message Define the message used .... mandatory Node must exist in valid config datastore

Tools (yang-central.org) pyang (python) Validates YANG Translates between YANG and YIN (XML) Generates XSD yangto (binary) Generates XSD, dependencies, etc libsmi Translates SMI/SMIv2 MIBs to YANG Other goodies Emacs mode

What can you do to help? Read the draft Join the mailing list There's a lot more in there Join the mailing list yang@ietf.org https://www.ietf.org/mailman/listinfo/yang Try out the tools www.yang-central.org Tutorial (this) at: http://www.yang-central.org/twiki/bin/view/Main/YangTutorials