Jump to: navigation, search

Difference between revisions of "Neutron/sdnapi"

 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page is for SDN APIs between OpenStack and SDN Controller.
+
==L3VPN Information Model==
 
+
===Overview===
 
+
====UML Model====
 
+
<gallery>
 
+
Example.jpg|High Level L3VPN Architecture
 
+
</gallery>
 
+
====Elements Description====
 +
The L3 VPN model contains multiple VPN Instances.
 +
===L3VPN Instance===
 +
====UML Model====]
 +
<gallery>
 +
Example.jpg| L3VPN Instance Model
 +
</gallery>
  
 +
L3VPN Instance Attributes
 +
{| class="wikitable"
 +
|-
 +
! Attribute !! Type !! Required !! CRUD !! Default Value !! Constraints !! Note
 +
|-
 +
| instanceName || String || Yes || CRD || N/A || Maxlength = 64 Pattern = ([^?]*) || L3VPN instance name
 +
|-
 +
| serviceType || String enum || No || CRUD || full-mesh || full-mesh or hub-spoke || Topology type
 +
|-
 +
| afType || String enum || No || CRUD || ipv4uni || ipv4uni or ipv6uni || Address family type: IPv4 or IPv6
 +
|-
 +
| acIf Id || String || Yes || CRD || N/A || Length= 1~63 || Access interface ID
 +
|-
 +
| acIfAddr || String || No || CRUD || N/A || Length = 0~255 || Access interface address, IPv4 or IPv6
 +
|-
 +
| acIfMask || Unsigned byte || No || CRUD || N/A || 0 ~ 128 || IP address mask length
 +
|-
 +
| role || String enum || No || CRUD || edge-if || edge-if or center-if || center-if is only available in hub-spoke mode; center-if is the interface in hub node
 +
|-
 +
| userName || String || No || CRUD ||N/A || Maxlength = 64 Pattern = ([^?]*) || User name for this access interface
 +
|-
 +
| userPassword || String || No || CRUD || N/A || Maxlength = 64 Pattern = ([^?]*) || User password for the access interface
 +
|-
 +
| phyNodeId || String || No || CRUD || N/A || Maxlength = 64 Pattern = ([^?]*) || Physical node ID
 +
|-
 +
| phyAcIf || String || No || CRUD || N/A || Maxlength = 64 Pattern = ([^?]*) || hysical access interface
 +
|-
 +
| protocolType || String enum || No || CRUD || ospf || bgp, ospf, or isis || Protocol type
 +
|-
 +
| protocolId ||Unsigned int || No || CRUD || 0 || N/A || Valid only when protocol is IGP; it can be AS number
 +
|-
 +
| remoteAsNumber || String || No || CRUD || N/A || Length = 1 ~ 11 || Valid only when protocol is BGP
 +
|-
 +
| remotePeerAddr || String || No || CRUD || N/A || Length = 0~255 || Valid only when protocol is BGP
 +
|}
  
+
==L3VPN API example==
Disclaimer
+
===Restful API===
THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.
+
====L3VPN Instance====
Without limitation, ONF disclaims all liability, including liability for infringement of any proprietary rights, relating to use of information in this specification and to the implementation of this specification, and ONF disclaims all liability for cost of procurement of substitute goods or services, lost profits, loss of use, loss of data or any incidental, consequential, direct, indirect, or special damages, whether under contract, tort, warranty or otherwise, arising in any way out of use or reliance upon this specification or any information herein.
+
=====POST=====
No license, express or implied, by estoppel or otherwise, to any Open Networking Foundation or Open Networking Foundation member intellectual property rights is granted herein.
 
Except that a license is hereby granted by ONF to copy and reproduce this specification for internal use only.
 
Contact the Open Networking Foundation at https://www.opennetworking.org for information on specification licensing through membership agreements.
 
Any marks and brands contained herein are the property of their respective owners.
 
 
1 INTRODUCTION 5
 
2 ABBREVIATIONS AND ACRONYMS 5
 
3 L3VPN OVERVIEW 5
 
3.1 UML MODEL 5
 
3.2 ELEMENTS DESCRIPTION 6
 
4 L3VPN INSTANCE 6
 
4.1 UML MODEL 6
 
4.2 ELEMENT DESCRIPTION 6
 
5 BACK MATTER 7
 
5.1 REFERENCES 7
 
5.2 RELEASE HISTORY 8
 
5.3 CONTRIBUTORS 8
 
 
 
List of Figures
 
Figure 1 High Level L3VPN Architecture 5
 
Figure 2 L3VPN Instance Model 6
 
 
 
List of Tables
 
Table 1 L3VPN Instance Attributes 7
 
 
 
 
About this document
 
 
 
Summary
 
This document describes NBI information model for L3VPN.
 
A L3VPN instance contains a set of access interfaces in network devices, its topology, address family, and other attributes.
 
Keywords
 
NBI, SDN controller, L3VPN
 
 
1 Introduction
 
This document describes NBI information model for L3VPN.
 
