►
From YouTube: IETF94-TUTORIAL-PYANG-20151101-1300
Description
PYANG session at IETF94
2015/11/01 1300
B
Hi
good
afternoon
my
name
is
Raja
vodka
and
in
this
part
of
the
tutorial,
I
would
like
to
talk
more
about
practical
things,
about
the
steps
that
you
probably
want
to
do
with
your
yang
modules
and
especially
if
you
are
preparing
these
modules
for
publication
in
idea
of
standards.
So
if
you
do
all
the
steps
and
the
compilation
will
be
okay,
then
I
know
I
will
be
happy,
I
guess
otherwise
you
will.
B
C
B
And
that
web
version
has
some
some
some
more
information,
more
details
and
also
covers
other
steps.
So
maybe
you
really
want
to
go
to
that
page
and
try
some
things
yourself
and
if
you
want
to
really
try
something
you
need
some
software
to
be
installed.
So
primarily
it's
it's
being
that's
all
it's
about,
and
then
there
are
other
open-source
tools
that
you
probably
want
to
make
things
happen.
B
Primarily
it
is
with
XML
to
library
with
its
tools.
This
package
is
mostly
part
of
base
operating
systems
or
it
can
be
easily
installed,
and
then
there
are
some
optional
parts.
I
recommend
to
use
Java
based
tools,
Jing
and
Trang,
written
by
James
Clark,
and
you
can
download
them
from
that
URL
and,
of
course
you
need
a
good
editor
too,
especially
if
you
want
to
edit
xml,
then
I
would,
although
I
must
admit
I
am
biased,
being
an
MX
user
for
the
last
25
years.
Maybe,
but
really
believe
me.
B
I
think
that
at
least
in
the
open
source
area,
and
especially
for
editing,
XML
Emacs
is
by
far
the
best
tool
you
can
get.
There
are
other
commercial
editors
like
oxygen.
That
might
be
helpful
as
well,
but
I
have
not
used
them,
so
I
can
only
talk
about
in
X,
essentially
and
because
I
am
a
Mac
user.
I
use
comics
on
OS
X,
which
works
fine.
C
A
Tools,
so
that's
a
good
point:
I've
been
trying,
we've
been
on
a
couple
of
tools
to
yangsun
trouble,
so
we
really
want
to
collect.
All
of
these.
You've
got
the
question
all
the
time.
So
there
are
tools
to
produce
young
mothers,
but
also
libraries.
So
if
you
know
of
of
any
that
are
not
on
the
yang
central,
let
us
know
it's
a
right
for
everybody
right.
B
Now
a
few
works
about
her
peeing
peeing
is
an
open
source
to
working
in
in
peyten.
Most
of
it
was
written
by
Martin
miracle,
with
contributions
from
myself
and
a
few
other
people,
and
for
some
for
some
steps-
and
it's
some
accessibility.
Stylesheets,
for
example,
are
part
of
being
p.m.
distribution.
So,
but
you
also
want
to
use
this
XSLT
processor
and
some
some
tools
are
also
written
in
shell
scripts,
so
Pyong
is
written
in
in
Titan.
B
B
Theoretically,
you
should
be
able
to
use
paying
with
both
fighting
and
Python
3
peeing
is
extensible
via
plugins.
A
number
of
plugins
is
already
available
and
you
can
write
your
own
plugins
if
you
want
and
I
think
as
a
part
of
the
hackathon.
Maybe
some
new
plugins
have
been
written,
I
don't
know,
and
so
this
is
quite
useful
and
I
will
show
you.
A
selection
of
the
plugins
that
are
available
now
and
that
are
part
of
PM
distribution
being
is
under
active
development.
B
C
Think
that
again,
I
want
that
one
branch
already
and
I
was
so.
The
follow-up
question
is
to
know
when
that
branch
might
more
like
when
would
it
become
comprehensive
enough?
Because,
as
a
draft
author
I'm
having
issues
validating
my
documents
and
Benoit,
is
you
know
a
place
runs?
You
know
evaluation
tests,
all
mine
are
failing,
but
only
because
that
are
using
yang
window
on
yes.
B
I
know
that's
a
shortcoming,
but
we
have
to
discuss
this
with
Martin
and,
of
course,
it's
it's
open
source,
so
we
just
have
other
things
to
do,
and
but
of
course,
we're
going
to
do
that
part
as
well
as
soon
as
possible,
but
depends
on
many
things
actually,
anyway.
The
last
table
version
is
one
point:
six.
B
B
Currently,
so
probably
there
will
soon
be
a
1.6
1.1
version,
but
anyway,
this
new
version
is
installable
via
the
standard,
titan
packaging
tool
tip.
And
if
you,
if
you
have
an
older
version,
I
would
recommend
you
to
install
that
this
new
version,
because
it
has
other
nice
features
like
bash
completion
and
so
on.
B
B
So
here
is
a
selection
of
interesting
plugins
that
are
part
of
Penn
distribution,
most
of
them
just
produce
a
specific
output
and
these
plugins.
These
output
plugins
are
selected
via
the
dash
F
command
line
switch,
and
each
of
the
plugins
usually
has
a
number
of
its
specific
command
line,
parameters
and
options.
So.
D
B
D
B
Think
that
you
will
be
I
go
to
see
it
in
in
the
following,
slides,
probably
what
you
really
wants
to
do,
but
anyway,
so
I
don't
know
whether
Carl
covered
the
fact
that
we
also
have
an
xml-based
syntax
for
for
yang
modules.
No,
you
didn't
so
I'm
going
to
tell
you
that
what
all
those
curly
braces
and
so
on
they
are.
They
so
called
the
yang
syntax,
but
you
can
also
use
an
alternative
and
equivalent
XML
based
syntax,
which
is
in,
and
so
two
plugins
to
output
begins
NPN
just
convert
between
each
other.
B
Actually,
this
is
now
not
current
information
and
the
access
debugging
has
been
removed
from
version
1.6
because
it
was,
it
has
been
incomplete
and
deprecated
for
a
long
time,
and
people
just
got
confused,
although
they
asked
users
that
want
to
use
access
D
for
some
strange
reason,
but
it's
not
available
in
NPN
anymore
tree
plug-in
is
very
useful.
I
will
talk
about
that
later.
Then.
There
are
some
plugins
for
producing
UML
stuff
and
there
is
another,
even
more
special
plug-in
that
can
used.
B
B
B
B
B
B
But,
as
I
said,
Emacs
has
very
advanced
and
XML
mode
that
enables
editing
XML
in
in
a
very
efficient
and
user-friendly
way.
So
in
fact,
all
my
yang
mode
use
I
have
written
so
far,
almost
I
write
them
as
XML
in
the
in
syntax
and
then
I
convert
them
to
the
yang
syntax
for
publishing
internet
draft
of
Costco's
that's
more
readable,
but
the
source
format
for
me
is
XML.
Some
people
think
that
this
is
a
bit
weird,
so
I'm
not
going
to
recommend
it
to
you
in
any
way.
B
But
if
you
are
interested
in
that
there
is
some
H
wiki,
page
I
wrote
that
gives
you
some
background
and
some
reasons
why
I'm
doing
this
strength
thing
and
of
course
we
need
a
real-life
example,
as
Skaro
hat
mpls,
so
I
chose-
and
this
is
also
in
the
web
version
of
this
tutorial.
I
chose
Turing
machine
that
we
all
know
and
love,
and
these
young
modules
are
also
in
PNG
distribution
in
that
directory
and
for
those
who
are
really
into
fun.
B
B
So
this
is
an
URL
where
you
can
find
that
Turing
machine
simulator
written
in
C
and
using
some
net
conf
libraries
that
you
also
need
to
install
anyway.
So
here
are
the
very
essential
steps
that
probably
everybody
has
to
do
before
publishing
yang
module
in
an
internal
draft.
So,
first
of
all,
you
have
to
check
the
yang
module
for,
for
correctly,
this
is
done
easily
by
using
PN
without
any
other
command-line
options.
B
B
Okay,
so
in
any
case,
if
you
use
that
IETF
option,
stricter,
strict
rules
will
be
used
for
checking
your
module.
So
in
particular
you
have
to
have
your
your
yang
statements
in
a
very
particular
order,
that's
defined
in
RFC
6020
and
in
the
internet
graph
that
defines
the
Eng
1.1
and
other
things
that
are
not
needed
in
general,
but
it
is
required
because
of
the
rules
from
RFC
687
that
essentially,
this
check
with
that
does
dies.
B
Itf
will
not
show
any
errors,
and
so
please
do
that
before
you
publish
your
draft
and
then,
of
course,
if
you
want
to
see
what
the
beta
model
looks
like
and
also
this
is
an
information
that
should
be
included
in
in
an
internet
draft,
because
that's
very
useful
as
an
overview
of
a
beta
model
content.
It's
very
useful
to
you
that
3
output-
again
that
gives
you
some
tree
based
representation
of
the
data
model.
I
will
show
you
how
it
looks
like
on
the
next
slide
and
Carlo
already
had
some
examples.
B
B
They
tell
that
are
marked
with
our
oh
and
it
falls
essentially
the
Turing
machine
definition.
So
we
have
state
and
the
state
of
the
Turing
machine
head
position
and
then
representation
of
the
tape.
Then
we
also
have
a
configuration
that
basically
describes
the
transition
function
for
the
Turing
machine,
and
then
we
also
have
an
RPC
for
a
Turing
machine
which
enables
you
to
initialize
and
start
the
computation
and
the
parameter
there
is
the
input
of
it
means
the
initial
content
of
the
tape,
and
there
is
also
one
notification.
B
The
Turing
machine
is
supposed
to
send
this
notification
as
soon
as
the
computation
holds
and
if
it
also
sends
as
a
parameter
the
state
in
which
the
Turing
machine
has
ended
up
right.
So
the
main
point
of
doing
this
is
to
have
all
errors
that
a
young
beta
model
can
cover.
That
means
read.
Only
state
data
read
write,
configuration
data
are
pcs
and
notifications.
A
B
That's
what
I
said
yeah
it's
really
it's
really
useful
and
if
you
that
please
also
include
some
explanation
of
the
tree
symbols
because
that's
useful,
you
can
find
some
template
for
such
a
section
in
the
existing
graph,
so
just
copy
and
paste
this
into
your
draft
and
tau
about
validation.
So
it's
also
useful.
If
you
include
some
some
example
of
a
configuration
in
your
draft
and
again
it's
very
useful.
If
you
do
include
this,
this
information
to
have
an
information,
that's
correct
and
that's
valid.
B
Unfortunately,
it
happens
every
once
in
a
while
that,
if
I
try
to
validate
those
examples,
they
just
do
not
are
invalid.
So
this
can
just
confuse
people.
So
again,
it's
important
if
you
include
such
examples
to
perform
validation
in
pairing,
this
validation
of
instance,
data
can
be
done
using
or
in
xml,
but
I
will
tell
you
how
to
do
it
Jason
as
well
later,
so
it's
done
using
so-called
distal,
schemas
and
I.
B
W3C
schema
language
and
add
some
more
possibilities
for
validating
semantics
rules,
and
so
on,
so
we
decided
to
use
these
schemas
for
validating
XML
and
various
standard
mapping
of
young
data
models
to
business
chemos.
These
are
described
in
RFC,
6110
and
the
point
of,
and
it's
implemented
at
peeing
peeing
in
that
bsdl
plugging
and
this
plugin
actually
produces
free
schemas
that
are
part
of
the
digital
standard.
B
It's
relax,
ng
schema,
that's
used
for
checking
grammar
the
schema
itself
and
data
types
that
Carl
talks
both
and
then
another
schema
is
about
semantic
constraints,
which
is
schema
Tron.
Another
well-known
XML
schema
language
and
then
third
part
that
not
that's
not
very
common,
so
far
is
used
for
adding
defaults
to
the
instant
document.
I
will
again
explain
why
this
is
necessary
and
how
it
works.
On
on
the
next
slide,
you
can
produce
all
three
schemas
by
using
that
yang
to
digital
tool.
B
This
is
actually
a
UNIX
shell
script
and
I
wrote
it
in
order
to
provide
an
example
how
to
use
these
dis
da
schemas
in
in
validating
tool.
In
fact,
it
turns
out
that
it's
useful
in
and
by
itself,
it's
okay
to
use
it
for
validating,
but
if
you
want
to
write
a
tool
that
also
does
some
validation,
please
don't
put
any
execs
and
calling
shells
and
and
using
this
shell
script.
This
is
not
not
very
good,
just
look
into
the
shell
script
and
replicate
all
those
steps
using
some
library
function,
calls
and
and
so
on.
B
This
is,
for
example,
what's
done
in
lipid
conf
library,
so
this
shell
script
tool
can
be
really
effectively
used
from
a
command
line
like
this.
So
we
can
produce
these
free
schemas
like
this,
so
you
have
to
specify
the
target,
but
you
want
to
generate
the
schemas
for
that
means.
In
our
case,
we
want
to
generate
the
schema
for
configuration
right,
and
here
you
can
see.
B
The
three
schemas
are
stored
are
saved
in
files
and
then
I
names
are
here
on
the
right,
and
so
if
we
generate
these
schemas,
we
can
use
then
for
for
editing
a
configuration
for
sample
example
of
configuration,
let's
say,
but
in
order
to
save
some
typing,
we
can
also
use
another,
a
yang
plug-in,
which
is
called
sample.
Xml
skeleton
for
producing
a
skeleton
instance
document
which
takes
the
data
model
and
then
puts
an
instance
instance
of
every
node.
That's
found
in
that
data
model
into
the
the
XML
document.
B
But
then
this
skeleton
the
human
has
to
be
edited.
Usually
it's
not
valid
because,
for
example,
for
every
choice,
that's
in
the
data
model.
You
will
have
all
cases
that
are
part
of
the
choice
included
in
that
instance
document
so
usually
in
to
remove
all
cases,
but
one
from
the
instance
document
in
order
to
make
it
Valley.
But
anyway,
it's
just
a
technical
point.
If
you
edit
this
sample
skeleton,
you
can
also
use
emacs,
for
example,
for
on
the
file
validation
of
this
for
the
an
external
mode.
B
By
the
way
you
need
to
convert
be
the
relax
and
G
schema
to
so-called
compact
syntax.
If
you
want
to
do
that
and
then,
if
you
load
that
into
the
MX,
it
will
validate
the
instance
document
on
the
fly
using
that
relax,
ng
schema
and
now
we
can
do
all
steps
of
validating
the
instance
document
using
yang
to
this
dual
script.
B
B
Tells
the
tool
to
use
that
Jing
Java
based
validator,
if
you
don't
use
this
J,
the
script
uses
the
usual
XML
lint.
That's
part
of
the
lip
XML
suite,
but
in
my
experience
this
XML
lint
it
works
fine,
but
the
problem
with
it
is
that
it
it's
error,
messages
are
really
horrible
and
they
don't
tell
you
anything
about.
What's
really
happening,
what's
wrong
with
the
document,
whereas
Jing
is
really
very,
very
much
focused
and
tells
you
exactly
what
you
need
to
change
in
order
to
make
the
document.
B
Well,
it's
rare
comment
using
this
every
time
and
then
you
have
to
provide
the
base
name
like
the
tool
needs
to
find
beef
3
schema
files.
So
you
need
to
give
some
some
information
about
the
name
of
these
schema
files,
and
then
you
provide
an
instance
XML
document
that
you
want
to
validate
and
that's
all
and
you
can
see
that
the
validation
is
done
in
three
steps.
It
essentially
means
in
every
step
one
of
the
schemas
relax,
ng,
DSR,
L
and
schema
Tron
is
used,
and
in
this
case
no
errors
are
found.
B
If
there
are
some
errors
in
the
document,
you
will
see
some
error
messages
that
may
help
you
to
locate
the
source
of
the
problem.
Ok,
so
here
is
a
picture
which
explains
what's
really
going
on
so
and
this
exactly
follows
the
procedure,
how
young,
when
instance
document
is
supposed
to
be
validated
against
young
data
model.
So
in
this
case
we
first
have
to
check
the
structure,
the
schema
itself,
the
grammar
of
the
document
and
data
types-
and
this
is
water.
B
C
B
All
the
default
have
to
be
provided
before
the
semantic
constraints
are
checked
and
that
cement.
So
this
is
what
the
DSR
L
schema
provides.
So
this
step
is
done
and
the
initial
XML
document
is
changed
so
that
all
defaults
are
present
in
the
new
document,
and
this
new
document
is
then
checked
for
all
the
semantic
rules
that
are
written
in
the
data
model
are
then
checked
using
the
schema
from
schema
so
in.
In
effect,
this
covers
all
all.
B
Validity
constraints
that
can
be
expressed
in
yang,
with
some
very
minor
exception
that
I
do
not
discuss
here.
So
that's
also
the
reason
why
it
was
not
very
avoid
it
was
not
actually
possible
to
use
XML
schema
because
XML
schema
only
would
could
only
cover
the
first
part
on
the
left,
and
there
is
no
official
way
you
can
actually
use
also
schema
to
run
with
XML
schema.
But
that's
not
that's
not
official
that
just
some
in
official
extension
of.
C
B
Here
the
config
target,
but
we
can
use
it
for
other
document
types.
Other
instance
documents,
for
example,
on
a
notification
for
the
Turing
machine.
We
have
one
notification
and
then
notification
can
look
like
this,
for
example,
and
we
can
validate
this
XML
instance
document
in
the
same
way
just
using
another
target,
but
that's
indicated
with
that.
B
So
Jason
is
an
optional
media
typing
in
Raskin,
and
tieng
also
provides
some
means
for
converting
for
actually
doing
a
schema
based
conversion
between
XML
and
Jason.
That's
quite
important.
You
cannot
use
any
of
the
shelf
XML
to
JSON
object,
Jason
to
XML
converter,
because
there
is
quite
a
lot
of
information
in
the
yang
data
model
that
has
to
be
taken
into
account
in
order
to
really
produce
valid
results.
So,
for
example,
it's
important
that
numbers
from
XML
are
converted
to
Jason
numbers
and
not
to
Jason
strings
and
so
on.
B
So
peeing
helps
with
this
and
the
way
how
this
is
implemented
is
that
peeing
can
or
Jason
Jason
XSL
plugin
can
use
can
be
used
for
producing
an
accessibility,
stylesheet
and
as
soon
as
you
have
this
accessibility
stylesheet,
you
can
use
it
for
converting
any
external
instance.
It
means
configurations
the
data
notifications,
our
PC
contents.
B
You
can
convert
them
from
XML
to
Jason
and
I
think
this
is
quite
useful
for
them.
For
example,
if
you
need
to
perform
this
conversion
in
the
device,
it's
not
necessary
to
have
Python
installed
installed
on
the
device,
so
you
can
just
produce
this
accessibility.
Stylesheet
offline
then
install
it,
and
this
XSLT
stylesheet
only
changes
if
the
data
model
is
changed.
B
So
then,
of
course,
the
accessibility
processor
is
applied
to
and
the
stylesheet
is
applied
to
an
XML
instance
document
in
the
usual
way.
So,
for
example,
if
you
use
that
ubiquitous
XSLT
proc
processor,
it's
done
like
this
and,
as
I
said,
the
same
things
stylesheet
covers
all
document
types
and
by
the
way,
PN
also
as
J
talks,
plugging
that
does
the
opposite
conversion
and,
for
example,
this
can
be
useful
for
validating
JSON
data.
I
have
been
using
it
quite
regularly
for
validating
JSON
data.
B
It's
seems
a
bit
complicated,
so
you
need
to
convert
Jason
first
to
XML
in
order
to
be
very
able
to
validate
that
XML
using
that
bsdl
procedure,
that
I
explained,
but
it's
in
my
experience
it
works
quite
finite
and
it
is
doable.
So
unless
we
have
some
JSON
schema
implemented,
this
is
what
Cal
wants
to
do.
B
C
Away
from
University
and
I
used
to
have
P
warnings
when
I
used
validations
is
that
my
models
is
too
large.
Lots
of
definitions,
just
wondering,
is
that
some
kind
of
suggestions
from
the
ITF
that
I
should
not
to
make
the
module
very
large
because
actually
I'm
doing
the
yaw
models
for
dhcpv6
is
lots
of
work
very
large
model,
so
I
just
considering
whether
I
have
to
submit
submit
the
model
into
small
sub
modules,
but.
B
C
C
B
You
use
p.m.
with
really
huge
beta
models
and
we
had
some
to
test.
It
can
take
some
time.
That's
true
it
it's
not
terribly
fast,
but
for
normal
life
they
come
all
that
should
work
just
fine
and
really
there
are
no
limits
concerning
the
number
of
definitions
or
the
depths
of
the
hierarchy,
or
things
like
that.
So.
D
B
A
A
Okay,
there
is
something
that
I
would
like
you
to
mention
Martin
in
the
latest
version
of
Pahang
1.6.
There
is
like
an
extra
option
that
we
could
use
because
normally
is
going
to
complain
that
you
don't
use
like
an
ITF
prefix
right.
So
if
you
come
from
I
Triple
E,
for
example,
you
can
put
like
a
a
triple
e.
It
won't
not
campaign
about
that.
So.
C
D
So
I
changed
that
plug
in
so
that
now
there
are
two
different
options:
one
is
called,
does
lint
and
it
just
checks
all
the
generic
recommendations
from
RFC
sixty
eight
seven,
but
it
does
not
check
you
know
the
name
of
the
module
must
start
with
IETF
and
so
on.
So
if
you,
if
you
want
to
check
for
the
guidelines
for
a
module,
that
is
not
an
IDF
module
might
be
vendor
specific.
Also,
you
can
use
the
limped
option
to
behind
it's
gonna
check
all
the
recommendations
and
guidelines
and.
A
One
last
thing
as
well
on
this
interest:
do
because
I'm
receiving
more
and
more
requests
from
different
se
owes
who
want
to
do
like
yang
models,
and
that's
perfectly
fine
is
good
news.
We
have
in
the
latest
guidelines
for
writing
yang
models.
Rfc
sixty
eighty
seven
bits,
we've
gots
a
couple
of
extra
sections
for
different
as
dioz.
Please
review
this
just
to
see
if
it
makes
sense
right
if
we're
missing
anything
that
will
be
key,
but
a
triple
e
m.
Ef
BB
F.