module neutronvpn { namespace "urn:opendaylight:netvirt:neutronvpn"; prefix neutronvpn; import ietf-yang-types { prefix yang; revision-date "2013-07-15";} revision "2015-06-02" { description "Neutron based L3Service Module, provides integration of ODL VPN service with Neutron NSF"; } container subnetmaps{ list subnetmap { key id; leaf id { type yang:uuid; description "UUID representing the subnet "; } leaf subnet-ip { type string; description "Specifies the subnet IP in CIDR format"; } uses network-attributes; leaf tenant-id { type yang:uuid; description "The UUID of the tenant that will own the subnet."; } leaf router-id { type yang:uuid; description "router to which this subnet belongs"; } leaf router-interface-port-id { type yang:uuid; description "port corresponding to router interface on this subnet"; } leaf router-intf-mac-address { type string; description "router interface mac address on this subnet"; } leaf router-interface-fixed-ip { type string; description "fixed ip of the router interface port on this subnet"; } leaf vpn-id { type yang:uuid; description "VPN to which this subnet belongs"; } leaf internet-vpn-id { type yang:uuid; description "internet VPN to which this IPv6 subnet belongs"; } leaf-list port-list { type yang:uuid; } leaf-list direct-port-list{ type yang:uuid; } } } container networkMaps{ list networkMap { key network-id; leaf network-id { type yang:uuid; description "UUID representing the network"; } leaf-list subnet-id-list { type yang:uuid; description "List of UUIDs representing the subnets associated to the network"; } } } grouping vpn-instance{ leaf id { mandatory "true"; type yang:uuid; description "vpn-id"; } leaf name { type string; description "VPN name"; } leaf tenant-id { type yang:uuid; description "The UUID of the tenant that will own the subnet."; } leaf-list route-distinguisher { type string; description "configures a route distinguisher (RD) for the VPN instance. Format is ASN:nn or IP-address:nn."; } leaf-list import-RT { type string; description "configures a list of import route target. Format is ASN:nn or IP-address:nn."; } leaf-list export-RT{ type string; description "configures a list of export route targets. Format is ASN:nn or IP-address:nn."; } list router-ids { key "router-id"; leaf router-id { type yang:uuid; description "UUID of router "; } } leaf-list network-ids { type yang:uuid; description "UUID representing the network "; } leaf l3vni { type uint32; } } grouping network-attributes { leaf network-id { type yang:uuid; description "UUID representing the network"; } leaf network-type { type enumeration { enum "FLAT"; enum "VLAN"; enum "VXLAN"; enum "GRE"; } } leaf segmentation-id { type uint32; description "Optional. Isolated segment on the physical network. If segment-type is vlan, this ID is a vlan identifier. If segment-type is vxlan, this ID is a vni. If segment-type is flat/gre, this ID is set to 0"; } leaf external { type boolean; default false;} } container vpnMaps { list vpnMap { key vpn-id; leaf vpn-id { type yang:uuid; description "vpn-id"; } leaf name { type string; description "vpn name"; } leaf tenant-id { type yang:uuid; description "The UUID of the tenant that will own the subnet."; } list router-ids { key "router-id"; leaf router-id { type yang:uuid; description "UUID of router "; } } leaf-list network_ids { type yang:uuid; description "UUID representing the network "; } } } /* Data models to adhere to restart requirements */ container neutron-vpn-portip-port-data { config true; list vpn-portip-to-port { key "vpn-name port-fixedip"; leaf vpn-name { type string;} leaf port-fixedip { type string;} leaf port-name { type string;} leaf mac-address { type string;} leaf subnet-ip { type boolean;} leaf learnt-ip { type boolean; default false;} } } container neutron-vpn-port-id-subport-data { config true; list port-id-to-subport { key port-id; leaf port-id { type yang:uuid; } leaf vlan-id { type uint32; } leaf trunk-port-id { type yang:uuid; } } } container router-interfaces-map { list router-interfaces { key router-id; leaf router-id { type yang:uuid; } list interfaces { key interface-id; leaf interface-id { type string; } } } } /* container for DHCP Configuration */ container dhcp-config { list configs { key "lease-duration default-domain"; leaf lease-duration { type int32; description "default lease duration for dhcp lease. -1 means infinite"; } leaf default-domain { type string; description "default domain-name. used in dhcp reply"; } } } rpc createL3VPN{ description "Create one or more L3VPN(s)"; input { list l3vpn { uses vpn-instance; } } output { leaf-list response { type string; description "Status response for createVPN RPC"; } } } rpc createEVPN { description "Create one or more EVPN(s)"; input { list evpn { uses evpn-instance; } } output { leaf-list response { type string; description "Status response for createEVPN RPC"; } } } grouping evpn-instance { leaf id { mandatory "true"; type yang:uuid; description "evpn-id"; } leaf name { type string; description "EVPN name"; } leaf tenant-id { type yang:uuid; description "The UUID of the tenant that will own the subnet."; } leaf-list route-distinguisher { type string; description "configures a route distinguisher (RD) for the EVPN instance. Format is ASN:nn or IP-address:nn."; } leaf-list import-RT { type string; description "configures a list of import route target. Format is ASN:nn or IP-address:nn."; } leaf-list export-RT{ type string; description "configures a list of export route targets. Format is ASN:nn or IP-address:nn."; } } rpc associateRouter { description "associates a router with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } list router-ids { key "router-id"; min-elements "1"; description "list of router-ids to be associated with the vpn"; leaf router-id { type yang:uuid; } } } } rpc dissociateRouter { description "dissociates a router with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } list router-ids { key "router-id"; min-elements "1"; description "list of router-ids to be dissociated from the vpn"; leaf router-id { type yang:uuid; } } } } rpc associateNetworks { description "associates a list of networks with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } leaf-list network-id { type yang:uuid; description "network-id"; } } output { leaf response { type string; description "Status response for associateNetworks RPC"; } } } rpc dissociateNetworks{ description "dissociates a list of networks with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } leaf-list network-id { type yang:uuid; description "network-id"; } } output { leaf response { type string; description "Status response for dissociateNetworks RPC"; } } } rpc getEVPN{ description "returns EVPN configuration"; input { leaf id { type yang:uuid; description "evpn-id"; } } output { list evpn-instances { uses evpn-instance; } } } rpc deleteEVPN{ description "delete EVPNs for specified Id list"; input { leaf-list id { type yang:uuid; description "evpn-id"; } } output { leaf-list response { type string; description "Status response for deleteEVPN RPC"; } } } rpc deleteL3VPN{ description "delete VPNs for specified Id list"; input { leaf-list id { type yang:uuid; description "vpn-id"; } } output { leaf-list response { type string; description "Status response for deleteL3VPN RPC"; } } } rpc getL3VPN{ description "returns VPN configuration"; input { leaf id { type yang:uuid; description "vpn-id"; } } output { list l3vpn-instances { uses vpn-instance; } } } rpc get-fixedIPs-for-neutron-port { description "returns neutron port fixed IPs"; input { leaf port-id { type yang:uuid; } } output { leaf-list fixedIPs { type string; description "The neutron port fixedIPs list corresponding to the port uuid"; } } } }