SlideShare a Scribd company logo
Tail-f Systems Technology Brief

Instant YANG
Hakan Millroth, CTO, Tail-f Systems
	
                       	
  
	
  
Introduction
	
  
This	
  is	
  a	
  short	
  primer	
  on	
  YANG	
  -­‐	
  the	
  NETCONF	
  data	
  modeling	
  language.	
  To	
  learn	
  more	
  about	
  YANG,	
  take	
  
a	
  look	
  at	
  the	
  tutorials	
  and	
  examples	
  at	
  YANG	
  Central.	
  The	
  definitive	
  resource	
  is	
  RFC	
  6020,	
  which	
  is	
  an	
  
excellent	
  and	
  quite	
  readable	
  reference	
  manual.	
  If	
  you	
  wonder	
  why	
  NETCONF	
  needs	
  a	
  data	
  modeling	
  
language,	
  check	
  out	
  the	
  "Why	
  YANG?"	
  document	
  at	
  YANG	
  Central.	
  

The Basics
A	
  data	
  model	
  describes	
  how	
  data	
  is	
  represented	
  and	
  accessed.	
  In	
  YANG,	
  data	
  models	
  are	
  represented	
  by	
  
definition	
  hierarchies	
  called	
  schema	
  trees.	
  Instances	
  of	
  schema	
  trees	
  are	
  called	
  data	
  trees	
  and	
  are	
  
encoded	
  in	
  XML.	
  	
  
	
  
YANG	
  provides	
  two	
  constructs	
  to	
  specify	
  leaf	
  nodes:	
  leaf	
  and	
  leaf-list	
  statements.	
  They	
  differ	
  in	
  
that	
  a	
  leaf	
  node	
  has	
  at	
  most	
  one	
  instance,	
  while	
  a	
  leaf-list	
  node	
  may	
  have	
  multiple	
  instances.	
  
	
  
This	
  YANG	
  snippet	
  specifies	
  a	
  flag	
  called	
  enabled	
  that	
  defaults	
  to	
  true:	
  
	
  
       leaf enabled {
                      type boolean;
                      default true;
       }
             	
  
Example	
  XML	
  instance:	
  
	
  
       <enabled>false</enabled>
             	
  
The	
  following	
  YANG	
  example	
  specifies	
  a	
  list	
  of	
  cipher	
  names:	
  
	
  
       leaf-list cipher {
                      type string;
       }
             	
  
Example	
  XML	
  instance:	
  
	
  
       <cipher>blowfish-cbc</cipher>
       <cipher>3des-cbc</cipher>
             	
  
The	
  number	
  of	
  valid	
  entries	
  in	
  a	
  leaf-­‐list	
  can	
  be	
  constrained	
  by	
  optional	
  min-elements	
  and	
  max-
elements	
  statements.	
  




                                                                 Tail-f Systems © 2010
                                                                    www.tail-f.com
                                                                       Page 1 of 8
Tail-f Systems Technology Brief

There	
  are	
  also	
  two	
  constructs	
  in	
  YANG	
  for	
  specifying	
  non-­‐leaf	
  nodes:	
  container	
  and	
  list	
  statements.	
  
They	
  differ	
  mainly	
  in	
  that	
  a	
  container	
  node	
  has	
  at	
  most	
  one	
  instance,	
  while	
  a	
  list	
  node	
  may	
  have	
  
multiple	
  instances	
  (list	
  entries	
  are	
  identified	
  by	
  keys	
  that	
  distinguish	
  them	
  from	
  each	
  other).	
  
The	
  following	
  YANG	
  example	
  uses	
  a	
  container	
  statement	
  to	
  define	
  a	
  timeout	
  mechanism	
  for	
  a	
  request	
  to	
  
a	
  server.	
  The	
  timeout	
  has	
  two	
  components:	
  access-timeout,	
  which	
  represents	
  the	
  maximum	
  time	
  
without	
  server	
  response,	
  and	
  retries,	
  which	
  represents	
  the	
  number	
  of	
  request	
  attempts	
  before	
  giving	
  
up.	
  
	
  
        container timeout {
                leaf access-timeout {
                         type uint32;
                }
                leaf retries {
                         type uint8;
                }
        }
          	
  
Example	
  XML	
  instance:	
  
	
  
        <timeout>
             <access-timeout>60</access-timeout>
             <retries>2</retries>
        </timeout>
	
  
The	
  next	
  example	
  illustrates	
  YANG	
  lists.	
  The	
  entries	
  in	
  a	
  list	
  are	
  identified	
  by	
  keys	
  that	
  distinguish	
  them	
  
from	
  each	
  other.	
  Here	
  computer	
  users	
  are	
  identified	
  with	
  their	
  login	
  name:	
  
	
  
        list user {
                key "login-name";
                leaf login-name {
                         type string;
                }
                leaf full-name {
                         type string;
                }
        }
          	
  
Example	
  XML	
  instances:	
  
	
  
        <user>
                <login-name>hakanm</login-name>
                <full-name>Hakan Millroth</fullname>
        </user>
        <user>
                <login-name>mbj</login-name>
                <full-name>Martin Bjorklund</fullname>
        </user>




                                                                   Tail-f Systems © 2010
                                                                      www.tail-f.com
                                                                         Page 2 of 8
Tail-f Systems Technology Brief

The	
  examples	
  so	
  far	
  have	
  only	
  used	
  built-­‐in	
  YANG	
  types.	
  The	
  set	
  of	
  built-­‐in	
  types	
  are	
  similar	
  to	
  those	
  of	
  