A L3VPN model is the collection of L3VPN instances.
 
A L3VPN instance contains a set of access interfaces in network devices, its topology, address family, and other attributes.
 
 
 
2 Abbreviations and Acronyms
 
This document uses the following abbreviations and acronyms:
 
API Applications Programming Interface
 
NBI North Bound Interface
 
CRUD        Create, Read, Update, Delete
 
L3VPN Layer 3 VPN
 
VACIF Virtual Access Interface
 
VPN Virtual Private Network
 
 
 
3 L3VPN Information Model
 
3.1 Overview
 
3.1.1 UML Model
 
 
Figure 1 High Level L3VPN Architecture
 
3.1.2 Elements Description
 
The L3 VPN model contains multiple VPN Instances.
 
3.2 L3VPN Instance
 
3.2.1 UML Model
 
 
Figure 2 L3VPN Instance Model
 
3.2.2 Element Description
 
Attribute Type Required CRUD Default Value Constraints Note
 
instanceName String Yes CRD N/A Maxlength = 64
 
Pattern = ([^?]*) L3VPN instance name
 
serviceType String enum No CRUD full-mesh full-mesh or hub-spoke Topology type
 
afType String enum No CRUD ipv4uni ipv4uni or ipv6uni Address family type: IPv4 or IPv6
 
acIf Id String Yes CRD N/A Length= 1~63 Access interface ID
 
acIfAddr String No CRUD N/A Length = 0~255 Access interface address, IPv4 or IPv6
 
acIfMask Unsigned byte No CRUD N/A 0 ~ 128 IP address mask length
 
role String enum No CRUD edge-if edge-if or center-if center-if is only available in hub-spoke mode; center-if is the interface in hub node
 
userName String No CRUD N/A Maxlength = 64
 
Pattern = ([^?]*) User name for this access interface
 
userPassword String No CRUD N/A Maxlength = 64
 
Pattern = ([^?]*) User password for the access interface
 
phyNodeId String No CRUD N/A Maxlength = 64
 
Pattern = ([^?]*) Physical node ID
 
phyAcIf String No CRUD N/A Maxlength = 64
 
Pattern = ([^?]*) Physical access interface
 
protocolType String enum No CRUD ospf bgp, ospf, or isis Protocol type
 
protocolId Unsigned int No CRUD 0 N/A Valid only when protocol is IGP; it can be AS number
 
remoteAsNumber String No CRUD N/A Length = 1 ~ 11 Valid only when protocol is BGP
 
remotePeerAddr String No CRUD N/A Length = 0~255 Valid only when protocol is BGP
 
Table 1 L3VPN Instance Attributes
 
 
 
4 L3VPN API example
 
4.1 Restful API
 
4.1.1 L3VPN Instance
 
4.1.1.1 POST
 
 
POST URI/netl3vpn/l3vpninstances
 
POST URI/netl3vpn/l3vpninstances
  
 +
<pre><nowiki>
 
<l3vpninstances>
 
<l3vpninstances>
 
   <l3vpninstance>
 
   <l3vpninstance>
Line 132: Line 87:
 
   </l3vpninstance>
 
   </l3vpninstance>
 
</l3vpninstances>
 
</l3vpninstances>
 +
</nowiki></pre>
  
4.1.1.2 GET
+
=====GET=====
To get all instances
+
* To get all instances
GET URI/netl3vpn/l3vpninstances
+
GET URI/netl3vpn/l3vpninstances.
 
No HTTP message body.
 
No HTTP message body.
  
To get a single VPN instance
+
* To get a single VPN instance
GET URI/netl3vpn/l3vpninstances/{instancename}
+
GET URI/netl3vpn/l3vpninstances/{instancename}.
 
No HTTP message body.
 
No HTTP message body.
  
To get one or more VPN instances at a time
+
* To get one or more VPN instances at a time
 
GET URI/netl3vpn/l3vpninstances
 
GET URI/netl3vpn/l3vpninstances
  
 +
<pre><nowiki>
 
<l3vpninstances>
 
<l3vpninstances>
 
   <l3vpninstance>
 
   <l3vpninstance>
Line 153: Line 110:
 
   </l3vpninstance>
 
   </l3vpninstance>
 
</l3vpninstances>
 
</l3vpninstances>
 +
</nowiki></pre>
  
Response
+
* Response
 +
<pre><nowiki>
 
<l3vpninstances>
 
<l3vpninstances>
 
   <l3vpninstance>
 
   <l3vpninstance>
Line 186: Line 145:
 
   </l3vpninstance>
 
   </l3vpninstance>
 
</l3vpninstances>
 
</l3vpninstances>
 +
</nowiki></pre>
  
4.1.1.3 PUT
+
=====PUT=====
 
PUT URI/netl3vpn/l3vpninstances
 
PUT URI/netl3vpn/l3vpninstances
  
 +
<pre><nowiki>
 
<l3vpninstances>
 
<l3vpninstances>
 
   <l3vpninstance>
 
   <l3vpninstance>
