SlideShare a Scribd company logo
1 of 39
Download to read offline
Yang Modeling in OpenDaylight 
Jan Medved
Agenda 
• Yang Overview 
• Netconf/Yang in OpenDaylight 
• Example/Demo 
• Pointers 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Yang Overview
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 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
YANG Concepts 
RPCs notifications 
leafs 
config data 
types 
Standard 
Models 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
Proprietary 
Models 
containers
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 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Semantics and syntax 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
YANG 
XML Schema Relax-NG Anything Else 
Legacy tools 
Out 
going 
XML 
Semantic 
World 
Syntactic 
World 
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 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Modules and submodules 
• Header statements 
– yang-version, namespace, prefix 
• Linkage statement 
– import and include 
• Meta information 
– organization, contact 
• Revision history 
– revision 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
Mod1 
SubA 
SubX SubY SubZ 
Mod2 
Include 
Import 
Include
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.";! 
}! 
…! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
The "leaf" Statement 
YANG Example:! 
! 
leaf host-name {! 
type string;! 
mandatory true;! 
config true;! 
description "Hostname for this system";! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• A leaf has 
– one value 
– no children 
– one instance 
NETCONF XML Encoding:! 
! 
<host-name>my.example.com</host-name>!
The "leaf-list" Statement 
YANG Example:! 
! 
leaf-list domain-search {! 
type string;! 
ordered-by user;! 
description "List of domain names to search";! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• A leaf-list has: 
– one value 
– no children 
– multiple instances 
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 
YANG Example:! 
! 
container system {! 
container services {! 
container ssh {! 
presence "Enables SSH";! 
description "SSH service specific configuration";! 
// more leafs, containers and stuff here...! 
}! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
n A container has" 
n no value" 
n holds related children" 
n one instance" 
NETCONF XML Encoding:! 
! 
<system>! 
<services>! 
<ssh/>! 
</services>! 
</system>! 
May have specific meaning (presence) 
Or may simply contain other nodes
The "must" Statement 
container timeout {! 
leaf access-timeout {! 
description "Maximum time without server response";! 
units seconds;! 
mandatory true;! 
type uint32;! 
}! 
leaf retry-timer {! 
• Constrains nodes by Xpath expression 
description "Period to retry operation";! 
units seconds;! 
type uint32;! 
must "$this < ../access-timeout" {! 
error-app-tag retry-timer-invalid;! 
error-message "The retry timer must be "! 
+ "less than the access timeout";! 
}! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
The "list" Statement 
YANG Example:! 
! 
list user {! 
key name;! 
leaf name {! 
type string;! 
}! 
leaf uid {! 
type uint32;! 
}! 
leaf full-name {! 
type string;! 
}! 
leaf class {! 
type string;! 
default viewer;! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• A list is 
– uniquely identified by key(s) 
– holds related children 
– no value 
– multiple instances 
NETCONF XML Encoding:! 
! 
user! 
nameglocks/name! 
full-nameGoldie/full-name! 
classintruder/class! 
/user! 
user! 
namesnowey/name! 
full-nameSnow/full-name! 
classfree-loader/class! 
/user! 
user! 
namerzull/name! 
full-nameRepun/full-name! 
/user!
The augment Statement 
YANG Example:! 
! 
augment system/login/user {! 
leaf expire {! 
type yang:date-and-time;! 
}! 
}! 
NETCONF XML Encoding:! 
! 
user! 
namealicew/name! 
classdrop-out/class! 
other:expire2112-04-01T12:00:00/other:expire! 
/user! 
! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Extends data model 
– Current or imported modules 
• Inserts nodes 
– Into an existing hierarchy 
– Nodes appear in current module's 
namespace 
– Original (augmented) module is 
unchanged
The when Statement 
YANG Example:! 
! 
augment system/login/user {! 
when class = wheel;! 
leaf shell {! 
type string;! 
}! 
}! NETCONF XML Encoding:! 
! 
user! 
namealicew/name! 
classwheel/class! 
other:shell/bin/tcsh/other:shell! 
/user! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Makes sparse augmentation 
– Nodes are only added when 
condition is true 
– when is XPath expression
Built-in ^ypes 
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 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Derived Types 
YANG Example:! 
! 
typedef percent {! 
type uint16 {! 
range 0 .. 100;! 
}! 
description Percentage;! 
}! 
! 
leaf completed {! 
type percent;! 
}! 
NETCONF XML Encoding:! 
! 
completed20/completed! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Constraints 
– range 
– length 
– pattern 
• regex 
• A modules may use types imported 
from other modules
The union type 
YANG Example:! 
! 
leaf limit {! 
description Number to allow;! 
type union {! 
type uint16 {! 
range 0 .. 100;! 
}! 
type enumeration {! 
enum none {! 
NETCONF XML Encoding:! 
! 
limitnone/limit! 
description No limit;! 
}! 
}! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Allows a leaf to contain a superset of types 
NETCONF XML Encoding:! 
! 
limit20/limit!
The grouping Statement 
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! 
address192.0.2.1/address! 
port22/port! 
/destination! 
/peer! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• 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
The choice Statement 
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;! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Allow only one member of the choice to exist 
in a valid config datastore 
NETCONF XML Encoding:! 
! 
transfer-on-commit/!
The anyxml Statement 
YANG Example:! 
! 
anyxml software-version {! 
description Number to allow;! 
}! 
NETCONF XML Encoding:! 
! 
software-version! 
baseA10.2/base! 
routingB4.2/routing! 
snmpC87.12/snmp! 
/software-version ! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Allows arbitrary XML content to be carried 
in YANG-based models 
– Opaque 
– Limited operations 
• Bulk only
The rpc Statement 
rpc activate-software-image {! 
input {! 
leaf image-name {! 
type string;! 
}! 
}! 
output {! 
leaf status {! 
type string;! 
}! 
}! 
}! 
rpc xmlns=urn:mumble! 
activate-software-image! 
image-nameimage.tgz/image-name! 
/activate-software-image! 
/rpc! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Defines RPC 
– method names 
– input parameters 
– output parameters
The notification Statement 
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;! 
}! 
}! 
}! 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
• Defines notification 
– Name 
– Content
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 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Tools 
• pyang (http://code.google.com/p/pyang/)” 
– Validates YANG 
– Translates between YANG and YIN (XML) 
– Generates XSD 
• libsmi 
– Translates SMI/SMIv2 MIBs to YANG 
• Editors/IDEs: 
– Emacs yang mode: http://www.emacswiki.org/emacs/yang-mode.el 
– Eclipse plugin:https://github.com/xored/yang-ide/wiki 
• OpenDaylight Yang Tools: 
– https://wiki.opendaylight.org/view/YANG_Tools:Main 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Yang in OpenDaylight
What Should and SDN Controller Look Like? 
• A platform for deploying SDN applications 
• Provide (or be associated with) an SDN application development environment. 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
SDN Controller: Platform Requirements 
• Flexibility: 
– Accommodate a variety of diverse applications 
– Controller applications SHOULD use a common framework and programming model, 
and provide consistent APIs to their client 
• Scale the development process: 
– No infrastructure code hotspots 
– Independent development of controller applications  short integration times 
• Run-time Extensibility  Modularity: 
– Load new protocol and service/application plugins at run-time. 
– Adapt to data schemas (models) discovered in the network 
• Performance  Scale 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
SDN Controller: App Development Requirements 
• A domain-specific modeling language to describe internal and external system 
behavior 
• Modeling tools for the controller aligned with modeling tools for devices 
• Code generation from models: 
– Enforce standard API contracts 
– Generate boilerplate code performing repetitive and error-prone tasks 
– Produce functionally equivalent APIs for different language bindings 
– Model-to-model adaptations for services and devices 
– Consumption of aligned device models 
In the OpenDaylight Project, these requirements are satisfied with 
YANG (and YANG extensions) and via the YANG tool-chain, manifested 
in the MD-SAL 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
OpenDaylight: SDN Controller Architecture 
NETCONF 
Controller 
Applica1ons 
Base 
Network 
Func1ons 
Topology 
Service 
Adapta1on 
Layer 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
Inventory 
Manager 
Sta1s1cs 
Exporter 
Manager 
Forwarding 
Rules 
Manager 
Topology 
ToEpxpoolorgteyr 
Exporter 
Inventory 
InMveanntaogreyr 
Manager 
OpenFlow 
1.0/1.3 
BGP-­‐LS 
PCEP 
Netconf 
Client 
OVSDB 
REST 
APIs 
... 
Service 
Func1ons 
Configura1on 
... 
PCEP 
Subsystem 
LISP 
Network 
Devices 
Network 
Applica1ons 
Orchestra1on 
 
Services 
Controller 
PlaSorm 
Southbound 
Interfaces 
 
Protocol 
Plugins
OpenDaylight: Software Architecture 
Network 
Devices 
Applica1ons 
NETCONF 
Model-­‐Driven 
SAL 
(MD-­‐SAL) 
Controller 
Protocol 
Plugin 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
RESTCONF 
Service/App 
Plugin 
Service/App 
Plugin 
... 
Protocol 
... 
Plugin 
Config 
Subsystem 
Messaging 
Data 
Store 
Remote 
Controller 
Instance 
Remote 
Controller 
Instance 
Network 
Applica1ons 
Orchestra1on 
 
Services 
Plugins 
 
Applica1ons 
Controller 
PlaSorm 
Clustering
Model-Driven SAL: Building the Network View 
Controller 
PlaSorm 
OpenFlow 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
NETCONF 
MD-­‐SAL 
... 
BGP-­‐LS 
Topology 
Exporter 
OpenFlow 
Topology 
Exporter 
Flow-­‐Capable 
Node 
Inventory 
Manager 
Mo 
del 
Sta1s1cs 
Manager 
/Opera1onal 
/Config 
network-­‐topo 
p1 
p2 
BGP-­‐LS 
BGPv4 
BGPv6 
nodes 
links 
prefixes 
n1 
n2 
... 
nx 
l1 
l2 
... 
lx 
... 
px 
nodes 
BGP-­‐LS 
Protocol 
Plugin 
Groups 
Table/1 
Flow/2 
Table-­‐stats 
Model 
Model 
Model 
nc:1 
nc:2 
Flow-­‐stats 
Flow-­‐stats 
of:1 
of:2 
Of:n 
... 
Tables 
Meters 
Table/2 
Table/n 
Flow/1 
... 
Ports 
Flow/n
BA-­‐BI 
Connector 
Controller 
MD-SAL Details 
MD-­‐SAL 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
DOM 
Broker 
Data 
Store 
Mapping 
Service 
Codec 
Registry 
Schema 
Service 
Codec 
Generator 
Binding-­‐Aware 
Broker 
Binding-­‐Aware 
to 
Binding-­‐Independent 
Data 
Transla5on 
Binding-­‐Aware 
Plugin 
Binding-­‐Independent 
Plugin/Client 
(Netconf/Restconf) 
Forwarding 
Rules 
Manager, 
Stats 
Manager, 
BGP-­‐LS/PCEP 
External 
Clients
Building a Plugin/Application 
MModoedle 
l 
Yang 
Model 
Yang 
Tools 
JaJvaav 
aA 
PAIP 
DI 
Defienfiin1io1no 
n 
Generated 
API 
Defini1on 
Module 
Implementa1ons 
Create 
API 
Bundle 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public 
“Plugin” 
OSGI 
Bundle 
1 
Deploy 
4 
Generate 
APIs 
Create 
Plugin 
Bundle 
Deploy 
Maven 
Build 
Tools 
Module 
PluImginp 
lseomuercneta 
c1oodnes 
“API” 
OSGI 
Bundle 
Maven 
Build 
Tools 
2 
3 
4 
Controller
ODL Yang Resources 
• YangTools main page: 
– https://wiki.opendaylight.org/view/YANG_Tools:Main 
• Code Generation demo 
– https://wiki.opendaylight.org/view/Yang_Tools:Code_Generation_Demo 
• Java “Binding Specification”: 
– https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping 
• DLUX 
• Main page: https://wiki.opendaylight.org/view/OpenDaylight_dlux:Main 
• YangUI: https://wiki.opendaylight.org/view/OpenDaylight_dlux:yangUI-user 
• Controller: 
– Swagger UI Explorer: 
• http://localhost:8181/apidoc/explorer/index.html 
– DLUX (YangUI): 
• http://localhost:8181/dlux/index.html 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
ODL Netconf Resources 
• Config Subsystem: 
– How to configure the Netconf connector (client): 
• https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf 
– Netopeer installation 
• https://wiki.opendaylight.org/view/ 
OpenDaylight_Controller:Config:Examples:Netconf:Manual_netopeer_installation 
• Netconf test tool: 
– https://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Testtool 
© 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
Thank You

More Related Content

What's hot

Tutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting routerTutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting routerShu Sugimoto
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGTail-f Systems
 
Openconfig
OpenconfigOpenconfig
OpenconfigAPNIC
 
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_FinalGopi Krishnamurthy
 
Brocade Administration & troubleshooting
Brocade Administration & troubleshootingBrocade Administration & troubleshooting
Brocade Administration & troubleshootingprakashjjaya
 
BGP Techniques for Network Operators
BGP Techniques for Network OperatorsBGP Techniques for Network Operators
BGP Techniques for Network OperatorsAPNIC
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Cheng-Chun William Tu
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringScyllaDB
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsCisco Canada
 
nftables - the evolution of Linux Firewall
nftables - the evolution of Linux Firewallnftables - the evolution of Linux Firewall
nftables - the evolution of Linux FirewallMarian Marinov
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedBrendan Gregg
 
UVM Ral model usage
UVM Ral model usageUVM Ral model usage
UVM Ral model usageParth Pandya
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Juniper Networks Router Architecture
Juniper Networks Router ArchitectureJuniper Networks Router Architecture
Juniper Networks Router Architecturelawuah
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing PerformanceBrendan Gregg
 

What's hot (20)

Tutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting routerTutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting router
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANG
 
Openconfig
OpenconfigOpenconfig
Openconfig
 
ARM Architecture in Details
ARM Architecture in Details ARM Architecture in Details
ARM Architecture in Details
 
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Brocade Administration & troubleshooting
Brocade Administration & troubleshootingBrocade Administration & troubleshooting
Brocade Administration & troubleshooting
 
eBPF/XDP
eBPF/XDP eBPF/XDP
eBPF/XDP
 
BGP Techniques for Network Operators
BGP Techniques for Network OperatorsBGP Techniques for Network Operators
BGP Techniques for Network Operators
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data Analytics
 
nftables - the evolution of Linux Firewall
nftables - the evolution of Linux Firewallnftables - the evolution of Linux Firewall
nftables - the evolution of Linux Firewall
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting Started
 
UVM Ral model usage
UVM Ral model usageUVM Ral model usage
UVM Ral model usage
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
Juniper Networks Router Architecture
Juniper Networks Router ArchitectureJuniper Networks Router Architecture
Juniper Networks Router Architecture
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing Performance
 

Similar to Yang in OpenDaylight

Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...Brent Salisbury
 
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)Cisco DevNet
 
Sparkling Water 5 28-14
Sparkling Water 5 28-14Sparkling Water 5 28-14
Sparkling Water 5 28-14Sri Ambati
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?Edward Burns
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfAlfresco Software
 
Beginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccBeginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccKazuhiro Sera
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLAndrew Morgan
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble AppPebble Technology
 
Introduction to Cassandra and CQL for Java developers
Introduction to Cassandra and CQL for Java developersIntroduction to Cassandra and CQL for Java developers
Introduction to Cassandra and CQL for Java developersJulien Anguenot
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Let's Write Better Node Modules
Let's Write Better Node ModulesLet's Write Better Node Modules
Let's Write Better Node ModulesKevin Whinnery
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesAlfresco Software
 
Useful Python Libraries for Network Engineers - PyOhio 2018
Useful Python Libraries for Network Engineers - PyOhio 2018Useful Python Libraries for Network Engineers - PyOhio 2018
Useful Python Libraries for Network Engineers - PyOhio 2018Hank Preston
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scalascalaconfjp
 
Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Cisco DevNet
 
REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25Jon Petter Hjulstad
 
Scaling Massive Elasticsearch Clusters
Scaling Massive Elasticsearch ClustersScaling Massive Elasticsearch Clusters
Scaling Massive Elasticsearch ClustersSematext Group, Inc.
 
Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaKazuhiro Sera
 

Similar to Yang in OpenDaylight (20)

Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...
Augmenting Flow Operations and Feedback on the Model Driven MD_SAL Approach i...
 
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
 
Sparkling Water 5 28-14
Sparkling Water 5 28-14Sparkling Water 5 28-14
Sparkling Water 5 28-14
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
Beginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccBeginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_ccc
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App
 
Introduction to Cassandra and CQL for Java developers
Introduction to Cassandra and CQL for Java developersIntroduction to Cassandra and CQL for Java developers
Introduction to Cassandra and CQL for Java developers
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Let's Write Better Node Modules
Let's Write Better Node ModulesLet's Write Better Node Modules
Let's Write Better Node Modules
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
 
Useful Python Libraries for Network Engineers - PyOhio 2018
Useful Python Libraries for Network Engineers - PyOhio 2018Useful Python Libraries for Network Engineers - PyOhio 2018
Useful Python Libraries for Network Engineers - PyOhio 2018
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scala
 
Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller
 
REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25
 
Scaling Massive Elasticsearch Clusters
Scaling Massive Elasticsearch ClustersScaling Massive Elasticsearch Clusters
Scaling Massive Elasticsearch Clusters
 
Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in Scala
 

Recently uploaded

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Recently uploaded (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 

Yang in OpenDaylight

  • 1. Yang Modeling in OpenDaylight Jan Medved
  • 2. Agenda • Yang Overview • Netconf/Yang in OpenDaylight • Example/Demo • Pointers © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 4. 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 © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 5. YANG Concepts RPCs notifications leafs config data types Standard Models © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public Proprietary Models containers
  • 6. 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 © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 7. Semantics and syntax © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public YANG XML Schema Relax-NG Anything Else Legacy tools Out going XML Semantic World Syntactic World Validation
  • 8. 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 © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 9. Modules and submodules • Header statements – yang-version, namespace, prefix • Linkage statement – import and include • Meta information – organization, contact • Revision history – revision © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public Mod1 SubA SubX SubY SubZ Mod2 Include Import Include
  • 10. 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.";! }! …! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 11. The "leaf" Statement YANG Example:! ! leaf host-name {! type string;! mandatory true;! config true;! description "Hostname for this system";! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • A leaf has – one value – no children – one instance NETCONF XML Encoding:! ! <host-name>my.example.com</host-name>!
  • 12. The "leaf-list" Statement YANG Example:! ! leaf-list domain-search {! type string;! ordered-by user;! description "List of domain names to search";! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • A leaf-list has: – one value – no children – multiple instances NETCONF XML Encoding:! ! <domain-search>high.example.com</domain-search>! <domain-search>low.example.com</domain-search>! <domain-search>everywhere.example.com</domain-search>!
  • 13. The "container" Statement YANG Example:! ! container system {! container services {! container ssh {! presence "Enables SSH";! description "SSH service specific configuration";! // more leafs, containers and stuff here...! }! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public n A container has" n no value" n holds related children" n one instance" NETCONF XML Encoding:! ! <system>! <services>! <ssh/>! </services>! </system>! May have specific meaning (presence) Or may simply contain other nodes
  • 14. The "must" Statement container timeout {! leaf access-timeout {! description "Maximum time without server response";! units seconds;! mandatory true;! type uint32;! }! leaf retry-timer {! • Constrains nodes by Xpath expression description "Period to retry operation";! units seconds;! type uint32;! must "$this < ../access-timeout" {! error-app-tag retry-timer-invalid;! error-message "The retry timer must be "! + "less than the access timeout";! }! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 15. The "list" Statement YANG Example:! ! list user {! key name;! leaf name {! type string;! }! leaf uid {! type uint32;! }! leaf full-name {! type string;! }! leaf class {! type string;! default viewer;! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • A list is – uniquely identified by key(s) – holds related children – no value – multiple instances NETCONF XML Encoding:! ! user! nameglocks/name! full-nameGoldie/full-name! classintruder/class! /user! user! namesnowey/name! full-nameSnow/full-name! classfree-loader/class! /user! user! namerzull/name! full-nameRepun/full-name! /user!
  • 16. The augment Statement YANG Example:! ! augment system/login/user {! leaf expire {! type yang:date-and-time;! }! }! NETCONF XML Encoding:! ! user! namealicew/name! classdrop-out/class! other:expire2112-04-01T12:00:00/other:expire! /user! ! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Extends data model – Current or imported modules • Inserts nodes – Into an existing hierarchy – Nodes appear in current module's namespace – Original (augmented) module is unchanged
  • 17. The when Statement YANG Example:! ! augment system/login/user {! when class = wheel;! leaf shell {! type string;! }! }! NETCONF XML Encoding:! ! user! namealicew/name! classwheel/class! other:shell/bin/tcsh/other:shell! /user! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Makes sparse augmentation – Nodes are only added when condition is true – when is XPath expression
  • 18. Built-in ^ypes 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 © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 19. Derived Types YANG Example:! ! typedef percent {! type uint16 {! range 0 .. 100;! }! description Percentage;! }! ! leaf completed {! type percent;! }! NETCONF XML Encoding:! ! completed20/completed! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Constraints – range – length – pattern • regex • A modules may use types imported from other modules
  • 20. The union type YANG Example:! ! leaf limit {! description Number to allow;! type union {! type uint16 {! range 0 .. 100;! }! type enumeration {! enum none {! NETCONF XML Encoding:! ! limitnone/limit! description No limit;! }! }! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Allows a leaf to contain a superset of types NETCONF XML Encoding:! ! limit20/limit!
  • 21. The grouping Statement 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! address192.0.2.1/address! port22/port! /destination! /peer! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • 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
  • 22. The choice Statement 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;! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Allow only one member of the choice to exist in a valid config datastore NETCONF XML Encoding:! ! transfer-on-commit/!
  • 23. The anyxml Statement YANG Example:! ! anyxml software-version {! description Number to allow;! }! NETCONF XML Encoding:! ! software-version! baseA10.2/base! routingB4.2/routing! snmpC87.12/snmp! /software-version ! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Allows arbitrary XML content to be carried in YANG-based models – Opaque – Limited operations • Bulk only
  • 24. The rpc Statement rpc activate-software-image {! input {! leaf image-name {! type string;! }! }! output {! leaf status {! type string;! }! }! }! rpc xmlns=urn:mumble! activate-software-image! image-nameimage.tgz/image-name! /activate-software-image! /rpc! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Defines RPC – method names – input parameters – output parameters
  • 25. The notification Statement 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;! }! }! }! © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public • Defines notification – Name – Content
  • 26. 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 © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 27. Tools • pyang (http://code.google.com/p/pyang/)” – Validates YANG – Translates between YANG and YIN (XML) – Generates XSD • libsmi – Translates SMI/SMIv2 MIBs to YANG • Editors/IDEs: – Emacs yang mode: http://www.emacswiki.org/emacs/yang-mode.el – Eclipse plugin:https://github.com/xored/yang-ide/wiki • OpenDaylight Yang Tools: – https://wiki.opendaylight.org/view/YANG_Tools:Main © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 29. What Should and SDN Controller Look Like? • A platform for deploying SDN applications • Provide (or be associated with) an SDN application development environment. © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 30. SDN Controller: Platform Requirements • Flexibility: – Accommodate a variety of diverse applications – Controller applications SHOULD use a common framework and programming model, and provide consistent APIs to their client • Scale the development process: – No infrastructure code hotspots – Independent development of controller applications short integration times • Run-time Extensibility Modularity: – Load new protocol and service/application plugins at run-time. – Adapt to data schemas (models) discovered in the network • Performance Scale © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 31. SDN Controller: App Development Requirements • A domain-specific modeling language to describe internal and external system behavior • Modeling tools for the controller aligned with modeling tools for devices • Code generation from models: – Enforce standard API contracts – Generate boilerplate code performing repetitive and error-prone tasks – Produce functionally equivalent APIs for different language bindings – Model-to-model adaptations for services and devices – Consumption of aligned device models In the OpenDaylight Project, these requirements are satisfied with YANG (and YANG extensions) and via the YANG tool-chain, manifested in the MD-SAL © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 32. OpenDaylight: SDN Controller Architecture NETCONF Controller Applica1ons Base Network Func1ons Topology Service Adapta1on Layer © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public Inventory Manager Sta1s1cs Exporter Manager Forwarding Rules Manager Topology ToEpxpoolorgteyr Exporter Inventory InMveanntaogreyr Manager OpenFlow 1.0/1.3 BGP-­‐LS PCEP Netconf Client OVSDB REST APIs ... Service Func1ons Configura1on ... PCEP Subsystem LISP Network Devices Network Applica1ons Orchestra1on Services Controller PlaSorm Southbound Interfaces Protocol Plugins
  • 33. OpenDaylight: Software Architecture Network Devices Applica1ons NETCONF Model-­‐Driven SAL (MD-­‐SAL) Controller Protocol Plugin © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public RESTCONF Service/App Plugin Service/App Plugin ... Protocol ... Plugin Config Subsystem Messaging Data Store Remote Controller Instance Remote Controller Instance Network Applica1ons Orchestra1on Services Plugins Applica1ons Controller PlaSorm Clustering
  • 34. Model-Driven SAL: Building the Network View Controller PlaSorm OpenFlow © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public NETCONF MD-­‐SAL ... BGP-­‐LS Topology Exporter OpenFlow Topology Exporter Flow-­‐Capable Node Inventory Manager Mo del Sta1s1cs Manager /Opera1onal /Config network-­‐topo p1 p2 BGP-­‐LS BGPv4 BGPv6 nodes links prefixes n1 n2 ... nx l1 l2 ... lx ... px nodes BGP-­‐LS Protocol Plugin Groups Table/1 Flow/2 Table-­‐stats Model Model Model nc:1 nc:2 Flow-­‐stats Flow-­‐stats of:1 of:2 Of:n ... Tables Meters Table/2 Table/n Flow/1 ... Ports Flow/n
  • 35. BA-­‐BI Connector Controller MD-SAL Details MD-­‐SAL © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public DOM Broker Data Store Mapping Service Codec Registry Schema Service Codec Generator Binding-­‐Aware Broker Binding-­‐Aware to Binding-­‐Independent Data Transla5on Binding-­‐Aware Plugin Binding-­‐Independent Plugin/Client (Netconf/Restconf) Forwarding Rules Manager, Stats Manager, BGP-­‐LS/PCEP External Clients
  • 36. Building a Plugin/Application MModoedle l Yang Model Yang Tools JaJvaav aA PAIP DI Defienfiin1io1no n Generated API Defini1on Module Implementa1ons Create API Bundle © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public “Plugin” OSGI Bundle 1 Deploy 4 Generate APIs Create Plugin Bundle Deploy Maven Build Tools Module PluImginp lseomuercneta c1oodnes “API” OSGI Bundle Maven Build Tools 2 3 4 Controller
  • 37. ODL Yang Resources • YangTools main page: – https://wiki.opendaylight.org/view/YANG_Tools:Main • Code Generation demo – https://wiki.opendaylight.org/view/Yang_Tools:Code_Generation_Demo • Java “Binding Specification”: – https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping • DLUX • Main page: https://wiki.opendaylight.org/view/OpenDaylight_dlux:Main • YangUI: https://wiki.opendaylight.org/view/OpenDaylight_dlux:yangUI-user • Controller: – Swagger UI Explorer: • http://localhost:8181/apidoc/explorer/index.html – DLUX (YangUI): • http://localhost:8181/dlux/index.html © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public
  • 38. ODL Netconf Resources • Config Subsystem: – How to configure the Netconf connector (client): • https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf – Netopeer installation • https://wiki.opendaylight.org/view/ OpenDaylight_Controller:Config:Examples:Netconf:Manual_netopeer_installation • Netconf test tool: – https://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Testtool © 2014 Cisco and/or its affiliates. Presentation_ID All rights reserved. Cisco Public