YANG User Interface (YANGUI) in OpenDaylight Chris Metz, chmetz@cisco.com Daniel Malachovsky, dmalacho@cisco.com Juraj Sebin, jsebin@cisco.com ODL Summit, July 29, 2015
Contents Setup & Problem Statement YANGUI Architecture and Func;ons Observa;ons YANGUI Live Demo Summary & References
Setup (1) Models and YANG YANG - data model language for configura;on, state data, opera;ons and no;fica;ons for network elements and services Value in model- driven sokware engineering (i.e. code derived from models) Orchestra;on/Controller vehicles becoming model- driven Evolving SDN/NFV apps employing service and device models Vendor implementa;ons MDSE = Model- Driven So0ware Engineering 3
Setup (2) YANG has become a defacto Industry Standard Source: htp://www.claise.be/2015/06/iez- yang- modules- sta;s;ques/
Setup (3) Some YANG Tools for App Developers Yang Plug- in for Sublime Text Editor htps://github.com/apackeer/sublime- yang- syntax YANG Model documenta;on and valida;on tools writen in Python htps://github.com/mbj4668/pyang Yang Plug- in for Eclipse IDE htps://github.com/xored/yang- ide/wiki/setup- and- build More at: htp://www.yang- central.org/twiki/bin/view/main/yangtools
SetUp (4) App Developers in ODL YANG Model Skills HTML5/CSS/Javascript/Python/Java/etc New Service or Network Func;on App(s) REST API YANG Editor YANG Model(s) YANG Model(s) YANGTools ODL YANG Valida;on network
Problem Statement Exis;ng yang tools are mostly confined to model edi;ng and valida;on. ODL app developers to a large extent need to work with both YANG models and REST APIs (amongst other programming skills) What is needed is an MDSE approach for app development in the ODL environment. Requirements: Simplify model valida;on and REST API exposure Efficient REST API organiza;on and access Dynamically generated WEB- based User Interface Need to demys;fy the connec;on between YANG models and ODL Applica;ons
Solution: YANGUI Application for OpenDaylight AAA"#AuthN#Filter# OpenDaylight#APIs#(REST)# OpenFlow#Enabled# Devices# # DLUX# VTN#Coordinator# OpenStack# Neutron# SDNI#Wrapper# DDoS#ProtecJon# Open#vSwitches# AddiJonal#Virtual#&# Physical#Devices# Topology# Processing# DIDM# MD"SAL#/#Yangtools# GBP# Service# SFC# DOCSIS# AbstracJon# VTN# Manager# Plugin20C# LISP# Service# BGP# PCEP# OVSDB# OVSDB# NETCONF# PCMM/ COPS# SNBI# LISP# BGP# PCEP# SNMP# Plugin20C# OpenFlow# # Neutron# Service# SDNI# Aggregator# Persistence# L2# Switch# TCP" MD5# SXP# USC# Discovery# IoTDM# IoT# LACP# MAPLE# ALTO# CAPWAP# ReservaJon# TSDR# VPN#Service# NIC# USC#Manager# OPFLEX# Topology# Inventory# FRM# Network#ApplicaJons# OrchestraJons,#Services# &#Development# NB#APIs# ApplicaJons# Plugin#Services# Controller#plaVorm# SB#interfaces#&# protocols#plugins#
What is YANGUI? ODL DLUX- based Applica;on designed to simplify and facilitate applica;on development and tes;ng Generates and renders a simple UI based on YANG models loaded into ODL Features Developed and supported in DLUX UI framework Karaf install Model valida;on Lists/executes RESTCONF APIs Supports API request history, collec;ons, paramateriza;on and JSON display
YANGUI ODL Components RESTCONF MD- SAL 's RESTful interfaces Generates REST URL from YANG modules Validates data against schema Translates data to MD- SAL internal format (DOM) MD- SAL core of controller RESTCONF provides request rou;ng and infrastructure to support service adapta;on MD- SAL YANGTools YANGTools reads and processes YANG modules. Set of libraries MD- SAL uses to process YANG modules and YANG modeled data YANG Model(s) translates YANG modules to YIN forma
YANGUI App Architecture YANGUI Views YANGUI Main Module YANGUI Controllers JSON- UI Linkage YIN- JSON Conversion YANGUTILS Main Module YANG RESTAngular JSON- API Path Handler ODL
How does the YANGUI App Retrieve the Models from ODL? (1) 1 htp://localhost:8181/restconf/modules 2 { "modules": { "module": [... 1 2 { "name": "network- topology", "revision": "2013-10- 21", "namespace": "urn:tbd:params:xml:ns:yang:network- topology" }, ODL } } ]...
How does the YANGUI App Retrieve the Models from ODL? (2) 3 htp://localhost:8181/restconf/modules/module/network- topology/2013-10- 21/schema ODL 3 4 4 <module xmlns="urn:iez:params:xml:ns:yang:yin:1" xmlns:nt="urn:tbd:params:xml:ns:yang:network- topology" xmlns:inet="urn:iez:params:xml:ns:yang:iez- inet- types" name="network- topology"> <yang- version value="1"></yang- version> <namespace uri="urn:tbd:params:xml:ns:yang:network- topology"></namespace>... <descrip;on> <text>this module defines a model for the topology of a network. Key design decisions are as follows: A topology consists of a set of nodes and links. Links are point- to- point and unidirec;onal. Bidirec;onal connec;ons need to be represented through two separate links. Mul;point connec;ons, broadcast domains etc can be represented through a hierarchy of nodes, then connec;ng nodes at upper layers of the hierarchy.</text> </descrip;on> <revision date="2013-10- 21"></revision> <typedef name="link- id"></typedef> <typedef name="link- ref"></typedef> <typedef name="node- id"></typedef>... </module>
YANGUI Flow Diagrams (1) Prep/ Conversion
YANGUI Flow Diagram (2) Complete Processing
YANGUI App Developer Observations For the UI developers: saves ;me because I don t need to know the YANG model in detail saves ;me because I don t need to learn or figure out the REST APIs For the YANG Model Authors Valida;on Instant REST API exposure and preliminary WEB UI For ODL app developer newbies Saves ;me because YANG and RESTCONF APIs are splashed up inside a web browser UI
YANGUI App Demo
How can I get the YANGUI App? 1 Download the current Karaf distribu;on* 2 Unzip it 3 cd bin 4./karaf 5 Feature:install odl- dlux- all 6 htp://localhost:8181/index.html; admin/admin * See pointer in references
YANGUI Summary YANG trending upwards Apps employing YANG models are trending upwards More YANG- aware tools needed for ODL App Developers YANGUI App built for and contributed to the ODL community Key benefit: saves development ;me (and builds knowledge) by automa;cally wrapping & linking YANG models and associated REST APIs in a WEB Browser UI
References htp://www.claise.be/2014/11/yang- really- takes- off- in- the- industry/ htp://datatracker.iez.org/doc/drak- bogdanovic- netmod- yang- model- classifica;on/ htp://www.slideshare.net/gunjanpatel4/yang- in- odl htps://wiki.opendaylight.org/view/opendaylight_controller:md- SAL:FAQ htps://wiki.opendaylight.org/view/opendaylight_controller:md- SAL:Restconf_API_Explorer
References htp://www.mg- sok.com/mgyangdesigner.html htp://www.seguesok.com/extract- yang- module- from- rfc htps://github.com/xored/yang- ide/wiki/setup- and- build htps://trac.tools.iez.org/wg/netconf/trac/wiki htp://www.yang- central.org/twiki/bin/view/main/yangtools htps://nexus.opendaylight.org/content/repositories/ opendaylight.snapshot/org/opendaylight/integra;on/distribu;on- karaf/ 0.x.0- SNAPSHOT/
Thank You #ODSummit