many	
  programming	
  languages,	
  but	
  with	
  some	
  differences	
  due	
  to	
  special	
  requirements	
  from	
  the	
  
management	
  domain.	
  YANG	
  also	
  provides	
  a	
  mechanism	
  through	
  which	
  additional	
  types	
  may	
  be	
  defined	
  
(these	
  are	
  called	
  derived	
  types).	
  For	
  example,	
  the	
  following	
  defines	
  a	
  type	
  percent	
  that	
  is	
  a	
  restriction	
  
of	
  the	
  built-­‐in	
  type	
  uint8:	
  
	
  
	
  
        typedef percent {
                type uint8 {
                            range "0 .. 100";
                }
        }
	
  
The	
  next	
  example	
  defines	
  the	
  type	
  ip-address	
  as	
  the	
  union	
  of	
  two	
  other	
  derived	
  types	
  (union	
  is	
  a	
  
built-­‐in	
  type):	
  
	
  
        typedef ip-address {
                type union {
                      type ipv4-address;
                      type ipv6-address;
                }
        }
	
  
More Data Structuring Features
A	
  choice	
  node	
  in	
  the	
  schema	
  tree	
  defines	
  a	
  set	
  of	
  alternatives,	
  only	
  one	
  of	
  which	
  may	
  exist	
  at	
  any	
  one	
  
time.	
  A	
  choice	
  consists	
  of	
  a	
  number	
  of	
  branches,	
  defined	
  with	
  case	
  substatements.	
  The	
  nodes	
  from	
  one	
  
of	
  the	
  choice’s	
  branches	
  (limited	
  to	
  one)	
  exist	
  in	
  the	
  data	
  tree	
  (the	
  choice	
  node	
  itself	
  does	
  not	
  exist	
  in	
  the	
  
data	
  tree).	
  Example:	
  
	
  
        choice route-distinguisher {
                                  case ip-address-based {
                                       leaf ip-address {
                                           type ipv4-address;
                                      }
                                      leaf ip-address-number {
                                           type uint16;
                                      }
                                  }
                                  case asn32-based {
                                       leaf asn32 {
                                           type uint32;
                                       }
                                       leaf two-byte-number {
                                           type uint16;
                                       }
                                  }
        }
             	
  	
  	
  	
  	
  
Example	
  XML	
  instantiation:	
  
	
  
        <asn32>12356789</asn32>
        <two-byte-number>2468</two-byte-number>
                                                                       Tail-f Systems © 2010
                                                                          www.tail-f.com
                                                                             Page 3 of 8
Tail-f Systems Technology Brief

          	
  
A	
  grouping	
  defines	
  a	
  reusable	
  collection	
  of	
  nodes.	
  Here	
  we	
  define	
  a	
  grouping	
  endpoint	
  comprising	
  two	
  
leaf	
  nodes:	
  	
  
	
  
	
  
       grouping endpoint {
               leaf address {
                       type ip-address;
               }
               leaf port {
                       type port-number;
               }
       }
	
  
The	
  uses	
  statement	
  is	
  used	
  to	
  reference	
  a	
  grouping	
  definition,	
  copying	
  the	
  nodes	
  defined	
  by	
  the	
  
grouping	
  into	
  the	
  current	
  schema	
  tree.	
  Continuing	
  the	
  example,	
  we	
  can	
  reuse	
  the	
  endpoint	
  grouping	
  in	
  
defining	
  the	
  source	
  and	
  destination	
  of	
  a	
  connection:	
  
	
  
       container connection {
               container source {
                       uses endpoint {
                               refine port {
                                       default 161;
                               }
                       }
               }
               container destination {
                       uses endpoint {
                               refine port {
                                       default 161;
                               }
                       }
               }
       }
          	
  
Here	
  we	
  have	
  used	
  the	
  (optional)	
  refine	
  statement.	
  	
  Example	
  XML	
  instance:	
  
	
  
       <connection>
             <source>
               <address>192.168.0.3</address>
               <port>8080</port>
             </source>
             <destination>
               <address>192.168.0.4</address>
               <port>8080</port>
             </destination>
       </connection>




                                                             Tail-f Systems © 2010
                                                                www.tail-f.com
                                                                   Page 4 of 8
Tail-f Systems Technology Brief

The	
  presence	
  statement	
  gives	
  semantics	
  to	
  the	
  existence	
  of	
  a	
  container	
  in	
  the	
  data	
  tree	
  (normally	
  a	
  
container	
  is	
  just	
  a	
  data	
  structuring	
  mechanism).	
  It	
  takes	
  as	
  an	
  argument	
  a	
  documentation	
  string	
  that	
  
describes	
  what	
  the	
  model	
  designer	
  intends	
  the	
  node’s	
  presence	
  to	
  signify:	
  
	
  
       container logging {
           presence "Enables logging";
           leaf directory {
                    type string;
                    default "/var/log/myapplication";
           }
       }
	
  
An	
  alternative	
  to	
  using	
  presence	
  is	
  to	
  define	
  a	
  leaf	
  (called,	
  for	
  example,	
  enabled	
  or	
  disabled	
  or	
  on	
  or	
  off)	
  
conveying	
  the	
  presence	
  of	
  the	
  container.	
  

References
The	
  leafref	
  built-­‐in	
  type	
  is	
  used	
  to	
  reference	
  a	
  particular	
  leaf	
  instance	
  in	
  the	
  data	
  tree,	
  as	
  specified	
  by	
  
