Neutron/sdnapi
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>