22
YANG User Interface (YANGUI) in OpenDaylight Chris Metz, [email protected] Daniel Malachovsky, [email protected] Juraj Sebin, [email protected] ODL Summit, July 29, 2015

YANG User Interface (YANGUI) in OpenDaylight · YANG User Interface (YANGUI) in OpenDaylight Chris Metz, [email protected] Daniel Malachovsky, [email protected] Juraj Sebin, [email protected]

  • Upload
    others

  • View
    24

  • Download
    0

Embed Size (px)

Citation preview

YANG User Interface (YANGUI) in OpenDaylight Chris Metz, [email protected] Daniel Malachovsky, [email protected] Juraj Sebin, [email protected]

ODL Summit, July 29, 2015

•  Setup  &  Problem  Statement  

•  YANGUI  Architecture  and  Func;ons  

•  Observa;ons  

•  YANGUI  Live  Demo  

•  Summary  &  References  

Contents

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      

3  

MDSE  =  Model-­‐Driven  So0ware  Engineering  

Setup (2) – YANG has become a defacto Industry Standard

Source:  hTp://www.claise.be/2015/06/ieZ-­‐yang-­‐modules-­‐sta;s;ques/    

•  Yang  Plug-­‐in  for  Sublime  Text  Editor  

•  hTps://github.com/apackeer/sublime-­‐yang-­‐syntax  

Setup (3) – Some YANG Tools for App Developers

•  Yang  Plug-­‐in  for  Eclipse  IDE  

•  hTps://github.com/xored/yang-­‐ide/wiki/Setup-­‐and-­‐build    

•  YANG  Model  documenta;on  and  valida;on  tools  wriTen  in  Python  

•  hTps://github.com/mbj4668/pyang  

More  at:  hTp://www.yang-­‐central.org/twiki/bin/view/Main/YangTools  

SetUp (4) – App Developers in ODL

New  Service  or  Network  Func;on  

YANG  Editor  

YANG  Model(s)  

YANG  Model(s)   ODL  

REST  API  

YANG    Valida;on  

App(s)  

YANGTools  

network  

YANG  Model  Skills   HTML5/CSS/Javascript/Python/Java/etc  

•  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              

Problem Statement

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#

•  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  

What is YANGUI?

YANGTools  •  reads  and  processes  YANG  modules.  

•  Set  of  libraries  MD-­‐SAL  uses  to  process  YANG  modules  and  YANG  modeled  data  

•  translates  YANG  modules  to  YIN  forma  

YANGUI ODL Components

YANG  Model(s)  

RESTCONF  

                   MD-­‐SAL   YANGTools  

MD-­‐SAL  •  core  of  controller  •  provides  request  rou;ng  and  infrastructure  

to  support  service  adapta;on  

RESTCONF  •  MD-­‐SAL  's  RESTful  interfaces  •  Generates  REST  URL  from  YANG  modules  •  Validates  data  against  schema  •  Translates  data  to  MD-­‐SAL  internal  format  

(DOM)  

YANGUI App Architecture

ODL  

YIN-­‐JSON  Conversion  

JSON-­‐UI  Linkage  

YANGUTILS    Main  Module  

JSON-­‐API  Path  Handler  

YANG  RESTAngular  

YANGUI  Main  Module  

YANGUI  Views  

YANGUI  Controllers  

How does the YANGUI App Retrieve the Models from ODL? (1)

ODL  

①  hTp://localhost:8181/restconf/modules    

②         {          "modules":  {                  "module":  [                                                    .............                              {                                  "name":  "network-­‐topology",                                  "revision":  "2013-­‐10-­‐21",                                  "namespace":  "urn:TBD:params:xml:ns:yang:network-­‐topology"                          },                                                    ..........                                            ]          }  }  

1 2

How does the YANGUI App Retrieve the Models from ODL? (2)

ODL  

③  hTp://localhost:8181/restconf/modules/module/network-­‐topology/2013-­‐10-­‐21/schema    

④         

3 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

YAN

GU

I Flo

w D

iagr

am (2

) –

Com

plet

e P

roce

ssin

g

•  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 Developer Observations

YANGUI App Demo

①  Download  the  current  Karaf  distribu;on*  

②  Unzip  it  

③  cd  bin  

④  ./karaf  

⑤  Feature:install  odl-­‐dlux-­‐all  

⑥  hTp://localhost:8181/index.html;  admin/admin  

How can I get the YANGUI App?

*  See  pointer  in  references  

•  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  

YANGUI Summary

•  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/  

References

Thank You

#ODSummit