Line 221: Line 182:
 
   </l3vpninstance>
 
   </l3vpninstance>
 
</l3vpninstances>
 
</l3vpninstances>
 +
</nowiki></pre>
  
4.1.1.4 DELETE
+
=====DELETE=====
To delete a single VPN instance  
+
* To delete a single VPN instance  
DELETE URI/netl3vpn/l3vpninstances/{instancename}
+
DELETE URI/netl3vpn/l3vpninstances/{instancename}.
 
No HTTP message body.
 
No HTTP message body.
  
To delete one or more instances
+
* To delete one or more instances
 
DELETE URI/netl3vpn/l3vpninstances
 
DELETE URI/netl3vpn/l3vpninstances
  
 +
<pre><nowiki>
 
<l3vpninstances>
 
<l3vpninstances>
 
   <l3vpninstance>
 
   <l3vpninstance>
Line 238: Line 201:
 
   </l3vpninstance>
 
   </l3vpninstance>
 
</l3vpninstances>
 
</l3vpninstances>
4.1.2 Access Interface
+
</nowiki></pre>
4.1.2.1 POST
+
 
 +
====Access Interface====
 +
=====POST=====
 
POST URI/netl3vpn/l3vpninstances/{instancename}/acifs
 
POST URI/netl3vpn/l3vpninstances/{instancename}/acifs
  
 +
<pre><nowiki>
 
<acifs>
 
<acifs>
 
   <acif>
 
   <acif>
Line 263: Line 229:
 
   </acif>
 
   </acif>
 
</acifs>
 
</acifs>
 +
</nowiki></pre>
  
 
+
=====GET=====
4.1.2.2 GET
+
* To get a single access interface
To get a single access interface
+
GET URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}.
GET URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}
 
 
No HTTP message body.
 
No HTTP message body.
  
To get one or more access interfaces
+
* To get one or more access interfaces
 
GET URI/netl3vpn/l3vpninstances/{instancename}/acifs
 
GET URI/netl3vpn/l3vpninstances/{instancename}/acifs
 +
 +
<pre><nowiki>
 
<acifs>
 
<acifs>
 
   <acif>
 
   <acif>
Line 280: Line 248:
 
   </acif>
 
   </acif>
 
</acifs>
 
</acifs>
 +
</nowiki></pre>
 +
 +
* Response
  
 Response
+
<pre><nowiki>
 
<acifs>
 
<acifs>
 
   <acif>
 
   <acif>
Line 303: Line 274:
 
   </acif>
 
   </acif>
 
</acifs>
 
</acifs>
 +
</nowiki></pre>
  
4.1.2.3 PUT
+
=====PUT=====
 
PUT URI/netl3vpn/l3vpninstances/{instancename}/acifs
 
PUT URI/netl3vpn/l3vpninstances/{instancename}/acifs
  
 +
<pre><nowiki>
 
<acifs>
 
<acifs>
 
   <acif>
 
   <acif>
Line 328: Line 301:
 
   </acif>
 
   </acif>
 
</acifs>
 
</acifs>
 +
</nowiki></pre>
 +
 +
=====DELETE=====
 +
* To delete a single access interface
 +
DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}.
 +
No HTTP message body.
 +
 +
* To delete one or more access interfaces
 +
DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs
 +
 +
<pre><nowiki>
 +
<acifs>
 +
  <acif>
 +
    <acifid>vpninstance1:port1</acifid>
 +
  </acif>
 +
  <acif>
 +
    ……
 +
  </acif>
 +
</acifs>
 +
</nowiki></pre>
 +
 +
==L2VPN Information Model==
 +
===Overview===
 +
====UML Model====
 +
<gallery>
 +
Example.jpg|High Level L2VPN Architecture
 +
</gallery>
 +
====Elements Description====
 +
The L2VPN model contains multiple VPN Instances.
 +
 +
L2VPN Instance Attributes
 +
{| class="wikitable"
 +
|-
 +
! Attribute !! Type !! Required !! CRUD !! Default Value !! Constraints !! Note
 +
|-
 +
| instanceName || Stringe || Yes || CRD || N/A || Maxlength = 32 Pattern = ([^?]*) || L2VPN instance name
 +
|-
 +
| instanceOperStatus || String enum || No || R || N/A || Up or down || Instance Operation Status
 +
|-
 +
| instanceType || String enum || No || CRU || 2PE || 2PE or 3PE || Instance type
 +
|}
 +
 +
L2VPN PW Attributes
 +
{| class="wikitable"
 +
|-
 +
! Attribute !! Type !! Required !! CRUD !! Default Value !! Constraints !! Note
 +
|-
 +
| pwRole || String enum || Yes || CR || primary || primary or backup or bypas || Pw role
 +
|-
 +
| pwOperStatus || Unsigned byte || No || R || N/A || Up or down || Pw Operation Status
 +
|}
 +
 +
