Merge "Upgrade ietf-{inet,yang}-types to 2013-07-15"
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface.yang
index 609c11472d5941bcd744b5cf91bf91c00dba1045..9c226141b25b12b8fb7f5658b69287ac4d9608b9 100644 (file)
@@ -17,12 +17,15 @@ module odl-interface {
 
     import ietf-inet-types {
         prefix inet;
+        revision-date "2013-07-15";
     }
 
     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;
     }
@@ -47,14 +50,13 @@ module odl-interface {
         reference "MPLS interface";
     }
 
+    /* Tunnel (GRE, VxLAN) logical port */
     identity l3tunnel {
         status deprecated;
         base if:interface-type;
-        reference
-        "l3 tunnel interface";
+        reference "l3 tunnel interface";
     }
 
-    /* Tunnel (GRE, VxLAN) logical port */
     identity tunnel-type-base {
         description "Base identity for all tunnel-types";
     }
@@ -69,6 +71,11 @@ module odl-interface {
         base tunnel-type-base;
     }
 
+    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;
@@ -90,6 +97,19 @@ module odl-interface {
             type string;
             description "can be a physical switch port or virtual switch port e.g. neutron port";
         }
+
+        list node-identifier {
+            key "topology-id";
+            description "an identifier of the dependant underlying configuration protocol";
+            leaf "topology-id" {
+                type string;
+                description "can be ovsdb configuration protocol";
+            }
+            leaf "node-id" {
+                type string;
+                description "can be hwvtep configuration protocol";
+            }
+        }
     }
 
     /* interface type specific properties */
@@ -99,9 +119,44 @@ module odl-interface {
         ext:augment-identifier "if-l2vlan";
         when "if:type = 'ianaift:l2vlan'";
         leaf vlan-id {
-            type uint16 {
-                range "1..4094";
+            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.";
+                }
             }
+            default "trunk";
         }
     }
 
@@ -120,6 +175,13 @@ module odl-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;
@@ -140,6 +202,16 @@ module odl-interface {
             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" {
@@ -152,6 +224,7 @@ module odl-interface {
                 base tunnel-type-base;
             }
         }
+
         leaf local-ip {
             type inet:ip-address;
             description "Local Endpoint IP address";
@@ -167,6 +240,7 @@ module odl-interface {
             description "gateway IP address";
         }
     }
+
     /* MPLS logical port */
     augment "/if:interfaces/if:interface" {
         ext:augment-identifier "if-mpls";
@@ -182,4 +256,4 @@ module odl-interface {
             }
         }
     }
-}
\ No newline at end of file
+}