module inter-vpn-link { namespace "urn:opendaylight:params:xml:ns:yang:netvirt:inter-vpn-link"; prefix "inter-vpn-link"; import ietf-inet-types { prefix inet; revision-date "2013-07-15"; } import ietf-yang-types { prefix yang; } import config { prefix config; revision-date 2013-04-05; } description "Service definition for inter-vpn-link project"; revision "2016-03-11" { description "Initial revision"; } grouping vpn-endpoint-attribs { leaf vpn-uuid { mandatory "true"; type yang:uuid; description "UUID of the VPN to which this endpoint belongs to"; } leaf ip-address { mandatory "true"; type inet:ipv4-address; description "IP address of the endpoint"; } } grouping vpn-endpoint-state-attribs { leaf vpn-uuid { type yang:uuid; description "UUID of the VPN to which this endpoint belongs to"; } leaf-list dp-id { type uint64; description "list of DPNs where this endpoint of the Link has been instantiated"; } leaf lport-tag { type uint16; } } container inter-vpn-links { list inter-vpn-link { key "name"; max-elements "unbounded"; min-elements "0"; leaf name { mandatory "true"; type string; description "Inter VPN link name"; } container first-endpoint { uses vpn-endpoint-attribs; } container second-endpoint { uses vpn-endpoint-attribs; } leaf bgp-routes-leaking { mandatory "true"; type boolean; description "Flag to enable the leaking of BGP routes learnt from one VPN to another VPN"; } must "first-endpoint and second-endpoint"; // To ensure both endpoints are present } } container inter-vpn-link-states { list inter-vpn-link-state { key "inter-vpn-link-name"; leaf inter-vpn-link-name { type string; } leaf state { type enumeration { enum active; enum error; } description "Holds the current state of the InterVPN Link"; } container first-endpoint-state { uses vpn-endpoint-state-attribs; } container second-endpoint-state { uses vpn-endpoint-state-attribs; } leaf error-description { type string; } } } notification inter-vpn-link-creation-error { container inter-vpn-link-creation-error-message { leaf error-message { type "string"; } } } }