L2VPN PW CX Attributes
 +
{| class="wikitable"
 +
|-
 +
! Attribute !! Type !! Required !! CRUD !! Default Value !! Constraints !! Note
 +
|-
 +
| FPID || String || Yes || CRD || N/A || Length = 0~255 || Forward Point ID
 +
|-
 +
| ForwardPeerID || String || No || CRD || N/A || Length = 0~255 || Forward peer
 +
|-
 +
| ForwardInLabel || String || No || CRD || N/A || 17~2^20 || Forward in label
 +
|-
 +
| ForwardOutLabel || String || No || CRD || N/A || 17~2^20 || Forward out labe
 +
|-
 +
| backwardPeerID || String || No || CRD || N/A || Length = 0~255 || Backward peer
 +
|-
 +
| BackwardInLabel || String || No || CRD || N/A || 17~2^20 || Backward in label
 +
|-
 +
| BackwardOutLabel || String || No || CRD || N/A || 17~2^20 || Backward out label
 +
|-
 +
| TunnelId || String || No || CRUD || N/A || Length = 0~32 || Tunnel of the PW
 +
|}
 +
 +
L2VPN AC Attributes
 +
{| class="wikitable"
 +
|-
 +
! Attribute !! Type !! Required !! CRUD !! Default Value !! Constraints !! Note
 +
|-
 +
| FPID || Stringe || Yes || CRD || N/A || Length = 0~255 || Forward Point ID
 +
|-
 +
| Interface || String || Yes || CRD || N/A || Length = 0~32 || Interface access the l2vpn
 +
|}
 +
 +
==L2VPN API example==
 +
===Restful API===
 +
====L2VPN Instance====
 +
=====POST=====
 +
POST URI/netL2VPN/vpws/netL2VPNinstances
 +
 +
<pre><nowiki>
 +
<netL2vpnInstances>
 +
  <netL2vpnInstance>
 +
    <instancename>vpninstance1</instancename>
 +
    <instanceType>2PE</instanceType>
 +
    <pws>
 +
      <pw>
 +
        <pwRole>primary</pwRole>
 +
        <cxs>
 +
          <cx>
 +
            <FPID>1.1.1.1</FPID>
 +
            <backwardPeerID>2.2.2.2</backwardPeerID>
 +
                <BackwardInLabel>1024</BackwardInLabel>
 +
                <BackwardOutLabel>1025</BackwardOutLabel>
 +
            <FPID>2.2.2.2</FPID>
 +
            <forwardPeerID>1.1.1.1</forwardPeerID>
 +
              <forwardInLabel>1025</forwardInLabel>
 +
              <forwardOutLabel>1024</forwardOutLabel>
 +
          </cx>
 +
        </cxs>
 +
      </pw>
 +
          </pws>
 +
          <acs>
 +
      <ac>
 +
          <FPID>1.1.1.1</FPID>
 +
          <Interface> Ethernet0/0/1</Interface>
 +
      </ac>
 +
          </acs>
 +
  </L2VPNinstance>
 +
  <L2VPNinstance>
 +
    ……
 +
  </L2VPNinstance>
 +
</L2VPNinstances>
 +
</nowiki></pre>
 +
 +
=====GET=====
 +
* To get all instances
 +
GET URI/netL2vpn/vpws/nstL2vpnInstances.
 +
No HTTP message body.
 +
 +
* To get a single VPN instance
 +
GET URI/netL2vpn/vpws/nstL2vpnInstances /{instancename}.
 +
No HTTP message body.
 +
 +
* To get one or more VPN instances at a time
 +
GET URI/netL2VPN/L2VPNinstances
 +
 +
<pre><nowiki>
 +
<netL2vpnInstances>
 +
  <netL2vpnInstance>
 +
    <instancename>vpninstance1</instancename>
 +
  </netL2vpnInstance>
 +
  <netL2vpnInstance>
 +
    ……
 +
  </netL2vpnInstance>
 +
</netL2vpnInstances>
 +
</nowiki></pre>
 +
 +
* Response
  
 +
<pre><nowiki>
 +
<netL2vpnInstances>
 +
  <netL2vpnInstance>
 +
    <instancename>vpninstance1</instancename>
 +
        <instanceType>2PE</instanceType>
 +
        <instanceOperStatus>up</instanceOperStatus>
 +
    <pws>
 +
      <pw>
 +
        <pwRole>primary</pwRole>
 +
            <pwOperStatus>up</pwOperStatus>
 +
        <cxs>
 +
          <cx>
 +
            <FPID>1.1.1.1</FPID>
 +
            <backwardPeerID>2.2.2.2</backwardPeerID>
 +
                <BackwardInLabel>1024</BackwardInLabel>
 +
                <BackwardOutLabel>1025</BackwardOutLabel>
 +
            <FPID>2.2.2.2</FPID>
 +
            <forwardPeerID>1.1.1.1</forwardPeerID>
 +
                <forwardInLabel>1025</forwardInLabel>
 +
                <forwardOutLabel>1024</forwardOutLabel>
 +
          </cx>
 +
        </cxs>
 +
      </pw>
 +
        </pws>
 +
        <acs>
 +
      <ac>
 +
        <FPID>1.1.1.1</FPID>
 +
        <Interface>Ethernet0/0/1</Interface>
 +
      </ac>
 +
        </acs>
 +
  </L2VPNinstance>
 +
  <L2VPNinstance>
 +
    ……
 +
  </L2VPNinstance>
 +
