Upload
adam-lloyd
View
221
Download
0
Embed Size (px)
Citation preview
Components of NETMOD• YANG
– Data modeling language and semantics– Hierarchy of nodes– Constraints on those nodes
• Mapping rules of YANG to XML – Content on the wire
• YIN (XML-based syntax for YANG)– Semantically equivalent, fully reversible, XML-based syntax
• Same content, different format: more "<"s and ">"s
– YIN is simply the data model in an XML syntax• Can be manipulated using existing XML tools (e.g., XSLT)
• Mapping rules of YANG to DSDL– Including annotations for DSDL to preserve top-level semantics
• Standard type library for use by YANG– yang-types.yang in draft-netmod-yang
Building Network Mgmt Solutions with YANG
• NETCONF content defines two players:•Clients (Managers, Applications)• Servers (Agents, Devices)
• NETCONF content can be handled in two ways:• Specific: hardcoded•Generic: driven by meta-data
• YANG modules define machine-readable, human-oriented models which support the needs of all four areas
Specific Device
Generic Device
Generic App
Where does YANG fit?Tells the app developer what
the data can be modeled
Tells the app's XML handler how to parse/build content
Tells the device parser how to parse/build content
Tells the device developer what the model requires
Defines XML on the wire
Specific App
Things you can generate from YANG
• IDL Code generators (stubs)– Structure/Object definitions– Serializers, deserializers, etc– Specific code to enforce constraints
• Database table definitions (SQL "create table" statements)• Meta-data
– Drive CLI operation (completion, validation, etc)– Drive database instance creation
• Documentation– API Docs– Release notes
• UI Definitions– Support for Web pages
• XSLT, XUL, SVG, VRML
Building Network Mgmt Solutions with YANG
Some selected use cases:1) Device developer / native implementation
2) On-device DSDL validation
3) Generic browser
4) VPN application developer
First Step:Write the YANG Module
YANGModules
• Models are written in YANG• Both standard and proprietary
content are supported• YANG is canonical form of model
Use Case #1:Device developer
YANGModules • Developer reads the models
• Write code to support the model– Uses model's hierarchy– Enforces model's constraints
• Transforms model view into device implementation, if needed
DeviceImpl
Use Case #2:On-device DSDL validation
YANGModules
• Compile YANG using toolset• Generate DSDL schema files• Device uses schema to
validate configuration data– As data arrives in NETCONF
operations, it can be checked– At validation time (commit), the
entire config can be validated
• DSDL can enforce hierarchy and many YANG constraints
DSDLSchema
Files
Config
Device
Use Case #3:Generic Browser
YANGModules • Compile YANG using toolset
• Generate YIN files• Use XSLT to transform YIN
into XSLT files• Use XSLT files to generate
web pages for web-based config browser– Config -> [XSLT] -> XHTML
YIN files
Config
XSLT filesApp
Use Case #4:VPN Application
YANGModules
• Developer reads the models• Write code to support the model
– Uses model's hierarchy
– Enforces model's constraints
• Transforms model into user-oriented view of VPNs
• Uses generic YANG/ NETCONF library to send/recv data from the device, but uses VPN-cognoscent code to manipulate config data
VPN AppImpl
Deliverables• Architecture document
• Informational RFC
• YANG data modeling language and semantics– Proposed Standard
• Mapping rules of YANG to XML – Proposed Standard
• YIN (XML-based syntax for YANG)– Proposed Standard
• Mapping rules of YANG to DSDL– Proposed Standard
• Standard type library for use by YANG– Proposed Standard