a	
  path.	
  This	
  path	
  is	
  specified	
  using	
  the	
  XML	
  Path	
  Language	
  (XPath),	
  in	
  a	
  notation	
  that	
  is	
  similar	
  to	
  the	
  
syntax	
  for	
  directory	
  paths	
  in	
  Unix/Linux.	
  	
  Consider	
  this	
  example:	
  	
  
	
  
       leaf interface-name {
                type leafref {
                        path "/interface/name";
                }
       }

Here	
  interface-name	
  is	
  referencing	
  another	
  leaf	
  using	
  an	
  absolute	
  path.	
  The	
  next	
  example	
  instead	
  
lets	
  interface-name	
  reference	
  a	
  leaf	
  using	
  a	
  relative	
  path:	
  
	
  
       leaf interface-name {
                type leafref {
                        path "../interface/name";
                }
       }
	
  
There	
  is	
  an	
  analogous	
  referencing	
  construct	
  for	
  list	
  keys	
  called	
  keyref.	
  
	
  
Data Constraints
YANG	
  supports	
  several	
  types	
  of	
  constraints	
  that	
  express	
  semantic	
  properties	
  of	
  the	
  data	
  being	
  modeled.	
  
	
  
Data	
  nodes	
  can	
  represent	
  either	
  configuration	
  data	
  or	
  state	
  data.	
  The	
  config	
  statement	
  specifies	
  whether	
  
the	
  definition	
  it	
  occurs	
  in	
  represents	
  configuration	
  data	
  (config=true)	
  or	
  status	
  data	
  
(config=false).	
  If	
  config	
  is	
  not	
  specified,	
  the	
  default	
  is	
  the	
  same	
  as	
  the	
  parent	
  schema	
  node’s	
  
config	
  value.	
  If	
  the	
  top	
  node	
  does	
  not	
  specify	
  a	
  config	
  statement,	
  the	
  default	
  is	
  config=true.	
  




                                                                      Tail-f Systems © 2010
                                                                         www.tail-f.com
                                                                            Page 5 of 8
Tail-f Systems Technology Brief

YANG	
  provides	
  a	
  mandatory	
  statement	
  to	
  express	
  that	
  a	
  node	
  must	
  exist	
  in	
  the	
  data	
  tree	
  (it	
  is	
  also	
  
possible	
  to	
  have	
  optional	
  nodes).	
  The	
  following	
  example	
  shows	
  the	
  use	
  of	
  config	
  and	
  mandatory:	
  
	
  
     leaf host-name {
                type string;
                mandatory true;
                config true;
     }
	
  
The	
  unique	
  statement	
  ensures	
  unique	
  values	
  within	
  list	
  siblings.	
  	
  Here	
  is	
  an	
  example	
  of	
  its	
  use	
  (note	
  
that	
  the	
  constraint	
  specifies	
  that	
  the	
  combination	
  of	
  two	
  leaf	
  values,	
  ip	
  and	
  port,	
  must	
  be	
  unique):	
  
     list server {
                      key "name";
                      unique "ip port";
                      leaf name {
                           type string;
                      }
                      leaf ip {
                           type ip-address;
                      }
                      leaf port {
                           type port-number;
                      }
     }
          	
  
The	
  must	
  statement	
  expresses	
  constraints	
  that	
  must	
  be	
  satisfied	
  by	
  each	
  data	
  node	
  in	
  the	
  structure	
  
where	
  it	
  is	
  defined.	
  The	
  must	
  constraints	
  are	
  expressed	
  using	
  XPath	
  expressions.	
  The	
  following	
  example	
  
models	
  an	
  IP	
  address	
  that	
  does	
  not	
  belong	
  to	
  the	
  192.*	
  or	
  127.*	
  networks:	
  
	
  
     leaf mirrorIp {
                type ip-address;
                default 0.0.0.0;
                must "false() = starts-with(current(), '192')" {
                         error-message "The mirrorIp is in the forbidden "+
                                                   "192.* network";
                }
                must "false() = starts-with(current(), '127')" {
                         error-message "The mirrorIp is in the occupied "+
                                                   "127.* network";
                }
     }
	
  
Modules

YANG	
  organizes	
  data	
  models	
  into	
  modules	
  and	
  submodules.	
  A	
  module	
  can	
  import	
  data	
  from	
  other	
  
modules,	
  and	
  include	
  data	
  from	
  submodules.	
  	
  Besides	
  schema	
  definitions,	
  a	
  module	
  contains	
  header	
  
statements	
  (yang-­‐version,	
  namespace,	
  prefix),	
  linkage	
  statements	
  (import	
  and	
  include),	
  meta	
  
information	
  (organization,	
  contact),	
  and	
  a	
  revision	
  history.	
  	
  
	
  
All	
  nodes	
  defined	
  in	
  a	
  module	
  belong	
  to	
  a	
  specified	
  XML	
  namespace,	
  which	
  is	
  specified	
  by	
  the	
  URI	
  of	
  the	
  
namespace.	
  It	
  is	
  good	
  practice	
  to	
  have	
  a	
  one-­‐to-­‐one	
  correspondence	
  between	
  modules	
  and	
  namespaces.	
  
	
  

                                                                    Tail-f Systems © 2010
                                                                       www.tail-f.com
                                                                          Page 6 of 8
Tail-f Systems Technology Brief

If	
  an	
  import	
  or	
  include	
  statement	
  includes	
  a	
  revision-date	
  substatement,	
  definitions	
  are	
  taken	
  
from	
  the	
  specified	
  revision	
  of	
  the	
  imported	
  or	
  included	
  module.	
  By	
  importing	
  specified	
  module	
  
