Neutron/sdnapi
1. L3VPN Information Model
1.1 Overview 1.1.1 UML Model
Figure 1 High Level L3VPN Architecture 1.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
<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>
4.1.1.2 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>
4.1.1.3 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>
4.1.1.4 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> 4.1.2 Access Interface 4.1.2.1 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>
4.1.2.2 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>
4.1.2.3 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>
4.1.2.4 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>