Difference between revisions of "Neutron/sdnapi"
Line 52: | Line 52: | ||
POST URI/netl3vpn/l3vpninstances | POST URI/netl3vpn/l3vpninstances | ||
+ | <pre><nowiki> | ||
<l3vpninstances> | <l3vpninstances> | ||
<l3vpninstance> | <l3vpninstance> | ||
Line 83: | Line 84: | ||
</l3vpninstance> | </l3vpninstance> | ||
</l3vpninstances> | </l3vpninstances> | ||
+ | </nowiki></pre> | ||
=====GET===== | =====GET===== | ||
Line 96: | Line 98: | ||
GET URI/netl3vpn/l3vpninstances | GET URI/netl3vpn/l3vpninstances | ||
+ | <pre><nowiki> | ||
<l3vpninstances> | <l3vpninstances> | ||
<l3vpninstance> | <l3vpninstance> | ||
Line 104: | Line 107: | ||
</l3vpninstance> | </l3vpninstance> | ||
</l3vpninstances> | </l3vpninstances> | ||
+ | </nowiki></pre> | ||
* Response | * Response | ||
+ | <pre><nowiki> | ||
<l3vpninstances> | <l3vpninstances> | ||
<l3vpninstance> | <l3vpninstance> | ||
Line 137: | Line 142: | ||
</l3vpninstance> | </l3vpninstance> | ||
</l3vpninstances> | </l3vpninstances> | ||
+ | </nowiki></pre> | ||
=====PUT===== | =====PUT===== | ||
PUT URI/netl3vpn/l3vpninstances | PUT URI/netl3vpn/l3vpninstances | ||
+ | <pre><nowiki> | ||
<l3vpninstances> | <l3vpninstances> | ||
<l3vpninstance> | <l3vpninstance> | ||
Line 172: | Line 179: | ||
</l3vpninstance> | </l3vpninstance> | ||
</l3vpninstances> | </l3vpninstances> | ||
+ | </nowiki></pre> | ||
=====DELETE===== | =====DELETE===== | ||
Line 181: | Line 189: | ||
DELETE URI/netl3vpn/l3vpninstances | DELETE URI/netl3vpn/l3vpninstances | ||
+ | <pre><nowiki> | ||
<l3vpninstances> | <l3vpninstances> | ||
<l3vpninstance> | <l3vpninstance> | ||
Line 189: | Line 198: | ||
</l3vpninstance> | </l3vpninstance> | ||
</l3vpninstances> | </l3vpninstances> | ||
+ | </nowiki></pre> | ||
====Access Interface==== | ====Access Interface==== | ||
Line 194: | Line 204: | ||
POST URI/netl3vpn/l3vpninstances/{instancename}/acifs | POST URI/netl3vpn/l3vpninstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 215: | Line 226: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
=====GET===== | =====GET===== | ||
Line 224: | Line 236: | ||
GET URI/netl3vpn/l3vpninstances/{instancename}/acifs | GET URI/netl3vpn/l3vpninstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 232: | Line 245: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
* Response | * Response | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 256: | Line 271: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
=====PUT===== | =====PUT===== | ||
PUT URI/netl3vpn/l3vpninstances/{instancename}/acifs | PUT URI/netl3vpn/l3vpninstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 281: | Line 298: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
=====DELETE===== | =====DELETE===== | ||
Line 290: | Line 308: | ||
DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs | DELETE URI/netl3vpn/l3vpninstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 298: | Line 317: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
==L2VPN Information Model== | ==L2VPN Information Model== | ||
Line 363: | Line 383: | ||
POST URI/netL2VPN/vpws/netL2VPNinstances | POST URI/netL2VPN/vpws/netL2VPNinstances | ||
+ | <pre><nowiki> | ||
<netL2vpnInstances> | <netL2vpnInstances> | ||
<netL2vpnInstance> | <netL2vpnInstance> | ||
Line 395: | Line 416: | ||
</L2VPNinstance> | </L2VPNinstance> | ||
</L2VPNinstances> | </L2VPNinstances> | ||
+ | </nowiki></pre> | ||
=====GET===== | =====GET===== | ||
Line 408: | Line 430: | ||
GET URI/netL2VPN/L2VPNinstances | GET URI/netL2VPN/L2VPNinstances | ||
+ | <pre><nowiki> | ||
<netL2vpnInstances> | <netL2vpnInstances> | ||
< netL2vpnInstance> | < netL2vpnInstance> | ||
Line 416: | Line 439: | ||
</netL2vpnInstance> | </netL2vpnInstance> | ||
</netL2vpnInstances> | </netL2vpnInstances> | ||
+ | </nowiki></pre> | ||
* Response | * Response | ||
+ | <pre><nowiki> | ||
<netL2vpnInstances> | <netL2vpnInstances> | ||
<netL2vpnInstance> | <netL2vpnInstance> | ||
Line 453: | Line 478: | ||
</L2VPNinstance> | </L2VPNinstance> | ||
</L2VPNinstances> | </L2VPNinstances> | ||
+ | </nowiki></pre> | ||
=====DELETE===== | =====DELETE===== | ||
Line 462: | Line 488: | ||
DELETE URI/netL2vpn/vpws/netL2vpnInstances/ | DELETE URI/netL2vpn/vpws/netL2vpnInstances/ | ||
+ | <pre><nowiki> | ||
<netL2vpnInstances> | <netL2vpnInstances> | ||
<netL2vpnInstance> | <netL2vpnInstance> | ||
Line 470: | Line 497: | ||
</ netL2vpnInstance > | </ netL2vpnInstance > | ||
</ netL2vpnInstances > | </ netL2vpnInstances > | ||
+ | </nowiki></pre> | ||
====AC==== | ====AC==== | ||
Line 475: | Line 503: | ||
POST URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac | POST URI/netL2VPN/vpws/netL2vpnInstances/{instancename}/acs/ac | ||
+ | <pre><nowiki> | ||
<netL2vpnInstances> | <netL2vpnInstances> | ||
<netL2vpnInstance> | <netL2vpnInstance> | ||
Line 489: | Line 518: | ||
</netL2vpnInstance> | </netL2vpnInstance> | ||
</netL2vpnInstances> | </netL2vpnInstances> | ||
+ | </nowiki></pre> | ||
=====GET===== | =====GET===== | ||
Line 498: | Line 528: | ||
GET URI/netL2VPN/L2VPNinstances/{instancename}/acifs | GET URI/netL2VPN/L2VPNinstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 506: | Line 537: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
* Response | * Response | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 530: | Line 563: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
=====PUT===== | =====PUT===== | ||
PUT URI/netL2VPN/L2VPNinstances/{instancename}/acifs | PUT URI/netL2VPN/L2VPNinstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 555: | Line 590: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> | ||
=====DELETE===== | =====DELETE===== | ||
Line 564: | Line 600: | ||
DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs | DELETE URI/netL2VPN/L2VPNinstances/{instancename}/acifs | ||
+ | <pre><nowiki> | ||
<acifs> | <acifs> | ||
<acif> | <acif> | ||
Line 572: | Line 609: | ||
</acif> | </acif> | ||
</acifs> | </acifs> | ||
+ | </nowiki></pre> |
Revision as of 09:28, 13 February 2015
Contents
L3VPN Information Model
Overview
UML Model
- Example.jpg
High Level L3VPN Architecture
Elements Description
The L3 VPN model contains multiple VPN Instances.
L3VPN Instance
====UML Model====]
- Example.jpg
L3VPN Instance Model
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
- Example.jpg
High Level L2VPN Architecture
Elements Description
The L2VPN model contains multiple VPN Instances.
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 |
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 |
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 | Example | No | CRUD | N/A | Length = 0~32 | Tunnel of the PW |
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>