revisions	
  one	
  can	
  allow	
  published	
  modules	
  to	
  evolve	
  independently	
  over	
  time.	
  YANG	
  provides	
  very	
  
specific	
  rules	
  for	
  how	
  published	
  modules	
  can	
  evolve	
  over	
  time	
  and	
  still	
  be	
  backwards	
  compatible	
  (to	
  
oversimplify,	
  it	
  is	
  possible	
  to	
  add	
  new	
  definitions,	
  but	
  not	
  to	
  delete	
  obsolete	
  definitions	
  or	
  change	
  
already	
  published	
  definitions).	
  
	
  
Here	
  is	
  an	
  example	
  of	
  a	
  module	
  definition:	
  
	
  
        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	
  module	
  hierarchy	
  can	
  be	
  augmented,	
  allowing	
  one	
  module	
  to	
  add	
  data	
  nodes	
  to	
  the	
  hierarchy	
  
defined	
  in	
  another	
  module	
  (without	
  changing	
  the	
  augmented	
  module).	
  	
  Augmentation	
  can	
  be	
  
conditional,	
  using	
  when	
  statements,	
  with	
  new	
  nodes	
  appearing	
  only	
  if	
  certain	
  conditions	
  are	
  met.	
  	
  	
  
In	
  the	
  following	
  example	
  we	
  (unconditionally)	
  augment	
  a	
  generic	
  router	
  module	
  to	
  a	
  data	
  model	
  for	
  a	
  
