SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Applying REST to Network Management;
An Implementor’s View
Carl Moberg, VP Technology
calle@tail-f.com
   @cmoberg




Confidential Information | December 18, 2012
Agenda

•    Background and Overview of REST
•    REST in a Network Management Context
•    Introducing Data Models
•    Putting it all Together
•    A Short Demo




Confidential Information | December 18, 2012   1
A Brief History of REST

•  Fielding, R. T. (2000) Architectural Styles and the Design of
   Network-based Software Architectures
•  Many called, few are chosen
•  An architectural style... but we digress




Confidential Information | December 18, 2012                   2
Which Way to Slice This?

•  The REST Architectural Style describes six constraints:
       –  Uniform interface, Stateless, Cacheable, Client-server, Layered
          System, Code on demand (optional)
•  Guiding principles for of a REST interface (the Uniform
   Interface constraints):
       –    Resources have unique identifiers (e.g. URIs)
       –    Manipulations of resources through representations
       –    Self-descriptive Messages
       –    Hypermedia as the engines of application state (HATEOAS)




Confidential Information | December 18, 2012                                3
Resources Have Unique Identifiers (e.g. URIs)


GET /api/running/interfaces/interface/eth0/ipv4 HTTP/1.1!
!
<ipv4 y:self="/api/running/interfaces/interface/eth0/ip:ipv4”>!
  <address y:self=”[...]">!
     <ip>192.168.0.1</ip>!
...!
!

•  Individual resources are identified in requests using URIs
•  Resources are conceptually separate from the
   representations
•  Resource representations depend on query and server
   support (e.g. XML and JSON)


Confidential Information | December 18, 2012                      4
Manipulation of Representations


  < Content-Type: application/vnd.yang.data+xml!
  !
  <ipv4 y:self="/api/running/interfaces/interface/eth0/ip:ipv4”>!
    <address y:self=”[...]">!
      <ip>192.168.0.1</ip>!
    </address>!
  </ipv4>!

•  Representations (including metadata) contain enough
   information to be modified or deleted
•  Provided that the client has permission to do so




Confidential Information | December 18, 2012                        5
Self-descriptive Messages


 <   HTTP/1.1 200 OK!
 <   Server: ConfD!
 <   Cache-control: private, no-cache, must-revalidate, proxy-revalidate
                                                                       !
 <   Date: Tue, 18 Dec 2012 15:53:12 GMT!
 <   Content-Type: application/vnd.yang.data+xml!
 <   Transfer-Encoding: chunked!



•  Each message includes enough information to describe
   how to process the message
•  Foundation for stateless processing
•  Standard methods and media types are used to indicate
   semantics and exchange information


Confidential Information | December 18, 2012                          6
Hypermedia as the Engines of Application State


 <running y:self="/api/running"/>!
 !
 <interface y:self="/api/running/interfaces/interface/eth0">!
 !
 <lock y:self="/api/running/_lock">!       A REST API must not define fixed
 !                                         resource names or hierarchies
                                               - (angry) Fielding on his blog

•  Most profound (and abused) criteria
•  Clients deliver state via contents, query-string parameters,
   request headers and the URI
•  Servers deliver state to clients via content, response codes,
   and response headers
•  ...just like the web works
Confidential Information | December 18, 2012                                    7
REST vs Other Protocols

                                      REST       SNMP       NETCONF       SOAP


    Data models                                SNMP MIBs     YANG
                                                             Models
    Data                                          SMI         YANG        WSDL
    Modeling
    Language
    Management                  HTTP Verbs      SNMP        NETCONF         N/A
    Operations                                 Operations   Operations
    RPC Protocol                 HTTP/XML/       BER          XML          XML
    Encoding                       JSON
    Transport                    SSL/HTTP/       UDP        SSH/TCP      SSL/HTTP/
    Stack                          TCP                                     TCP


Confidential Information | December 18, 2012                                         8
REST in a Network Management Context

