introduction to yang data models and their use in opendaylight: an overview

15

Upload: cisco-devnet

Post on 12-Apr-2017

599 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Introduction to YANG data models and their use in OpenDaylight: an overview
Page 2: Introduction to YANG data models and their use in OpenDaylight: an overview

YANG in OpenDaylight

Giles Heron

Cisco Systems

Page 3: Introduction to YANG data models and their use in OpenDaylight: an overview

Why NETCONF/YANG - Informational RFC 3535

• SNMP had failed

• For configuration, that is

• Extensive use in fault handling and monitoring

• CLI scripting

• “Market share” 70%+

Abstract

This document provides an overview of a workshop held by the Internet Architecture Board (IAB) on Network Management. The workshop was hosted by CNRI in Reston, VA, USA from June 4 thru June 6, 2002. The goal of the workshop was to continue the important dialogstarted between network operators and protocol developers, and to guide the IETFs focus on future work regarding network management.

configuration

Page 4: Introduction to YANG data models and their use in OpenDaylight: an overview

Cost and

complexity • No well-defined protocols and

data-models

• Lack of atomicity

• Ordering problem

NETCONFManager

OSSNMSEMS

Implications of RFC3535 – Legacy Situation

Page 5: Introduction to YANG data models and their use in OpenDaylight: an overview

Reduced

Cost and

complexity

Cost/

Value

NETCONFManager

OSSNMSEMS

Transactions

Models

Standardized Protocols

Implications of RFC3535, with transactions

Page 6: Introduction to YANG data models and their use in OpenDaylight: an overview

What is a Data-Model? What is a Network Management Protocol?

• Data-Model

• A data-model explicitly and precisely determines the structure, syntax and semantics of the data…

• …that is externally visible

• Consistent and complete

• Protocol

• Remote primitives to view and manipulate the data

• Encoding of the data as defined by the data-model

Data-Model

Protocol

Page 7: Introduction to YANG data models and their use in OpenDaylight: an overview

ODL

Transport

Remote

Operations

Mgmt

Services

Mgmt info

(encoding)

Mgmt info

(definition)

XML-encoded

content

YANG modules

NETCONF

operations

XML

RPC

TLS,

SSH

JSONJAVA

DTO

I2RS

?

HTTP

RESTCONF

TCP

YANG - NETCONF, RESTCONF, I2RS & IDL

Page 8: Introduction to YANG data models and their use in OpenDaylight: an overview

Controller

MD-SAL Details

MD-SAL

Data StoreDOM BrokerBA-BI Connector

Mapping Service

Codec Registry

Schema Service

Codec Generator

Binding-Aware Broker

Binding-Aware to Binding-Independent Data Translation

Binding-Aware PluginBinding-Independent

Plugin/Client (Netconf/Restconf)

Forwarding Rules Manager, Stats Manager, BGP-LS/PCEP

External Clients

Page 9: Introduction to YANG data models and their use in OpenDaylight: an overview

Building a Plugin/Application

ModelModel

Yang Model

Java API DefinitionJava API DefinitionGenerated API

Definition

Module Implementations

Yang Tools

“Plugin”OSGI Bundle

1

4

Generate APIs

Create Plugin BundleDeploy

MavenBuild Tools

Module ImplementationsPlugin source code

“API” OSGI Bundle

MavenBuild Tools

2

3

Create API Bundle

4

Deploy

Controller

Page 10: Introduction to YANG data models and their use in OpenDaylight: an overview

Mounting YANG DatastoresOpenDaylight Controller Config

MD-SAL

NETCONF

NETCONF

• Mounted under e.g. http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config

• Data can be accessed using …/yang-ext:mount/…

• …/yang-ext:mount/config:modules is used to configure the various plug-ins

Config Store

RESTCONF

Page 11: Introduction to YANG data models and their use in OpenDaylight: an overview

Mounting YANG DatastoresOpenDaylight NETCONF Node “Discovery”

MD-SAL

NETCONF

RESTCONF

Node Inventory

• Nodes added by POSTing to config:modules

• ODL connects to each node

• ODL learns capabilities (YANG modules) and stores to model cache

• Cache at ~/cache/schema. Filenames of form [email protected].

Model Cache

XR1 XR2 OpenWRT

Page 12: Introduction to YANG data models and their use in OpenDaylight: an overview

Mounting YANG DatastoresOpenDaylight NETCONF Node Configuration

MD-SAL

NETCONF

RESTCONF

Node Inventory

• Nodes configured by POSTing or PUTting to e.g.:

• http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/XR2/yang-ext:mount/Cisco-IOS-XR-ifmgr-cfg:interface-configurations/interface-configuration/act/Loopback0/

• Can retrieve config (or operational stats) using GET

Model Cache

XR1 XR2 OpenWRT

Page 13: Introduction to YANG data models and their use in OpenDaylight: an overview

NETCONF/YANG Usecase: MEF SCA-API Project

13

OpenDaylightsca-api-web

MD-SAL

NETCONF

<<REST>> SCA-API (LSO PRESTO)

mef-sca-model

XR EVPNXR l2vpn-pw NCS service modelOpenFlow

NSOOpenFlow

sca-api-provider

Service models

Technology models

Device models

Page 14: Introduction to YANG data models and their use in OpenDaylight: an overview

Thank you

Page 15: Introduction to YANG data models and their use in OpenDaylight: an overview