</L2VPNinstances>
 +
</nowiki></pre>
  
4.1.2.4 DELETE
+
=====DELETE=====
To delete a single access interface
+
* To delete a single VPN instance
DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}
+
DELETE URI/netL2vpn/vpws/netL2vpnInstances/{instancename}
 
No HTTP message body.
 
No HTTP message body.
  
To delete one or more access interfaces
+
* To delete one or more instances
DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs
+
DELETE URI/netL2vpn/vpws/netL2vpnInstances/
 +
 
 +
<pre><nowiki>
 +
<netL2vpnInstances>
 +
  <netL2vpnInstance>
 +
    <netL2vpnInstance>vpninstance1</netL2vpnInstance>
 +
  </netL2vpnInstance>
 +
  <netL2vpnInstance>
 +
    ……
 +
  </netL2vpnInstance>
 +
</netL2vpnInstances>
 +
</nowiki></pre>
 +
 
 +
====AC====
 +
=====POST=====
 +
POST URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac
 +
 
 +
<pre><nowiki>
 +
<netL2vpnInstances>
 +
  <netL2vpnInstance>
 +
    <instancename>vpninstance1</instancename>
 +
        <acs>
 +
      <ac>
 +
        <FPID>1.1.1.1</FPID>
 +
            <Interface>Ethernet0/0/1</Interface>
 +
      </ac>
 +
      <ac>
 +
        ……
 +
      </ac>
 +
        </acs>
 +
</netL2vpnInstance>
 +
</netL2vpnInstances>
 +
</nowiki></pre>
 +
 
 +
=====GET=====
 +
* To get a single access interface
 +
GET URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac.
 +
No HTTP message body.
 +
 
 +
* To get one or more access interfaces
 +
GET URI/netL2VPN/L2VPNinstances/{instancename}/acifs
 +
 
 +
<pre><nowiki>
 +
<acifs>
 +
  <acif>
 +
    <acifid>vpninstance1:port1</acifid>
 +
  </acif>
 +
  <acif>
 +
    ……
 +
  </acif>
 +
</acifs>
 +
</nowiki></pre>
 +
 
 +
* Response
 +
 
 +
<pre><nowiki>
 +
<acifs>
 +
  <acif>
 +
    <acifid>vpninstance1:port1</acifid>
 +
    <acifaddr>20.1.1.1</acifaddr>
 +
    <acifmask>24</acifmask>
 +
    <role>edge-if</role>
 +
    <username>user1</username>
 +
    <userpassword>userpass</userpassword>
 +
    <phynodeid>Node1</phynodeid>
 +
    <phyacif>Node1:Ethernet0/0/1</phyacif>
 +
    <protocol>
 +
      <protocoltype>ospf</protocoltype>
 +
      <igpattr>
 +
        <protocolid>1000</protocolid>
 +
      </igpattr>
 +
    </protocol>
 +
  </acif>
 +
  <acif>
 +
    ……
 +
  </acif>
 +
</acifs>
 +
</nowiki></pre>
 +
 
 +
=====PUT=====
 +
PUT URI/netL2VPN/L2VPNinstances/{instancename}/acifs
 +
 
 +
<pre><nowiki>
 
<acifs>
 
<acifs>
 
   <acif>
 
   <acif>
 
     <acifid>vpninstance1:port1</acifid>
 
     <acifid>vpninstance1:port1</acifid>
 +
    <acifaddr>20.1.1.1</acifaddr>
 +
    <acifmask>24</acifmask>
 +
    <role>edge-if</role>
 +
    <username>user1</username>
 +
    <userpassword>userpass</userpassword>
 +
    <phynodeid>Node1</phynodeid>
 +
    <phyacif>Node1:Ethernet0/0/1</phyacif>
 +
    <protocol>
 +
      <protocoltype>ospf</protocoltype>
 +
      <igpattr>
 +
        <protocolid>1000</protocolid>
 +
      </igpattr>
 +
    </protocol>
 
   </acif>
 
   </acif>
 
   <acif>
 
   <acif>
Line 345: Line 598:
 
   </acif>
 
   </acif>
 
</acifs>
 
</acifs>
5 Back matter
+
</nowiki></pre>
5.1 References
 
  
5.2 Release history
+
=====DELETE=====
 +
* To delete a single access interface
 +
DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs/{acifid}.
 +
No HTTP message body.
  
5.3 Contributors
+
* To delete one or more access interfaces
Xiaofeng Ji
+
DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs
Zhaozeyu
+
 
James Huang
+
<pre><nowiki>
Felix Lu
+
<acifs>
 +
  <acif>
 +
    <acifid>vpninstance1:port1</acifid>
 +
  </acif>
 +
  <acif>
 +
    ……
 +
  </acif>
 +
