X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=interfacemgr%2Finterfacemgr-api%2Fsrc%2Fmain%2Fyang%2Fodl-interface.yang;h=29994dafdc8937b8f29842a81f3e1f3595ae018b;hb=87e2fa78b8c887ce9b68442ef3af219fef6126a7;hp=78816c8d03a55984835b65670c308ed0a85f0389;hpb=d4a3b9f6268942ba8e22fadfda58fd9a950875aa;p=vpnservice.git diff --git a/interfacemgr/interfacemgr-api/src/main/yang/odl-interface.yang b/interfacemgr/interfacemgr-api/src/main/yang/odl-interface.yang index 78816c8d..29994daf 100644 --- a/interfacemgr/interfacemgr-api/src/main/yang/odl-interface.yang +++ b/interfacemgr/interfacemgr-api/src/main/yang/odl-interface.yang @@ -1,4 +1,3 @@ - module odl-interface { namespace "urn:opendaylight:vpnservice:interfacemgr"; @@ -18,12 +17,15 @@ module odl-interface { import ietf-inet-types { prefix inet; + revision-date "2010-09-24"; } import opendaylight-inventory { prefix inv; revision-date 2013-08-19; } + import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27";} + import config { prefix config; revision-date 2013-04-05; } @@ -32,25 +34,29 @@ module odl-interface { description "ODL Interface Manager Module"; } + identity odl-interface { + status deprecated; + base "config:service-type"; + config:java-class "org.opendaylight.vpnservice.interfacemgr.interfaces.IInterfaceManager"; + } + identity stacked-vlan { base if:interface-type; - reference - "Q-in-Q interface"; + reference "Q-in-Q interface"; } - identity l3tunnel { + identity mpls { base if:interface-type; - reference - "l3 tunnel interface"; + reference "MPLS interface"; } - identity mpls { + /* Tunnel (GRE, VxLAN) logical port */ + identity l3tunnel { + status deprecated; base if:interface-type; - reference - "MPLS interface"; + reference "l3 tunnel interface"; } - /* l3Tunnel (GRE, VxLAN) logical port */ identity tunnel-type-base { description "Base identity for all tunnel-types"; } @@ -65,25 +71,31 @@ module odl-interface { base tunnel-type-base; } - identity odl-interface { - base "config:service-type"; - config:java-class "org.opendaylight.vpnservice.interfacemgr.interfaces.IInterfaceManager"; + identity tunnel-type-mpls-over-gre { + description "Tunnel type for mpls over gre tunnels"; + base tunnel-type-base; } /* base/common properties */ augment "/if:interfaces/if:interface" { + status deprecated; ext:augment-identifier "base-ids"; leaf of-port-id { type inv:node-connector-id; description "can be a physical switch port or virtual switch port e.g. neutron port"; } - leaf tenant-id { + } + + augment "/if:interfaces/if:interface" { + ext:augment-identifier "parent-refs"; + leaf datapath-node-identifier { + type uint64; + description "can be a physical switch identifier (optional)"; + } + + leaf parent-interface { type string; - description "Tenant that owns particular interface"; - } /* optional */ - leaf base-interface { - type if:interface-ref; - description "some interfaces need a reference to parent interface "; + description "can be a physical switch port or virtual switch port e.g. neutron port"; } } @@ -94,13 +106,42 @@ module odl-interface { ext:augment-identifier "if-l2vlan"; when "if:type = 'ianaift:l2vlan'"; leaf vlan-id { - type uint16 { - range "1..4094"; - } - must "../base-interface" { - description - "If a vlan-id is defined, a base-interface must - be specified."; + type ethertype:vlan-id; + } + + leaf l2vlan-mode { + description "The VLAN mode of the L2Vlan Interface."; + type enumeration { + enum "access" { + value 1; + description + "The VLAN mode access."; + } + enum "native-tagged" { + value 2; + description + "The VLAN mode native-tagged."; + } + enum "native-untagged" { + value 3; + description + "The VLAN mode native-untagged."; + } + enum "trunk" { + value 4; + description + "The VLAN mode trunk."; + } + enum "trunk-member" { + value 5; + description + "The VLAN mode trunk-member."; + } + enum "transparent" { + value 6; + description + "The VLAN mode transparent."; + } } } } @@ -108,20 +149,59 @@ module odl-interface { /* Q-in-Q logical port */ augment "/if:interfaces/if:interface" { ext:augment-identifier "if-stacked-vlan"; - when "if:type = 'stacked_vlan'"; + when "if:type = 'stacked-vlan'"; leaf stacked_vlan-id { type uint16 { range "1..4094"; } - must "../base-interface" { - description - "If a vlan-id is defined, a base-interface must - be specified."; + } + } + + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-tunnel"; + when "if:type = 'ianaift:tunnel'"; + + leaf internal { + type boolean; + default "false"; + description + "represents whether this is an internal or external tunnel."; + } + + leaf tunnel-interface-type { + type identityref { + base tunnel-type-base; } } + + leaf tunnel-source { + type inet:ip-address; + description "Local Endpoint IP address"; + } + + leaf tunnel-destination { + type inet:ip-address; + description "Remote Endpoint IP address"; + } + + leaf tunnel-gateway { + type inet:ip-address; + description "gateway IP address"; + } + + leaf monitor-enabled { + type boolean; + default false; + } + + leaf monitor-interval { + type uint32; + default 10000; + } } augment "/if:interfaces/if:interface" { + status deprecated; ext:augment-identifier "if-l3tunnel"; when "if:type = 'ianaift:l3tunnel'"; @@ -130,6 +210,7 @@ module odl-interface { base tunnel-type-base; } } + leaf local-ip { type inet:ip-address; description "Local Endpoint IP address"; @@ -144,10 +225,8 @@ module odl-interface { type inet:ip-address; description "gateway IP address"; } - } - /* MPLS logical port */ augment "/if:interfaces/if:interface" { ext:augment-identifier "if-mpls"; @@ -163,5 +242,4 @@ module odl-interface { } } } - -} +} \ No newline at end of file