RIP	
  routing	
  stack:	
  
	
  
       module rip_router {
       import router {
                 prefix r;
       }
       augment "/r:system/r:router" {
                 container rip {
                        leaf version { . . . }
                        list network-ip { . . . }
                        list network-ifname { . . . }
                        list neighbor { . . . }
                 . . .
                 }
       }
	
  
Note	
  that	
  the	
  import	
  statement	
  assigns	
  the	
  prefix	
  r	
  to	
  the	
  imported	
  module	
  router.	
  When	
  we	
  then	
  
reference	
  identifiers	
  from	
  that	
  module	
  we	
  must	
  use	
  the	
  prefix,	
  as	
  in	
  /r:system/r:router.	
  
	
  

                                                                Tail-f Systems © 2010
                                                                   www.tail-f.com
                                                                      Page 7 of 8
Tail-f Systems Technology Brief

This	
  example	
  also	
  illustrates	
  a	
  common	
  YANG	
  design	
  pattern	
  with	
  a	
  top-­‐level	
  container	
  (rip	
  in	
  this	
  
case).	
  
	
  
RPCs and Notifications
YANG	
  allows	
  the	
  definition	
  of	
  NETCONF	
  RPCs,	
  extending	
  the	
  base	
  set	
  of	
  operations	
  provided	
  by	
  the	
  
NETCONF	
  standard.	
  Input	
  and	
  output	
  parameters	
  are	
  modeled	
  using	
  YANG	
  data	
  definition	
  statements.	
  	
  
	
  
In	
  the	
  following	
  example	
  we	
  model	
  a	
  new	
  RPC	
  for	
  activating	
  software	
  images:	
  
       rpc activate-software-image {
               input {
                   leaf image-name {
                           type string;
                   }
               }
               output {
                   leaf status {
                           type string;
                   }
               }
       }
	
  
YANG	
  data	
  definition	
  statements	
  can	
  also	
  be	
  used	
  to	
  model	
  the	
  names	
  and	
  content	
  of	
  NETCONF	
  
notifications.	
  Here	
  is	
  an	
  example	
  where	
  we	
  reuse	
  the	
  definition	
  of	
  a	
  connection	
  from	
  above:	
  
	
  
       notification link-failure {
                 description "A link failure has been detected";
                 container link {
                     uses connection
                 }
       }

This	
  example	
  also	
  illustrates	
  the	
  use	
  of	
  description	
  statement.	
  All	
  YANG	
  data	
  definition	
  statements	
  
(leaf,	
  list,	
  leaf-list,	
  etc.)	
  can	
  include	
  description	
  statements.	
  
	
  
Acknowledgements
	
  
This	
  paper	
  was	
  inspired	
  by	
  Hetland’s	
  Instant	
  Python	
  text.	
  Many	
  of	
  the	
  examples	
  and	
  some	
  verbatim	
  text	
  
are	
  from	
  the	
  YANG	
  specification	
  (RFC	
  6020).	
  Some	
  materials	
  are	
  from	
  various	
  IETF	
  tutorials	
  by	
  Martin	
  
Björklund	
  and	
  Jürgen	
  Schönwälder.	
  Some	
  examples	
  are	
  from	
  Tail-­‐f	
  Systems’	
  product	
  documentation.	
  
	
  
	
  




                                                                Tail-f Systems © 2010
                                                                   www.tail-f.com
                                                                      Page 8 of 8

More Related Content

What's hot

10g plsql slide
10g plsql slide10g plsql slide
10g plsql slide
Tanu_Manu
 
Plsql les04
Plsql les04Plsql les04
Plsql les04
sasa_eldoby
 
Pl sql chapter 1
Pl sql chapter 1Pl sql chapter 1
Pl sql chapter 1
PrabhatKumar591
 
4. plsql
4. plsql4. plsql
4. plsql
Amrit Kaur
 
Sedna XML Database: Query Parser & Optimizing Rewriter
Sedna XML Database: Query Parser & Optimizing RewriterSedna XML Database: Query Parser & Optimizing Rewriter
Sedna XML Database: Query Parser & Optimizing Rewriter
Ivan Shcheklein
 
Sedna XML Database System: Internal Representation
Sedna XML Database System: Internal RepresentationSedna XML Database System: Internal Representation
Sedna XML Database System: Internal Representation
Ivan Shcheklein
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
plsql les03
 plsql les03 plsql les03
plsql les03
sasa_eldoby
 
plsql les02
 plsql les02 plsql les02
plsql les02
sasa_eldoby
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
Doncho Minkov
 
Introduction to PL/SQL
Introduction to PL/SQLIntroduction to PL/SQL
Introduction to PL/SQL
Kailash N
 
plsql les01
 plsql les01 plsql les01
plsql les01
sasa_eldoby
 
Packages in PL/SQL
Packages in PL/SQLPackages in PL/SQL
Packages in PL/SQL
Pooja Dixit
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
Arunkumar Gurav
 
Oracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questionsOracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questions
Arunkumar Gurav
 
X FILES
X FILESX FILES
PLSQL Tutorial
PLSQL TutorialPLSQL Tutorial
PLSQL Tutorial
Quang Minh Đoàn
 
XML and XPath details
XML and XPath detailsXML and XPath details
XML and XPath details
DSK Chakravarthy
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
jaxLondonConference
 
Intelligent Impress
Intelligent ImpressIntelligent Impress
Intelligent Impress
Alexandro Colorado
 

What's hot (20)

10g plsql slide
10g plsql slide10g plsql slide
10g plsql slide
 
Plsql les04
Plsql les04Plsql les04
Plsql les04
 
Pl sql chapter 1
Pl sql chapter 1Pl sql chapter 1
Pl sql chapter 1
 
4. plsql
4. plsql4. plsql
4. plsql
 
Sedna XML Database: Query Parser & Optimizing Rewriter
Sedna XML Database: Query Parser & Optimizing RewriterSedna XML Database: Query Parser & Optimizing Rewriter
Sedna XML Database: Query Parser & Optimizing Rewriter
 
Sedna XML Database System: Internal Representation
Sedna XML Database System: Internal RepresentationSedna XML Database System: Internal Representation
Sedna XML Database System: Internal Representation
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
plsql les03
 plsql les03 plsql les03
plsql les03
 
plsql les02
 plsql les02 plsql les02
plsql les02
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 
Introduction to PL/SQL
Introduction to PL/SQLIntroduction to PL/SQL
Introduction to PL/SQL
 
plsql les01
 plsql les01 plsql les01
plsql les01
 
Packages in PL/SQL
Packages in PL/SQLPackages in PL/SQL
Packages in PL/SQL
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
 
Oracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questionsOracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questions
 
X FILES
X FILESX FILES
X FILES
 
PLSQL Tutorial
PLSQL TutorialPLSQL Tutorial
PLSQL Tutorial
 
XML and XPath details
XML and XPath detailsXML and XPath details
XML and XPath details
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
Intelligent Impress
Intelligent ImpressIntelligent Impress
Intelligent Impress
 

Similar to Instant YANG - Tail-f Systems Technology Primer

Networking chapter VI
Networking chapter VINetworking chapter VI
Networking chapter VI
Jayakumar Balasubramanian
 
Mxhr
MxhrMxhr
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfak
Asfak Mahamud
 
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptxObject Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
 
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptxObject Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
Roberto Suggi Liverani
 
C programming(part 3)
C programming(part 3)C programming(part 3)
C programming(part 3)
SURBHI SAROHA
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
Pradeep Kumar TS
 
C Programming - Refresher - Part IV
C Programming - Refresher - Part IVC Programming - Refresher - Part IV
C Programming - Refresher - Part IV
Emertxe Information Technologies Pvt Ltd
 
8023.ppt
8023.ppt8023.ppt
8023.ppt
PoojaTripathi92
 
Np unit2
Np unit2Np unit2
Np unit2
vamsitricks
 
Networking
NetworkingNetworking
Networking
Jafar Nesargi
 
Multithreaded sockets c++11
Multithreaded sockets c++11Multithreaded sockets c++11
Multithreaded sockets c++11
Russell Childs
 
Unix system programming
Unix system programmingUnix system programming
Unix system programming
Syed Mustafa
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
Findik Dervis
 
Tshark pen testing, very good insight of the pent test
Tshark pen testing, very good insight of the pent testTshark pen testing, very good insight of the pent test
Tshark pen testing, very good insight of the pent test
claudiu59
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
Yoram Orzach
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddler
holiman
 
Odp
OdpOdp
002 hbase clientapi
002 hbase clientapi002 hbase clientapi
002 hbase clientapi
Scott Miao
 

Similar to Instant YANG - Tail-f Systems Technology Primer (20)

Networking chapter VI
Networking chapter VINetworking chapter VI
Networking chapter VI
 
Mxhr
MxhrMxhr
Mxhr
 
Xml processing-by-asfak
Xml processing-by-asfakXml processing-by-asfak
Xml processing-by-asfak
 
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptxObject Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
 
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptxObject Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
 
C programming(part 3)
C programming(part 3)C programming(part 3)
C programming(part 3)
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
C Programming - Refresher - Part IV
C Programming - Refresher - Part IVC Programming - Refresher - Part IV
C Programming - Refresher - Part IV
 
8023.ppt
8023.ppt8023.ppt
8023.ppt
 
Np unit2
Np unit2Np unit2
Np unit2
 
Networking
NetworkingNetworking
Networking
 
Multithreaded sockets c++11
Multithreaded sockets c++11Multithreaded sockets c++11
Multithreaded sockets c++11
 
Unix system programming
Unix system programmingUnix system programming
Unix system programming
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
 
Tshark pen testing, very good insight of the pent test
Tshark pen testing, very good insight of the pent testTshark pen testing, very good insight of the pent test
Tshark pen testing, very good insight of the pent test
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddler
 
Odp
OdpOdp
Odp
 
002 hbase clientapi
002 hbase clientapi002 hbase clientapi
002 hbase clientapi
 

More from Tail-f Systems

Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound Interface
Tail-f Systems
 
Module 11: Operational Data Providers
Module 11: Operational Data ProvidersModule 11: Operational Data Providers
Module 11: Operational Data Providers
Tail-f Systems
 
Module 9: CDB Technical Intro
 Module 9: CDB Technical Intro Module 9: CDB Technical Intro
Module 9: CDB Technical Intro
Tail-f Systems
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data Types
Tail-f Systems
 
Module 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting Started
Tail-f Systems
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
Tail-f Systems
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANG
Tail-f Systems
 
Module 1: ConfD Technical Introduction
Module 1: ConfD Technical IntroductionModule 1: ConfD Technical Introduction
Module 1: ConfD Technical Introduction
Tail-f Systems
 
Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2
Tail-f Systems
 
NETCONF YANG tutorial
NETCONF YANG tutorialNETCONF YANG tutorial
NETCONF YANG tutorial
Tail-f Systems
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining
Tail-f Systems
 
Tail-f - Why NETCONF
Tail-f - Why NETCONFTail-f - Why NETCONF
Tail-f - Why NETCONF
Tail-f Systems
 
Tail f - Why ConfD
Tail f - Why ConfDTail f - Why ConfD
Tail f - Why ConfD
Tail-f Systems
 
Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View
Tail-f Systems
 
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANGTail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Systems
 
Tail f Systems Whitepaper - Top Ten Management Issues for ATCA
Tail f Systems Whitepaper - Top Ten Management Issues for ATCATail f Systems Whitepaper - Top Ten Management Issues for ATCA
Tail f Systems Whitepaper - Top Ten Management Issues for ATCA
Tail-f Systems
 
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and MapsTail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail-f Systems
 
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management SimplifiedTail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems
 

More from Tail-f Systems (18)

Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound Interface
 
Module 11: Operational Data Providers
Module 11: Operational Data ProvidersModule 11: Operational Data Providers
Module 11: Operational Data Providers
 
Module 9: CDB Technical Intro
 Module 9: CDB Technical Intro Module 9: CDB Technical Intro
Module 9: CDB Technical Intro
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data Types
 
Module 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting Started
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANG
 
Module 1: ConfD Technical Introduction
Module 1: ConfD Technical IntroductionModule 1: ConfD Technical Introduction
Module 1: ConfD Technical Introduction
 
Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2
 
NETCONF YANG tutorial
NETCONF YANG tutorialNETCONF YANG tutorial
NETCONF YANG tutorial
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining
 
Tail-f - Why NETCONF
Tail-f - Why NETCONFTail-f - Why NETCONF
Tail-f - Why NETCONF
 
Tail f - Why ConfD
Tail f - Why ConfDTail f - Why ConfD
Tail f - Why ConfD
 
Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View
 
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANGTail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
 
Tail f Systems Whitepaper - Top Ten Management Issues for ATCA
Tail f Systems Whitepaper - Top Ten Management Issues for ATCATail f Systems Whitepaper - Top Ten Management Issues for ATCA
Tail f Systems Whitepaper - Top Ten Management Issues for ATCA
 
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and MapsTail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
Tail f Systems Whitepaper - EMS and NMS Platforms - Beyond Alarms and Maps
 
Tail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management SimplifiedTail-f Systems Whitepaper - Configuration Management Simplified
Tail-f Systems Whitepaper - Configuration Management Simplified
 

Recently uploaded

"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 

Recently uploaded (20)

"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 

Instant YANG - Tail-f Systems Technology Primer

  • 1. Tail-f Systems Technology Brief Instant YANG Hakan Millroth, CTO, Tail-f Systems       Introduction   This  is  a  short  primer  on  YANG  -­‐  the  NETCONF  data  modeling  language.  To  learn  more  about  YANG,  take   a  look  at  the  tutorials  and  examples  at  YANG  Central.  The  definitive  resource  is  RFC  6020,  which  is  an   excellent  and  quite  readable  reference  manual.  If  you  wonder  why  NETCONF  needs  a  data  modeling   language,  check  out  the  "Why  YANG?"  document  at  YANG  Central.   The Basics A  data  model  describes  how  data  is  represented  and  accessed.  In  YANG,  data  models  are  represented  by   definition  hierarchies  called  schema  trees.  Instances  of  schema  trees  are  called  data  trees  and  are   encoded  in  XML.       YANG  provides  two  constructs  to  specify  leaf  nodes:  leaf  and  leaf-list  statements.  They  differ  in   that  a  leaf  node  has  at  most  one  instance,  while  a  leaf-list  node  may  have  multiple  instances.     This  YANG  snippet  specifies  a  flag  called  enabled  that  defaults  to  true:     leaf enabled { type boolean; default true; }   Example  XML  instance:     <enabled>false</enabled>   The  following  YANG  example  specifies  a  list  of  cipher  names:     leaf-list cipher { type string; }   Example  XML  instance:     <cipher>blowfish-cbc</cipher> <cipher>3des-cbc</cipher>   The  number  of  valid  entries  in  a  leaf-­‐list  can  be  constrained  by  optional  min-elements  and  max- elements  statements.   Tail-f Systems © 2010 www.tail-f.com Page 1 of 8
  • 2. Tail-f Systems Technology Brief There  are  also  two  constructs  in  YANG  for  specifying  non-­‐leaf  nodes:  container  and  list  statements.   They  differ  mainly  in  that  a  container  node  has  at  most  one  instance,  while  a  list  node  may  have   multiple  instances  (list  entries  are  identified  by  keys  that  distinguish  them  from  each  other).   The  following  YANG  example  uses  a  container  statement  to  define  a  timeout  mechanism  for  a  request  to   a  server.  The  timeout  has  two  components:  access-timeout,  which  represents  the  maximum  time   without  server  response,  and  retries,  which  represents  the  number  of  request  attempts  before  giving   up.     container timeout { leaf access-timeout { type uint32; } leaf retries { type uint8; } }   Example  XML  instance:     <timeout> <access-timeout>60</access-timeout> <retries>2</retries> </timeout>   The  next  example  illustrates  YANG  lists.  The  entries  in  a  list  are  identified  by  keys  that  distinguish  them   from  each  other.  Here  computer  users  are  identified  with  their  login  name:     list user { key "login-name"; leaf login-name { type string; } leaf full-name { type string; } }   Example  XML  instances:     <user> <login-name>hakanm</login-name> <full-name>Hakan Millroth</fullname> </user> <user> <login-name>mbj</login-name> <full-name>Martin Bjorklund</fullname> </user> Tail-f Systems © 2010 www.tail-f.com Page 2 of 8
  • 3. Tail-f Systems Technology Brief The  examples  so  far  have  only  used  built-­‐in  YANG  types.  The  set  of  built-­‐in  types  are  similar  to  those  of   many  programming  languages,  but  with  some  differences  due  to  special  requirements  from  the   management  domain.  YANG  also  provides  a  mechanism  through  which  additional  types  may  be  defined   (these  are  called  derived  types).  For  example,  the  following  defines  a  type  percent  that  is  a  restriction   of  the  built-­‐in  type  uint8:       typedef percent { type uint8 { range "0 .. 100"; } }   The  next  example  defines  the  type  ip-address  as  the  union  of  two  other  derived  types  (union  is  a   built-­‐in  type):     typedef ip-address { type union { type ipv4-address; type ipv6-address; } }   More Data Structuring Features A  choice  node  in  the  schema  tree  defines  a  set  of  alternatives,  only  one  of  which  may  exist  at  any  one   time.  A  choice  consists  of  a  number  of  branches,  defined  with  case  substatements.  The  nodes  from  one   of  the  choice’s  branches  (limited  to  one)  exist  in  the  data  tree  (the  choice  node  itself  does  not  exist  in  the   data  tree).  Example:     choice route-distinguisher { case ip-address-based { leaf ip-address { type ipv4-address; } leaf ip-address-number { type uint16; } } case asn32-based { leaf asn32 { type uint32; } leaf two-byte-number { type uint16; } } }           Example  XML  instantiation:     <asn32>12356789</asn32> <two-byte-number>2468</two-byte-number> Tail-f Systems © 2010 www.tail-f.com Page 3 of 8
  • 4. Tail-f Systems Technology Brief   A  grouping  defines  a  reusable  collection  of  nodes.  Here  we  define  a  grouping  endpoint  comprising  two   leaf  nodes:         grouping endpoint { leaf address { type ip-address; } leaf port { type port-number; } }   The  uses  statement  is  used  to  reference  a  grouping  definition,  copying  the  nodes  defined  by  the   grouping  into  the  current  schema  tree.  Continuing  the  example,  we  can  reuse  the  endpoint  grouping  in   defining  the  source  and  destination  of  a  connection:     container connection { container source { uses endpoint { refine port { default 161; } } } container destination { uses endpoint { refine port { default 161; } } } }   Here  we  have  used  the  (optional)  refine  statement.    Example  XML  instance:     <connection> <source> <address>192.168.0.3</address> <port>8080</port> </source> <destination> <address>192.168.0.4</address> <port>8080</port> </destination> </connection> Tail-f Systems © 2010 www.tail-f.com Page 4 of 8
  • 5. Tail-f Systems Technology Brief The  presence  statement  gives  semantics  to  the  existence  of  a  container  in  the  data  tree  (normally  a   container  is  just  a  data  structuring  mechanism).  It  takes  as  an  argument  a  documentation  string  that   describes  what  the  model  designer  intends  the  node’s  presence  to  signify:     container logging { presence "Enables logging"; leaf directory { type string; default "/var/log/myapplication"; } }   An  alternative  to  using  presence  is  to  define  a  leaf  (called,  for  example,  enabled  or  disabled  or  on  or  off)   conveying  the  presence  of  the  container.   References The  leafref  built-­‐in  type  is  used  to  reference  a  particular  leaf  instance  in  the  data  tree,  as  specified  by   a  path.  This  path  is  specified  using  the  XML  Path  Language  (XPath),  in  a  notation  that  is  similar  to  the   syntax  for  directory  paths  in  Unix/Linux.    Consider  this  example:       leaf interface-name { type leafref { path "/interface/name"; } } Here  interface-name  is  referencing  another  leaf  using  an  absolute  path.  The  next  example  instead   lets  interface-name  reference  a  leaf  using  a  relative  path:     leaf interface-name { type leafref { path "../interface/name"; } }   There  is  an  analogous  referencing  construct  for  list  keys  called  keyref.     Data Constraints YANG  supports  several  types  of  constraints  that  express  semantic  properties  of  the  data  being  modeled.     Data  nodes  can  represent  either  configuration  data  or  state  data.  The  config  statement  specifies  whether   the  definition  it  occurs  in  represents  configuration  data  (config=true)  or  status  data   (config=false).  If  config  is  not  specified,  the  default  is  the  same  as  the  parent  schema  node’s   config  value.  If  the  top  node  does  not  specify  a  config  statement,  the  default  is  config=true.   Tail-f Systems © 2010 www.tail-f.com Page 5 of 8
  • 6. Tail-f Systems Technology Brief YANG  provides  a  mandatory  statement  to  express  that  a  node  must  exist  in  the  data  tree  (it  is  also   possible  to  have  optional  nodes).  The  following  example  shows  the  use  of  config  and  mandatory:     leaf host-name { type string; mandatory true; config true; }   The  unique  statement  ensures  unique  values  within  list  siblings.    Here  is  an  example  of  its  use  (note   that  the  constraint  specifies  that  the  combination  of  two  leaf  values,  ip  and  port,  must  be  unique):   list server { key "name"; unique "ip port"; leaf name { type string; } leaf ip { type ip-address; } leaf port { type port-number; } }   The  must  statement  expresses  constraints  that  must  be  satisfied  by  each  data  node  in  the  structure   where  it  is  defined.  The  must  constraints  are  expressed  using  XPath  expressions.  The  following  example   models  an  IP  address  that  does  not  belong  to  the  192.*  or  127.*  networks:     leaf mirrorIp { type ip-address; default 0.0.0.0; must "false() = starts-with(current(), '192')" { error-message "The mirrorIp is in the forbidden "+ "192.* network"; } must "false() = starts-with(current(), '127')" { error-message "The mirrorIp is in the occupied "+ "127.* network"; } }   Modules YANG  organizes  data  models  into  modules  and  submodules.  A  module  can  import  data  from  other   modules,  and  include  data  from  submodules.    Besides  schema  definitions,  a  module  contains  header   statements  (yang-­‐version,  namespace,  prefix),  linkage  statements  (import  and  include),  meta   information  (organization,  contact),  and  a  revision  history.       All  nodes  defined  in  a  module  belong  to  a  specified  XML  namespace,  which  is  specified  by  the  URI  of  the   namespace.  It  is  good  practice  to  have  a  one-­‐to-­‐one  correspondence  between  modules  and  namespaces.     Tail-f Systems © 2010 www.tail-f.com Page 6 of 8
  • 7. Tail-f Systems Technology Brief If  an  import  or  include  statement  includes  a  revision-date  substatement,  definitions  are  taken   from  the  specified  revision  of  the  imported  or  included  module.  By  importing  specified  module   revisions  one  can  allow  published  modules  to  evolve  independently  over  time.  YANG  provides  very   specific  rules  for  how  published  modules  can  evolve  over  time  and  still  be  backwards  compatible  (to   oversimplify,  it  is  possible  to  add  new  definitions,  but  not  to  delete  obsolete  definitions  or  change   already  published  definitions).     Here  is  an  example  of  a  module  definition:     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  module  hierarchy  can  be  augmented,  allowing  one  module  to  add  data  nodes  to  the  hierarchy   defined  in  another  module  (without  changing  the  augmented  module).    Augmentation  can  be   conditional,  using  when  statements,  with  new  nodes  appearing  only  if  certain  conditions  are  met.       In  the  following  example  we  (unconditionally)  augment  a  generic  router  module  to  a  data  model  for  a   RIP  routing  stack:     module rip_router { import router { prefix r; } augment "/r:system/r:router" { container rip { leaf version { . . . } list network-ip { . . . } list network-ifname { . . . } list neighbor { . . . } . . . } }   Note  that  the  import  statement  assigns  the  prefix  r  to  the  imported  module  router.  When  we  then   reference  identifiers  from  that  module  we  must  use  the  prefix,  as  in  /r:system/r:router.     Tail-f Systems © 2010 www.tail-f.com Page 7 of 8
  • 8. Tail-f Systems Technology Brief This  example  also  illustrates  a  common  YANG  design  pattern  with  a  top-­‐level  container  (rip  in  this   case).     RPCs and Notifications YANG  allows  the  definition  of  NETCONF  RPCs,  extending  the  base  set  of  operations  provided  by  the   NETCONF  standard.  Input  and  output  parameters  are  modeled  using  YANG  data  definition  statements.       In  the  following  example  we  model  a  new  RPC  for  activating  software  images:   rpc activate-software-image { input { leaf image-name { type string; } } output { leaf status { type string; } } }   YANG  data  definition  statements  can  also  be  used  to  model  the  names  and  content  of  NETCONF   notifications.  Here  is  an  example  where  we  reuse  the  definition  of  a  connection  from  above:     notification link-failure { description "A link failure has been detected"; container link { uses connection } } This  example  also  illustrates  the  use  of  description  statement.  All  YANG  data  definition  statements   (leaf,  list,  leaf-list,  etc.)  can  include  description  statements.     Acknowledgements   This  paper  was  inspired  by  Hetland’s  Instant  Python  text.  Many  of  the  examples  and  some  verbatim  text   are  from  the  YANG  specification  (RFC  6020).  Some  materials  are  from  various  IETF  tutorials  by  Martin   Björklund  and  Jürgen  Schönwälder.  Some  examples  are  from  Tail-­‐f  Systems’  product  documentation.       Tail-f Systems © 2010 www.tail-f.com Page 8 of 8