</acifs>
 +
</nowiki></pre>

Latest revision as of 02:40, 15 February 2015

L3VPN Information Model

Overview

UML Model

Elements Description

The L3 VPN model contains multiple VPN Instances.

L3VPN Instance

====UML Model====]

L3VPN Instance Attributes

Attribute Type Required CRUD Default Value Constraints Note
instanceName String Yes CRD N/A Maxlength = 64 Pattern = ([^?]*) L3VPN instance name
serviceType String enum No CRUD full-mesh full-mesh or hub-spoke Topology type
afType String enum No CRUD ipv4uni ipv4uni or ipv6uni Address family type: IPv4 or IPv6
acIf Id String Yes CRD N/A Length= 1~63 Access interface ID
acIfAddr String No CRUD N/A Length = 0~255 Access interface address, IPv4 or IPv6
acIfMask Unsigned byte No CRUD N/A 0 ~ 128 IP address mask length
role String enum No CRUD edge-if edge-if or center-if center-if is only available in hub-spoke mode; center-if is the interface in hub node
userName String No CRUD N/A Maxlength = 64 Pattern = ([^?]*) User name for this access interface
userPassword String No CRUD N/A Maxlength = 64 Pattern = ([^?]*) User password for the access interface
phyNodeId String No CRUD N/A Maxlength = 64 Pattern = ([^?]*) Physical node ID
phyAcIf String No CRUD N/A Maxlength = 64 Pattern = ([^?]*) hysical access interface
protocolType String enum No CRUD ospf bgp, ospf, or isis Protocol type
protocolId Unsigned int No CRUD 0 N/A Valid only when protocol is IGP; it can be AS number
remoteAsNumber String No CRUD N/A Length = 1 ~ 11 Valid only when protocol is BGP
remotePeerAddr String No CRUD N/A Length = 0~255 Valid only when protocol is BGP

L3VPN API example

Restful API

L3VPN Instance

POST

POST URI/netl3vpn/l3vpninstances

<l3vpninstances>
  <l3vpninstance>
    <instancename>vpninstance1</instancename>
    <servicetype>full-mesh</servicetype>
    <aftype>ipv4uni</aftype>
    <acifs>
      <acif>
        <acifid>vpninstance1:port1</acifid>
        <acifaddr>20.1.1.1</acifaddr>
        <acifmask>24</acifmask>
        <role>edge-if</role>
        <username>user1</username>
        <userpassword>userpass</userpassword>
        <phynodeid>Node1</phynodeid>
        <phyacif>Node1:Ethernet0/0/1</phyacif>
        <protocol>
          <protocoltype>ospf</protocoltype>
          <igpattr>
            <protocolid>1000</protocolid>
          </igpattr>
        </protocol>
      </acif>
      <acif>
        ……
      </acif>
    </acifs>
  </l3vpninstance>
  <l3vpninstance>
    ……
  </l3vpninstance>
</l3vpninstances>
GET
  • To get all instances

GET URI/netl3vpn/l3vpninstances. No HTTP message body.

  • To get a single VPN instance

GET URI/netl3vpn/l3vpninstances/{instancename}. No HTTP message body.

  • To get one or more VPN instances at a time

GET URI/netl3vpn/l3vpninstances

<l3vpninstances>
  <l3vpninstance>
    <instancename>vpninstance1</instancename>
  </l3vpninstance>
  <l3vpninstance>
    ……
  </l3vpninstance>
</l3vpninstances>
  • Response
<l3vpninstances>
  <l3vpninstance>
    <instancename>vpninstance1</instancename>
    <servicetype>full-mesh</servicetype>
    <aftype>ipv4uni</aftype>
    <acifs>
      <acif>
        <acifid>vpninstance1:port1</acifid>
        <acifaddr>20.1.1.1</acifaddr>
        <acifmask>24</acifmask>
        <role>edge-if</role>
        <username>user1</username>
        <userpassword>userpass</userpassword>
        <phynodeid>Node1</phynodeid>
        <phyacif>Node1:Ethernet0/0/1</phyacif>
        <protocol>
          <protocoltype>ospf</protocoltype>
          <igpattr>
            <protocolid>1000</protocolid>
          </igpattr>
        </protocol>
      </acif>
      <acif>
        ……
      </acif>
    </acifs>
  </l3vpninstance>
  <l3vpninstance>
    ……
  </l3vpninstance>
</l3vpninstances>
PUT

PUT URI/netl3vpn/l3vpninstances

<l3vpninstances>
  <l3vpninstance>
    <instancename>vpninstance1</instancename>
    <servicetype>full-mesh</servicetype>
    <aftype>ipv4uni</aftype>
    <acifs>
      <acif>
        <acifid>vpninstance1:port1</acifid>
        <acifaddr>20.1.1.1</acifaddr>
        <acifmask>24</acifmask>
        <role>edge-if</role>
        <username>user1</username>
        <userpassword>userpass</userpassword>
        <phynodeid>Node1</phynodeid>
        <phyacif>Node1:Ethernet0/0/1</phyacif>
        <protocol>
          <protocoltype>ospf</protocoltype>
          <igpattr>
            <protocolid>1000</protocolid>
          </igpattr>
        </protocol>
      </acif>
      <acif>
        ……
      </acif>
    </acifs>
  </l3vpninstance>
  <l3vpninstance>
    ……
  </l3vpninstance>