•  We will focus on using REST to read and write data to
   network elements
•  Most applications we’ve come across expect to use
   RESTful HTTP to extract data using simple scripts
       –  curl(1), wget(1)
•  As mentioned, we manipulate resources, one at a time
•  But we know people will try and use it to peek and poke




Recommended reading: RFC 3535 Overview of the 2002 IAB Network
Management Workshop
Confidential Information | December 18, 2012                     9
Information Models and Data Models

•  Information Models are conceptual, implementation
   independent
•  Data Models are detailed, intended for implementations

                                 Information                Examples: UML, Entity
                                    Model                   Relations (ER)


                                                            Examples: SMI, WSDL,
    Data Model                    Data Model   Data Model   YANG


Recommended reading: RFC 3444 On the difference between Information
Models and Data Models
Confidential Information | December 18, 2012                                        10
Data Models in Network Management

•  So, what is the data model of a router or a switch?
       –  For OpenFlow people, it’s the switch pipeline
       –  For I2RS people, it’s the FIB and RIB
       –  For most implementations in the field, it’s what’s in the CLI
•  Well used CLIs exhibit the inherited characteristics of all
   use cases it’s been exposed to
•  We’ll assume (and it’s relatively well founded) that REST
   APIs want to be on the same abstraction level as the CLI
       –  Also, reality (code base) prohibits much else
       –  REST on a network level is very interesting, but different




Confidential Information | December 18, 2012                              11
The YANG Data Modeling Language

•  IETF RFC 6020, Standards Track
•  A Language designed to write data
   models for the NETCONF protocol.
   It provides features including:
   –    Human readable
   –    Hierarchical
   –    Reusable types and groupings
   –    Extensibility
   –    Formal constraints for validation
•  Proven to be useful for other
   applications (CLI, Web UI, etc)


                                            12
Example Data Model in YANG


  interfaces
                                               •  We’ll be looking at
                                                  –  ietf-interface.yang!
           interface                              –  ietf-ip.yang!
           key: name
                                               •  Developed in the IETF
                   statistics                     NETMOD WG
                   ipv4                        •  More models in the
                         address
                          address
                                                  making
                   ipv6

                          address
                           address



Confidential Information | December 18, 2012                                13
Mapping YANG to REST Resources

•  YANG data nodes are mapped to REST resources
•  YANG rpc statements are mapped to HTTP POST
   operations
•  HTTP Verbs:
       –    GET to fetch resources
       –    POST to create resources
       –    PUT to replace a resource
       –    PATCH to modify existing resources
       –    DELETE to remove resources




Confidential Information | December 18, 2012      14
An Example Query (An Ethernet Interface)
                                                       1
