module neutronvpn { namespace "urn:opendaylight:vpnservice:neutronvpn"; prefix neutronvpn; import ietf-yang-types { prefix "yang"; } 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 tenant-id { type yang:uuid; description "The UUID of the tenant that will own the subnet."; } leaf network-id { type yang:uuid; description "UUID representing the network "; } leaf router-id { type yang:uuid; description "router to which this subnet belongs"; } leaf vpn-id { type yang:uuid; description "VPN to which this subnet belongs"; } leaf-list 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 l3vpn-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."; } leaf router-id { type yang:uuid; description "UUID of router "; } leaf-list network-ids { type yang:uuid; description "UUID representing the network "; } } 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."; } 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-port-data { list port-name-to-port-uuid { key port-name; leaf port-id { type yang:uuid;} leaf port-name { type string;} } list port-fixedip-to-port-name { key port-fixedip; leaf port-name { type string;} leaf port-fixedip { type string;} } } rpc createL3VPN{ description "Create one or more L3 VPN"; input { list l3vpn { uses l3vpn-instance; } } output { leaf-list response { type string; description "Status response for createVPN RPC"; } } } rpc associateRouter { description "associates a router with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } leaf router-id { type yang:uuid; mandatory "true"; description "vpn-id"; } } } rpc dissociateRouter { description "dissociates a router with L3VPN"; input { leaf vpn-id { type yang:uuid; mandatory "true"; description "vpn-id"; } leaf router-id { type yang:uuid; mandatory "true"; description "router-id"; } } } 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 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 l3vpn-instance; } } } }