</l3vpninstances>
DELETE
  • To delete a single VPN instance

DELETE URI/netl3vpn/l3vpninstances/{instancename}. No HTTP message body.

  • To delete one or more instances

DELETE URI/netl3vpn/l3vpninstances

<l3vpninstances>
  <l3vpninstance>
    <instancename>vpninstance1</instancename>
  </l3vpninstance>
  <l3vpninstance>
    ……
  </l3vpninstance>
</l3vpninstances>

Access Interface

POST

POST URI/netl3vpn/l3vpninstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
    <acifaddr>20.1.1.1</acifaddr>
    <acifmask>24</acifmask>
    <role>edge-if</role>
    <username>user1</username>
    <userpassword>userpass</userpassword>
    <phynodeid>Node1</phynodeid>
    <phyacif>Node1:Ethernet0/0/1</phyacif>
    <protocol>
      <protocoltype>ospf</protocoltype>
      <igpattr>
        <protocolid>1000</protocolid>
      </igpattr>
    </protocol>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
GET
  • To get a single access interface

GET URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}. No HTTP message body.

  • To get one or more access interfaces

GET URI/netl3vpn/l3vpninstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
  • Response
<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
    <acifaddr>20.1.1.1</acifaddr>
    <acifmask>24</acifmask>
    <role>edge-if</role>
    <username>user1</username>
    <userpassword>userpass</userpassword>
    <phynodeid>Node1</phynodeid>
    <phyacif>Node1:Ethernet0/0/1</phyacif>
    <protocol>
      <protocoltype>ospf</protocoltype>
      <igpattr>
        <protocolid>1000</protocolid>
      </igpattr>
    </protocol>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
PUT

PUT URI/netl3vpn/l3vpninstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
    <acifaddr>20.1.1.1</acifaddr>
    <acifmask>24</acifmask>
    <role>edge-if</role>
    <username>user1</username>
    <userpassword>userpass</userpassword>
    <phynodeid>Node1</phynodeid>
    <phyacif>Node1:Ethernet0/0/1</phyacif>
    <protocol>
      <protocoltype>ospf</protocoltype>
      <igpattr>
        <protocolid>1000</protocolid>
      </igpattr>
    </protocol>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
DELETE
  • To delete a single access interface

DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs/{acifid}. No HTTP message body.

  • To delete one or more access interfaces

DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
  </acif>
  <acif>
    ……
  </acif>
</acifs>

L2VPN Information Model

Overview

UML Model

Elements Description

The L2VPN model contains multiple VPN Instances.

L2VPN Instance Attributes

Attribute Type Required CRUD Default Value Constraints Note
instanceName Stringe Yes CRD N/A Maxlength = 32 Pattern = ([^?]*) L2VPN instance name
instanceOperStatus String enum No R N/A Up or down Instance Operation Status
instanceType String enum No CRU 2PE 2PE or 3PE Instance type

L2VPN PW Attributes

Attribute Type Required CRUD Default Value Constraints Note
pwRole String enum Yes CR primary primary or backup or bypas Pw role
pwOperStatus Unsigned byte No R N/A Up or down Pw Operation Status

L2VPN PW CX Attributes

Attribute Type Required CRUD Default Value Constraints Note
FPID String Yes CRD N/A Length = 0~255 Forward Point ID
ForwardPeerID String No CRD N/A Length = 0~255 Forward peer
ForwardInLabel String No CRD N/A 17~2^20 Forward in label
ForwardOutLabel String No CRD N/A 17~2^20 Forward out labe
backwardPeerID String No CRD N/A Length = 0~255 Backward peer
BackwardInLabel String No CRD N/A 17~2^20 Backward in label
BackwardOutLabel String No CRD N/A 17~2^20 Backward out label
TunnelId String No CRUD N/A Length = 0~32 Tunnel of the PW

L2VPN AC Attributes

Attribute Type Required CRUD Default Value Constraints Note
FPID Stringe Yes CRD N/A Length = 0~255 Forward Point ID
Interface String Yes CRD N/A Length = 0~32 Interface access the l2vpn

L2VPN API example

Restful API

L2VPN Instance

POST

POST URI/netL2VPN/vpws/netL2VPNinstances

