v3po: fix issues found by pyang 01/11301/1
authorMarek Gradzki <mgradzki@cisco.com>
Thu, 22 Mar 2018 11:48:19 +0000 (12:48 +0100)
committerMarek Gradzki <mgradzki@cisco.com>
Thu, 22 Mar 2018 12:53:38 +0000 (13:53 +0100)
Change-Id: Icbe45830641ba89a1e136401528acdb2b836d12e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
v3po/api/src/main/yang/pbb-types@2016-12-14.yang
v3po/api/src/main/yang/subinterface-span@2017-06-07.yang [moved from v3po/api/src/main/yang/subinterface-span@2017-05-10.yang with 95% similarity]
v3po/api/src/main/yang/unnumbered-interfaces@2018-01-03.yang
v3po/api/src/main/yang/v3po@2017-06-07.yang
v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang
v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang

index 8c3aad4..cb9fbb1 100644 (file)
@@ -3,23 +3,15 @@ module pbb-types {
   namespace "urn:opendaylight:params:xml:ns:yang:pbb-types";
   prefix "pbb-types";
 
-  description "Common types used for defining Pbb based subinterfaces";
-
-  revision "2016-12-14" {
-          description
-              "Initial revision.";
-  }
-
   import ietf-yang-types {
       prefix yang;
   }
 
-  import ietf-interfaces {
-      prefix if;
-  }
+  description "Common types used for defining Pbb based subinterfaces";
 
-  import yang-ext {
-      prefix "ext";
+  revision "2016-12-14" {
+          description
+              "Initial revision.";
   }
 
   typedef operation {
@@ -3,28 +3,32 @@ module subinterface-span {
   namespace "urn:opendaylight:params:xml:ns:yang:subinterface-span";
   prefix "subif-span";
 
-  revision "2017-05-10" {
-    description
-      "Initialial revision that adds support for mirroring interfaces on subinterfaces.
-       Vpp implementation allows/implements only two cases:
-        - Src: interface |Dst: interface - covered in v3po.yang
-        - Src: interface |Dst: subinterface - covered by this model";
+  import ietf-interfaces {
+    prefix "if";
   }
 
-  revision "2017-06-07" {
-    description "Eliminated config leafrefs in operational tree";
+  import vpp-vlan {
+    prefix "vpp-vlan";
+  }
+
+  import yang-ext {
+    prefix "ext";
   }
 
   import v3po {
     prefix "v3po";
   }
 
-  import vpp-vlan {
-    prefix "vpp-vlan";
+  revision "2017-06-07" {
+    description "Eliminated config leafrefs in operational tree";
   }
 
-  import yang-ext {
-    prefix "ext";
+  revision "2017-05-10" {
+    description
+      "Initialial revision that adds support for mirroring interfaces on subinterfaces.
+       Vpp implementation allows/implements only two cases:
+        - Src: interface |Dst: interface - covered in v3po.yang
+        - Src: interface |Dst: subinterface - covered by this model";
   }
 
   augment /if:interfaces/if:interface/vpp-vlan:sub-interfaces/vpp-vlan:sub-interface {
index 391e053..515573e 100644 (file)
@@ -3,16 +3,6 @@ module unnumbered-interfaces {
   namespace "urn:opendaylight:params:xml:ns:yang:unnumbered:interfaces";
   prefix "uni";
 
-  revision "2018-01-03" {
-    description
-      "Use if:interface-ref for name of the interface which provides IP.";
-  }
-
-  revision "2017-05-10" {
-    description
-      "Initialial revision";
-  }
-
   import ietf-interfaces {
     prefix "if";
   }
@@ -25,6 +15,16 @@ module unnumbered-interfaces {
     prefix "ext";
   }
 
+  revision "2018-01-03" {
+    description
+      "Use if:interface-ref for name of the interface which provides IP.";
+  }
+
+  revision "2017-05-10" {
+    description
+      "Initialial revision";
+  }
+
   grouping unnumbered-config-attributes {
     container unnumbered {
       presence "Sets interface as unnumbered";
index 58ef068..e05c804 100644 (file)
@@ -3,6 +3,22 @@ module v3po {
   namespace "urn:opendaylight:params:xml:ns:yang:v3po";
   prefix "v3po";
 
+  import iana-if-type {
+    prefix "ianaift";
+  }
+  import ietf-interfaces {
+    prefix "if";
+  }
+  import ietf-yang-types {
+    prefix "yang";
+  }
+  import ietf-inet-types {
+    prefix "inet";
+  }
+  import yang-ext {
+    prefix "ext";
+  }
+
   revision "2017-06-07" {
     description "Eliminated config leafrefs in operational tree";
   }
@@ -30,25 +46,6 @@ module v3po {
     description "Initial revision of v3po model";
   }
 
-  import iana-if-type {
-    prefix "ianaift";
-  }
-  import ietf-interfaces {
-    prefix "if";
-  }
-  import ietf-yang-types {
-    prefix "yang";
-  }
-  import ietf-inet-types {
-    prefix "inet";
-  }
-  import ietf-ip {
-    prefix "ip";
-  }
-  import yang-ext {
-    prefix "ext";
-  }
-
   typedef bridge-domain-ref {
     type leafref {
       path "/bridge-domains/bridge-domain/name";
index d3ca160..7301b86 100644 (file)
@@ -3,8 +3,8 @@ module vpp-pbb {
   namespace "urn:opendaylight:params:xml:ns:yang:vpp-pbb";
   prefix "vpp-pbb";
 
-  revision "2016-12-14" {
-    description "Initial revision of pbb model";
+  import ietf-interfaces {
+    prefix "if";
   }
 
   import pbb-types {
@@ -15,6 +15,10 @@ module vpp-pbb {
     prefix "ext";
   }
 
+  revision "2016-12-14" {
+    description "Initial revision of pbb model";
+  }
+
   augment /if:interfaces/if:interface {
      ext:augment-identifier "pbb-rewrite-interface-augmentation";
      container pbb-rewrite{
index a919580..53d657e 100644 (file)
@@ -3,6 +3,25 @@ module vpp-vlan {
   namespace "urn:opendaylight:params:xml:ns:yang:vpp:vlan";
   prefix "vpp-vlan";
 
+  import ietf-interfaces {
+    prefix "if";
+  }
+  import ietf-inet-types {
+    prefix inet;
+  }
+  import ietf-yang-types {
+    prefix "yang";
+  }
+  import yang-ext {
+    prefix "ext";
+  }
+  import dot1q-types {
+    prefix dot1q;
+  }
+  import v3po {
+    prefix v3po;
+  }
+
   revision "2018-03-19" {
     description "Prefix invalid 802dot1q and 802dot1ad identifiers with underscore.";
   }
@@ -34,25 +53,6 @@ module vpp-vlan {
      Reuses some concepts from draft-wilton-netmod-intf-vlan-yang-02 model.";
   }
 
-  import ietf-interfaces {
-    prefix "if";
-  }
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import ietf-yang-types {
-    prefix "yang";
-  }
-  import yang-ext {
-    prefix "ext";
-  }
-  import dot1q-types {
-    prefix dot1q;
-  }
-  import v3po {
-    prefix v3po;
-  }
-
   typedef sub-interface-status {
     type enumeration {
       enum "up";