> GET /api/running/interfaces/interface/eth0 HTTP/1.1!
> Authorization: Basic YWRtaW46YWRtaW4=!
> User-Agent: curl/7.28.!
> Host: 127.0.0.1:8008!
> Accept: */*!
> !
< HTTP/1.1 200 OK!
< Server: ConfD!
< Date: Mon, 17 Dec 2012 16:08:33 GMT!
                                               2
< Content-Type: application/vnd.yang.data+xml!
< Transfer-Encoding: chunked!
< !
!
<interface y:self="/api/running/interfaces/interface/eth0”>!
  <name>eth0</name>!
  <type>ethernetCsmacd</type>!
  <location>0</location>!                                                                3
  <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">!
    <address y:self="/api/running/interfaces/interface/eth0/ip:ipv4/address/192.168.0.1">!
      <ip>192.168.0.1</ip>!
    </address>!
  </ipv4>!
  <ethernet xmlns="http://example.com/ethernet">!
  </ethernet>!
</interface>!
!




Confidential Information | December 18, 2012                                                 15
Introducing ConfD and it's REST Interface



                             REST
                                               NETCONF   NETCONF        SNMP     Web UI



                            ConfD Core Engine
                            •  Transactions
                            •  AAA/User Sessions
                            •  Logs and audit trails
                                                                   YANG
                                                                   Module      CDB


                                                  Managed Objects API

                    Managed                                    Managed
                     Object                                     Object               Managed
                                               Managed                                Object
                                                Object


Confidential Information | December 18, 2012                                                   16
How Does REST Work in a ConfD Context

•  Just another northbound interface, shared everything
•  RESTful API over HTTP
       –  for accessing data defined in YANG, stored in CDB
       –  using the datastores as defined in NETCONF
•  Configuration data and state data are exposed to GET
•  Configuration data also accept DELETE PATCH POST and
   PUT




Confidential Information | December 18, 2012                  17
REST Resources (Top Level)

•  Top level resource application/vnd.yang.api
       –    Well known /api location
       –    version string
       –    running - the running datastore
       –    operational - the representation of all operational data




Confidential Information | December 18, 2012                           18
REST Resources (Datastores)

•  Datastores application/vnd.yang.datastore
       –  running - The running configuration of the device
       –  startup - The startup configuration of the device




Confidential Information | December 18, 2012                  19
Rest Resources (Model Resources)

•  Model Resources application/vnd.yang.data
       –  All resources has y:path and y:self in representation
       –  All subresources has y:self reference




Confidential Information | December 18, 2012                      20
(Finally) Time for Demo

•  Queries
       –  Top-level
       –  Datastores
       –  Operations
•  Interface configuration
       –  Look at interfaces
       –  Change IP address




Confidential Information | December 18, 2012   21
Conclusions and Things to Ponder

•  REST allows for easy scripting with existing tools
       –  Many command line tools available and default on Linux and Mac
       –  Many, many language bindings
•  REST does not provide sessions:
       –  Impact on error management
       –  How about transactions
•  Rest allows for changing a single resource at a time:
       –  How does this scale in multi-parameter, complex environment




Confidential Information | December 18, 2012                               22
Wrap up and Questions

•  Suggested reading list:
       –    Fielding Dissertation
       –    RFC 3535
       –    RFC 3444
       –    YANG-API Protocol Draft (draft-bierman-netconf-yang-api-01)


•  Discuss!
       –  @cmoberg
       –  calle@tail-f.com




Confidential Information | December 18, 2012                              23

Weitere ähnliche Inhalte

Was ist angesagt?

OpenFlow Switch Management using NETCONF and YANG
OpenFlow Switch Management using NETCONF and YANGOpenFlow Switch Management using NETCONF and YANG
OpenFlow Switch Management using NETCONF and YANGTail-f Systems
 
NETCONF & YANG Enablement of Network Devices
NETCONF & YANG Enablement of Network DevicesNETCONF & YANG Enablement of Network Devices
NETCONF & YANG Enablement of Network DevicesCisco DevNet
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsCisco Canada
 
MPLS Deployment Chapter 2 - Services
MPLS Deployment Chapter 2 - ServicesMPLS Deployment Chapter 2 - Services
MPLS Deployment Chapter 2 - ServicesEricsson
 
Module 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG ConceptsModule 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG ConceptsTail-f Systems
 
Lecture DNA repair - Part-1_slideshare.pdf
Lecture DNA repair - Part-1_slideshare.pdfLecture DNA repair - Part-1_slideshare.pdf
Lecture DNA repair - Part-1_slideshare.pdfKristu Jayanti College
 
CCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network LayerCCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network LayerVuz Dở Hơi
 
CCNAv5 - S2: Chapter4 Routing Concepts
CCNAv5 - S2: Chapter4 Routing ConceptsCCNAv5 - S2: Chapter4 Routing Concepts
CCNAv5 - S2: Chapter4 Routing ConceptsVuz Dở Hơi
 
CCNAv5 - S1: Chapter 4 - Network Access
CCNAv5 - S1: Chapter 4 - Network Access CCNAv5 - S1: Chapter 4 - Network Access
CCNAv5 - S1: Chapter 4 - Network Access Vuz Dở Hơi
 
CCNA v6.0 ITN - Chapter 07
CCNA v6.0 ITN - Chapter 07CCNA v6.0 ITN - Chapter 07
CCNA v6.0 ITN - Chapter 07Irsandi Hasan
 
Binding change mechanism of ATP SYNTHASE
Binding change mechanism of ATP SYNTHASEBinding change mechanism of ATP SYNTHASE
Binding change mechanism of ATP SYNTHASEArifa Akbarali
 
RNA- STRUCTURE AND FUNCTIONS
RNA- STRUCTURE AND FUNCTIONSRNA- STRUCTURE AND FUNCTIONS
RNA- STRUCTURE AND FUNCTIONSSushrutMohapatra
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocolMuuluu
 

Was ist angesagt? (20)

Post-Transcriptional Modification of Eukaryotic mRNA
Post-Transcriptional Modification of Eukaryotic mRNAPost-Transcriptional Modification of Eukaryotic mRNA
Post-Transcriptional Modification of Eukaryotic mRNA
 
OpenFlow Switch Management using NETCONF and YANG
OpenFlow Switch Management using NETCONF and YANGOpenFlow Switch Management using NETCONF and YANG
OpenFlow Switch Management using NETCONF and YANG
 
NETCONF & YANG Enablement of Network Devices
NETCONF & YANG Enablement of Network DevicesNETCONF & YANG Enablement of Network Devices
NETCONF & YANG Enablement of Network Devices
 
Model-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data AnalyticsModel-driven Telemetry: The Foundation of Big Data Analytics
Model-driven Telemetry: The Foundation of Big Data Analytics
 
MPLS Deployment Chapter 2 - Services
MPLS Deployment Chapter 2 - ServicesMPLS Deployment Chapter 2 - Services
MPLS Deployment Chapter 2 - Services
 
Module 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG ConceptsModule 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG Concepts
 
Lecture DNA repair - Part-1_slideshare.pdf
Lecture DNA repair - Part-1_slideshare.pdfLecture DNA repair - Part-1_slideshare.pdf
Lecture DNA repair - Part-1_slideshare.pdf
 
Tema 3 Replicación del ADN
Tema 3 Replicación del  ADNTema 3 Replicación del  ADN
Tema 3 Replicación del ADN
 
14 atpase
14 atpase14 atpase
14 atpase
 
CCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network LayerCCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network Layer
 
Dna replication
Dna replicationDna replication
Dna replication
 
Translation of dna
Translation of dnaTranslation of dna
Translation of dna
 
CCNAv5 - S2: Chapter4 Routing Concepts
CCNAv5 - S2: Chapter4 Routing ConceptsCCNAv5 - S2: Chapter4 Routing Concepts
CCNAv5 - S2: Chapter4 Routing Concepts
 
CCNAv5 - S1: Chapter 4 - Network Access
CCNAv5 - S1: Chapter 4 - Network Access CCNAv5 - S1: Chapter 4 - Network Access
CCNAv5 - S1: Chapter 4 - Network Access
 
CCNA v6.0 ITN - Chapter 07
CCNA v6.0 ITN - Chapter 07CCNA v6.0 ITN - Chapter 07
CCNA v6.0 ITN - Chapter 07
 
Transcription
TranscriptionTranscription
Transcription
 
Binding change mechanism of ATP SYNTHASE
Binding change mechanism of ATP SYNTHASEBinding change mechanism of ATP SYNTHASE
Binding change mechanism of ATP SYNTHASE
 
RNA- STRUCTURE AND FUNCTIONS
RNA- STRUCTURE AND FUNCTIONSRNA- STRUCTURE AND FUNCTIONS
RNA- STRUCTURE AND FUNCTIONS
 
IDOCS ALE
IDOCS ALEIDOCS ALE
IDOCS ALE
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 

Andere mochten auch

Module 10: CDB Subscribers
Module 10: CDB SubscribersModule 10: CDB Subscribers
Module 10: CDB SubscribersTail-f Systems
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data TypesTail-f Systems
 
Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2Module 6: YANG Tutorial - part 2
Module 6: YANG Tutorial - part 2Tail-f Systems
 
Module 5: YANG Tutorial - part 1
Module 5: YANG Tutorial - part 1Module 5: YANG Tutorial - part 1
Module 5: YANG Tutorial - part 1Tail-f Systems
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Tail-f Systems
 
Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceTail-f Systems
 
Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16Kentaro Ebisawa
 
Module 11: Operational Data Providers
Module 11: Operational Data ProvidersModule 11: Operational Data Providers
Module 11: Operational Data ProvidersTail-f Systems
 
Module 9: CDB Technical Intro
 Module 9: CDB Technical Intro Module 9: CDB Technical Intro
Module 9: CDB Technical IntroTail-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 YANGTail-f Systems
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining 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 YANGTail-f Systems
 
Module 1: ConfD Technical Introduction
Module 1: ConfD Technical IntroductionModule 1: ConfD Technical Introduction
Module 1: ConfD Technical IntroductionTail-f Systems
 
Module 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting StartedTail-f Systems
 

Andere mochten auch (16)

Module 10: CDB Subscribers
Module 10: CDB SubscribersModule 10: CDB Subscribers
Module 10: CDB Subscribers
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data Types
 
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 - Why NETCONF
Tail-f - Why NETCONFTail-f - Why NETCONF
Tail-f - Why NETCONF
 
Module 5: YANG Tutorial - part 1
Module 5: YANG Tutorial - part 1Module 5: YANG Tutorial - part 1
Module 5: YANG Tutorial - part 1
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
 
Tail f - Why ConfD
Tail f - Why ConfDTail f - Why ConfD
Tail f - Why ConfD
 
Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound Interface
 
Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16
 
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
 
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
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining
 
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 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting Started
 

Ähnlich wie Webinar: Applying REST to Network Management – An Implementor’s View

REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulnessDavid Waite
 
2. RINA overview - TF workshop
2. RINA overview - TF workshop2. RINA overview - TF workshop
2. RINA overview - TF workshopARCFIRE ICT
 
Open source identity management 20121106 - apache con eu
Open source identity management   20121106 - apache con euOpen source identity management   20121106 - apache con eu
Open source identity management 20121106 - apache con euFrancesco Chicchiriccò
 
Webinar: How Banks Manage Reference Data with MongoDB
 Webinar: How Banks Manage Reference Data with MongoDB Webinar: How Banks Manage Reference Data with MongoDB
Webinar: How Banks Manage Reference Data with MongoDBMongoDB
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB
 
Introduction to YANG data models and their use in OpenDaylight: an overview
Introduction to YANG data models and their use in OpenDaylight: an overviewIntroduction to YANG data models and their use in OpenDaylight: an overview
Introduction to YANG data models and their use in OpenDaylight: an overviewCisco DevNet
 
Under the hood, fighting fires with realtime semantic web technology
Under the hood, fighting fires with realtime semantic web technologyUnder the hood, fighting fires with realtime semantic web technology
Under the hood, fighting fires with realtime semantic web technologyBart van Leeuwen
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Dobrica Pavlinušić
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentationpbridges
 
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...gogo6
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturedrewz lin
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturemysqlops
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01jgregory1234
 
Facebook的架构
Facebook的架构Facebook的架构
Facebook的架构yiditushe
 
Proud to be polyglot
Proud to be polyglotProud to be polyglot
Proud to be polyglotTugdual Grall
 
Splunk as a_big_data_platform_for_developers_spring_one2gx
Splunk as a_big_data_platform_for_developers_spring_one2gxSplunk as a_big_data_platform_for_developers_spring_one2gx
Splunk as a_big_data_platform_for_developers_spring_one2gxDamien Dallimore
 
Mobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyMobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyBlue Slate Solutions
 

Ähnlich wie Webinar: Applying REST to Network Management – An Implementor’s View (20)

REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulness
 
2. RINA overview - TF workshop
2. RINA overview - TF workshop2. RINA overview - TF workshop
2. RINA overview - TF workshop
 
Open source identity management 20121106 - apache con eu
Open source identity management   20121106 - apache con euOpen source identity management   20121106 - apache con eu
Open source identity management 20121106 - apache con eu
 
Webinar: How Banks Manage Reference Data with MongoDB
 Webinar: How Banks Manage Reference Data with MongoDB Webinar: How Banks Manage Reference Data with MongoDB
Webinar: How Banks Manage Reference Data with MongoDB
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to Postgres
 
Introduction to YANG data models and their use in OpenDaylight: an overview
Introduction to YANG data models and their use in OpenDaylight: an overviewIntroduction to YANG data models and their use in OpenDaylight: an overview
Introduction to YANG data models and their use in OpenDaylight: an overview
 
SDN and metrics from the SDOs
SDN and metrics from the SDOsSDN and metrics from the SDOs
SDN and metrics from the SDOs
 
Under the hood, fighting fires with realtime semantic web technology
Under the hood, fighting fires with realtime semantic web technologyUnder the hood, fighting fires with realtime semantic web technology
Under the hood, fighting fires with realtime semantic web technology
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentation
 
Samba management Console
Samba management ConsoleSamba management Console
Samba management Console
 
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01
 
Facebook的架构
Facebook的架构Facebook的架构
Facebook的架构
 
Proud to be polyglot
Proud to be polyglotProud to be polyglot
Proud to be polyglot
 
"Vision for All?," a Presentation from Intel
"Vision for All?," a Presentation from Intel"Vision for All?," a Presentation from Intel
"Vision for All?," a Presentation from Intel
 
Splunk as a_big_data_platform_for_developers_spring_one2gx
Splunk as a_big_data_platform_for_developers_spring_one2gxSplunk as a_big_data_platform_for_developers_spring_one2gx
Splunk as a_big_data_platform_for_developers_spring_one2gx
 
Mobile Development Meets Semantic Technology
Mobile Development Meets Semantic TechnologyMobile Development Meets Semantic Technology
Mobile Development Meets Semantic Technology
 

Kürzlich hochgeladen

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Kürzlich hochgeladen (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Webinar: Applying REST to Network Management – An Implementor’s View

  • 1. Applying REST to Network Management; An Implementor’s View Carl Moberg, VP Technology calle@tail-f.com @cmoberg Confidential Information | December 18, 2012
  • 2. Agenda •  Background and Overview of REST •  REST in a Network Management Context •  Introducing Data Models •  Putting it all Together •  A Short Demo Confidential Information | December 18, 2012 1
  • 3. A Brief History of REST •  Fielding, R. T. (2000) Architectural Styles and the Design of Network-based Software Architectures •  Many called, few are chosen •  An architectural style... but we digress Confidential Information | December 18, 2012 2
  • 4. Which Way to Slice This? •  The REST Architectural Style describes six constraints: –  Uniform interface, Stateless, Cacheable, Client-server, Layered System, Code on demand (optional) •  Guiding principles for of a REST interface (the Uniform Interface constraints): –  Resources have unique identifiers (e.g. URIs) –  Manipulations of resources through representations –  Self-descriptive Messages –  Hypermedia as the engines of application state (HATEOAS) Confidential Information | December 18, 2012 3
  • 5. Resources Have Unique Identifiers (e.g. URIs) GET /api/running/interfaces/interface/eth0/ipv4 HTTP/1.1! ! <ipv4 y:self="/api/running/interfaces/interface/eth0/ip:ipv4”>! <address y:self=”[...]">! <ip>192.168.0.1</ip>! ...! ! •  Individual resources are identified in requests using URIs •  Resources are conceptually separate from the representations •  Resource representations depend on query and server support (e.g. XML and JSON) Confidential Information | December 18, 2012 4
  • 6. Manipulation of Representations < Content-Type: application/vnd.yang.data+xml! ! <ipv4 y:self="/api/running/interfaces/interface/eth0/ip:ipv4”>! <address y:self=”[...]">! <ip>192.168.0.1</ip>! </address>! </ipv4>! •  Representations (including metadata) contain enough information to be modified or deleted •  Provided that the client has permission to do so Confidential Information | December 18, 2012 5
  • 7. Self-descriptive Messages < HTTP/1.1 200 OK! < Server: ConfD! < Cache-control: private, no-cache, must-revalidate, proxy-revalidate ! < Date: Tue, 18 Dec 2012 15:53:12 GMT! < Content-Type: application/vnd.yang.data+xml! < Transfer-Encoding: chunked! •  Each message includes enough information to describe how to process the message •  Foundation for stateless processing •  Standard methods and media types are used to indicate semantics and exchange information Confidential Information | December 18, 2012 6
  • 8. Hypermedia as the Engines of Application State <running y:self="/api/running"/>! ! <interface y:self="/api/running/interfaces/interface/eth0">! ! <lock y:self="/api/running/_lock">! A REST API must not define fixed ! resource names or hierarchies - (angry) Fielding on his blog •  Most profound (and abused) criteria •  Clients deliver state via contents, query-string parameters, request headers and the URI •  Servers deliver state to clients via content, response codes, and response headers •  ...just like the web works Confidential Information | December 18, 2012 7
  • 9. REST vs Other Protocols REST SNMP NETCONF SOAP Data models SNMP MIBs YANG Models Data SMI YANG WSDL Modeling Language Management HTTP Verbs SNMP NETCONF N/A Operations Operations Operations RPC Protocol HTTP/XML/ BER XML XML Encoding JSON Transport SSL/HTTP/ UDP SSH/TCP SSL/HTTP/ Stack TCP TCP Confidential Information | December 18, 2012 8
  • 10. REST in a Network Management Context •  We will focus on using REST to read and write data to network elements •  Most applications we’ve come across expect to use RESTful HTTP to extract data using simple scripts –  curl(1), wget(1) •  As mentioned, we manipulate resources, one at a time •  But we know people will try and use it to peek and poke Recommended reading: RFC 3535 Overview of the 2002 IAB Network Management Workshop Confidential Information | December 18, 2012 9
  • 11. Information Models and Data Models •  Information Models are conceptual, implementation independent •  Data Models are detailed, intended for implementations Information Examples: UML, Entity Model Relations (ER) Examples: SMI, WSDL, Data Model Data Model Data Model YANG Recommended reading: RFC 3444 On the difference between Information Models and Data Models Confidential Information | December 18, 2012 10
  • 12. Data Models in Network Management •  So, what is the data model of a router or a switch? –  For OpenFlow people, it’s the switch pipeline –  For I2RS people, it’s the FIB and RIB –  For most implementations in the field, it’s what’s in the CLI •  Well used CLIs exhibit the inherited characteristics of all use cases it’s been exposed to •  We’ll assume (and it’s relatively well founded) that REST APIs want to be on the same abstraction level as the CLI –  Also, reality (code base) prohibits much else –  REST on a network level is very interesting, but different Confidential Information | December 18, 2012 11
  • 13. The YANG Data Modeling Language •  IETF RFC 6020, Standards Track •  A Language designed to write data models for the NETCONF protocol. It provides features including: –  Human readable –  Hierarchical –  Reusable types and groupings –  Extensibility –  Formal constraints for validation •  Proven to be useful for other applications (CLI, Web UI, etc) 12
  • 14. Example Data Model in YANG interfaces •  We’ll be looking at –  ietf-interface.yang! interface –  ietf-ip.yang! key: name •  Developed in the IETF statistics NETMOD WG ipv4 •  More models in the address address making ipv6 address address Confidential Information | December 18, 2012 13
  • 15. Mapping YANG to REST Resources •  YANG data nodes are mapped to REST resources •  YANG rpc statements are mapped to HTTP POST operations •  HTTP Verbs: –  GET to fetch resources –  POST to create resources –  PUT to replace a resource –  PATCH to modify existing resources –  DELETE to remove resources Confidential Information | December 18, 2012 14
  • 16. An Example Query (An Ethernet Interface) 1 > GET /api/running/interfaces/interface/eth0 HTTP/1.1! > Authorization: Basic YWRtaW46YWRtaW4=! > User-Agent: curl/7.28.! > Host: 127.0.0.1:8008! > Accept: */*! > ! < HTTP/1.1 200 OK! < Server: ConfD! < Date: Mon, 17 Dec 2012 16:08:33 GMT! 2 < Content-Type: application/vnd.yang.data+xml! < Transfer-Encoding: chunked! < ! ! <interface y:self="/api/running/interfaces/interface/eth0”>! <name>eth0</name>! <type>ethernetCsmacd</type>! <location>0</location>! 3 <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">! <address y:self="/api/running/interfaces/interface/eth0/ip:ipv4/address/192.168.0.1">! <ip>192.168.0.1</ip>! </address>! </ipv4>! <ethernet xmlns="http://example.com/ethernet">! </ethernet>! </interface>! ! Confidential Information | December 18, 2012 15
  • 17. Introducing ConfD and it's REST Interface REST NETCONF NETCONF SNMP Web UI ConfD Core Engine •  Transactions •  AAA/User Sessions •  Logs and audit trails YANG Module CDB Managed Objects API Managed Managed Object Object Managed Managed Object Object Confidential Information | December 18, 2012 16
  • 18. How Does REST Work in a ConfD Context •  Just another northbound interface, shared everything •  RESTful API over HTTP –  for accessing data defined in YANG, stored in CDB –  using the datastores as defined in NETCONF •  Configuration data and state data are exposed to GET •  Configuration data also accept DELETE PATCH POST and PUT Confidential Information | December 18, 2012 17
  • 19. REST Resources (Top Level) •  Top level resource application/vnd.yang.api –  Well known /api location –  version string –  running - the running datastore –  operational - the representation of all operational data Confidential Information | December 18, 2012 18
  • 20. REST Resources (Datastores) •  Datastores application/vnd.yang.datastore –  running - The running configuration of the device –  startup - The startup configuration of the device Confidential Information | December 18, 2012 19
  • 21. Rest Resources (Model Resources) •  Model Resources application/vnd.yang.data –  All resources has y:path and y:self in representation –  All subresources has y:self reference Confidential Information | December 18, 2012 20
  • 22. (Finally) Time for Demo •  Queries –  Top-level –  Datastores –  Operations •  Interface configuration –  Look at interfaces –  Change IP address Confidential Information | December 18, 2012 21
  • 23. Conclusions and Things to Ponder •  REST allows for easy scripting with existing tools –  Many command line tools available and default on Linux and Mac –  Many, many language bindings •  REST does not provide sessions: –  Impact on error management –  How about transactions •  Rest allows for changing a single resource at a time: –  How does this scale in multi-parameter, complex environment Confidential Information | December 18, 2012 22
  • 24. Wrap up and Questions •  Suggested reading list: –  Fielding Dissertation –  RFC 3535 –  RFC 3444 –  YANG-API Protocol Draft (draft-bierman-netconf-yang-api-01) •  Discuss! –  @cmoberg –  calle@tail-f.com Confidential Information | December 18, 2012 23