<netL2vpnInstances>
  <netL2vpnInstance>
    <instancename>vpninstance1</instancename>
    <instanceType>2PE</instanceType>
    <pws>
      <pw>
        <pwRole>primary</pwRole>
        <cxs>
          <cx>
            <FPID>1.1.1.1</FPID>
            <backwardPeerID>2.2.2.2</backwardPeerID>
                <BackwardInLabel>1024</BackwardInLabel>
                <BackwardOutLabel>1025</BackwardOutLabel>
            <FPID>2.2.2.2</FPID>
            <forwardPeerID>1.1.1.1</forwardPeerID>
               <forwardInLabel>1025</forwardInLabel>
               <forwardOutLabel>1024</forwardOutLabel>
          </cx>
        </cxs>
      </pw>
          </pws>
           <acs>
      <ac>
          <FPID>1.1.1.1</FPID>
          <Interface> Ethernet0/0/1</Interface>
      </ac>
          </acs>
  </L2VPNinstance>
  <L2VPNinstance>
    ……
  </L2VPNinstance>
</L2VPNinstances>
GET
  • To get all instances

GET URI/netL2vpn/vpws/nstL2vpnInstances. No HTTP message body.

  • To get a single VPN instance

GET URI/netL2vpn/vpws/nstL2vpnInstances /{instancename}. No HTTP message body.

  • To get one or more VPN instances at a time

GET URI/netL2VPN/L2VPNinstances

<netL2vpnInstances>
  <netL2vpnInstance>
    <instancename>vpninstance1</instancename>
  </netL2vpnInstance>
  <netL2vpnInstance>
    ……
  </netL2vpnInstance>
</netL2vpnInstances>
  • Response
<netL2vpnInstances>
  <netL2vpnInstance>
    <instancename>vpninstance1</instancename>
        <instanceType>2PE</instanceType>
        <instanceOperStatus>up</instanceOperStatus>
    <pws>
      <pw>
        <pwRole>primary</pwRole>
            <pwOperStatus>up</pwOperStatus>
        <cxs>
          <cx>
            <FPID>1.1.1.1</FPID>
            <backwardPeerID>2.2.2.2</backwardPeerID>
                <BackwardInLabel>1024</BackwardInLabel>
                <BackwardOutLabel>1025</BackwardOutLabel>
            <FPID>2.2.2.2</FPID>
            <forwardPeerID>1.1.1.1</forwardPeerID>
                <forwardInLabel>1025</forwardInLabel>
                <forwardOutLabel>1024</forwardOutLabel>
          </cx>
        </cxs>
      </pw>
        </pws>
        <acs>
      <ac>
        <FPID>1.1.1.1</FPID>
        <Interface>Ethernet0/0/1</Interface>
      </ac>
        </acs>
  </L2VPNinstance>
  <L2VPNinstance>
    ……
  </L2VPNinstance>
</L2VPNinstances>
DELETE
  • To delete a single VPN instance

DELETE URI/netL2vpn/vpws/netL2vpnInstances/{instancename} No HTTP message body.

  • To delete one or more instances

DELETE URI/netL2vpn/vpws/netL2vpnInstances/

<netL2vpnInstances>
  <netL2vpnInstance>
    <netL2vpnInstance>vpninstance1</netL2vpnInstance>
  </netL2vpnInstance>
  <netL2vpnInstance>
    ……
  </netL2vpnInstance>
</netL2vpnInstances>

AC

POST

POST URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac

<netL2vpnInstances>
  <netL2vpnInstance>
    <instancename>vpninstance1</instancename>
        <acs>
      <ac>
        <FPID>1.1.1.1</FPID>
            <Interface>Ethernet0/0/1</Interface>
      </ac>
      <ac>
         ……
      </ac>
        </acs>
</netL2vpnInstance>
</netL2vpnInstances>
GET
  • To get a single access interface

GET URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac. No HTTP message body.

  • To get one or more access interfaces

GET URI/netL2VPN/L2VPNinstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
  • Response
<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
    <acifaddr>20.1.1.1</acifaddr>
    <acifmask>24</acifmask>
    <role>edge-if</role>
    <username>user1</username>
    <userpassword>userpass</userpassword>
    <phynodeid>Node1</phynodeid>
    <phyacif>Node1:Ethernet0/0/1</phyacif>
    <protocol>
      <protocoltype>ospf</protocoltype>
      <igpattr>
        <protocolid>1000</protocolid>
      </igpattr>
    </protocol>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
PUT

PUT URI/netL2VPN/L2VPNinstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
    <acifaddr>20.1.1.1</acifaddr>
    <acifmask>24</acifmask>
    <role>edge-if</role>
    <username>user1</username>
    <userpassword>userpass</userpassword>
    <phynodeid>Node1</phynodeid>
    <phyacif>Node1:Ethernet0/0/1</phyacif>
    <protocol>
      <protocoltype>ospf</protocoltype>
      <igpattr>
        <protocolid>1000</protocolid>
      </igpattr>
    </protocol>
  </acif>
  <acif>
    ……
  </acif>
</acifs>
DELETE
  • To delete a single access interface

DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs/{acifid}. No HTTP message body.

  • To delete one or more access interfaces

DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs

<acifs>
  <acif>
    <acifid>vpninstance1:port1</acifid>
  </acif>
  <acif>
    ……
  </acif>
</acifs>