Port and statistics models updated. 69/1469/3
authorPrasanna Huddar <prasanna.huddar@ericsson.com>
Fri, 27 Sep 2013 17:12:23 +0000 (22:42 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 30 Sep 2013 09:41:14 +0000 (09:41 +0000)
Will add port service types later

Signed-off-by: Prasanna Huddar <prasanna.huddar@ericsson.com>
Change-Id: I590fc1b1f2d1f6d2524c3754448d1dc1c4e671c0

opendaylight/md-sal/model/model-flow-statistics/pom.xml
opendaylight/md-sal/model/model-flow-statistics/src/main/yang/statistics-types.yang
opendaylight/md-sal/model/model-inventory/src/main/yang/OFPort.yang [new file with mode: 0644]

index aa335a807c6ade9579a4d5c1e97d7f44afcbec8d..476c817c9084812ad78f5cb6993ed047a631e379 100644 (file)
             <artifactId>model-flow-service</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools.model</groupId>
+            <artifactId>opendaylight-l2-types</artifactId>
+            <version>2013.08.27-SNAPSHOT</version>
+        </dependency>
     </dependencies>
     <packaging>bundle</packaging>
 </project>
index 47c4c9369e2ded77a471de29928e58e1fbef82df..f5c07edb878ec9951ced93b9147574a8d0bb8388 100644 (file)
@@ -2,14 +2,13 @@ module opendaylight-statistics-types {
     namespace "urn:opendaylight:model:statistics:types";
     prefix stat-types;
 
+    import ietf-yang-types {prefix yang;}
     import opendaylight-inventory {prefix inv;}
-
+    import opendaylight-port-inventory {prefix port-inv;}
     
-    revision "2013-08-19" {
+    revision "2013-09-25" {
         description "Initial revision of flow service";
-    }
-
-    
+    }    
 
     grouping node-connector-statistics {
        container packets {
@@ -52,5 +51,18 @@ module opendaylight-statistics-types {
         leaf collision-count {
             type uint64;
         }
+        
+        container duration {
+            leaf second {
+                type yang:counter32;
+            }
+            leaf nanosecond {
+                type yang:counter32;
+            }
+        }
+    }
+    
+    grouping ofp-port-description {
+        uses port-inv:ofp-port;
     }
 }
\ No newline at end of file
diff --git a/opendaylight/md-sal/model/model-inventory/src/main/yang/OFPort.yang b/opendaylight/md-sal/model/model-inventory/src/main/yang/OFPort.yang
new file mode 100644 (file)
index 0000000..a16926e
--- /dev/null
@@ -0,0 +1,142 @@
+module opendaylight-port-inventory {
+    namespace "urn:opendaylight:port:inventory";
+    prefix portInv;
+
+    import yang-ext {prefix ext;}
+    import ietf-inet-types {prefix inet;}
+    import ietf-yang-types {prefix yang;}
+    import opendaylight-inventory {prefix inv;}
+
+    revision "2013-09-25" {
+        description "Initial revision of Port Inventory model";
+    }
+
+    typedef node-connector-Id {
+        type instance-identifier;
+    }
+    
+    grouping ofp-port-config {
+        leaf port-config {
+            type enumeration {
+                enum OFPPC_PORT_DOWN;
+                enum OFFPC_NO_RECV;
+                enum OFFPC_NO_FWD;
+                enum OFPPC_NO_PACKET_IN;
+            }
+        }
+    }
+    
+    grouping ofp-port-state {
+        leaf port-state {
+            type enumeration {
+                enum OFPPS_LINK_DOWN;
+                enum OFPPS_BLOCKED;
+                enum OFFPS_LIVE;
+            }
+        }
+    }
+    
+    grouping ofp-port-features {
+        leaf port-features {
+            type enumeration {
+                enum OFPPF_10MB_HD;
+                enum OFPPF_10MB_FD;
+                enum OFPPF_100MB_HD;
+                enum OFPPF_100MB_FD;
+                enum OFPPF_1GB_HD;
+                enum OFPPF_1GB_FD;
+                enum OFPPF_10GB_FD;
+                enum OFPPF_40GB_FD;
+                enum OFPPF_100GB_FD;
+                enum OFPPF_1TB_FD;
+                enum OFPPF_OTHER;
+                enum OFPPF_COPPER;
+                enum OFPPF_FIBER;
+                enum OFPPF_AUTOENG;
+                enum OFPPF_PAUSE;
+                enum OFPPF_PAUSE_ASYM;
+            }
+        }
+    }
+    
+    grouping common-port {
+        leaf port_no {
+            type node-connector-Id;
+        }
+        
+        leaf-list hw_addr {
+            type uint8;
+            description "MAC Address of the port";
+            max-elements 6;
+        }
+        
+        leaf config {
+            type uint32;
+            description "Bit map of OFPPC_* flags"            
+        }
+        
+        leaf advertised {
+            type uint32;
+            description "Features being advertised by the port"            
+        }
+    }
+    
+    grouping ofp-port {
+        key "port-order";
+        leaf port-order {
+            type uint32;
+        }      
+        
+        uses common-port;
+        
+        leaf name {
+            type string;
+            description "Human readable name of the port";
+            length 16;
+        }
+        
+        leaf state {
+            type uint32;
+            description "Bit map of OFPPS_* flags"            
+        }
+        
+        leaf curr {
+            type uint32;
+            description "Bit map of OFPPF_* flags"            
+        }       
+        
+        leaf supported {
+            type uint32;
+            description "Features supported by the port"            
+        }
+        
+        leaf peer {
+            type uint32;
+            description "Features advertised by peer"            
+        }
+        
+        leaf curr_speed {
+            type uint32;
+            description "Current port bit rate in kbps"            
+        }
+        
+        leaf max_speed {
+            type uint32;
+            description "Max port bit rate in kbps"            
+        }
+    }    
+    
+    grouping ofp-port-mod {
+        key "port-mod-order";
+        leaf port-mod-order {
+            type uint32;
+        }    
+        
+        uses group-port;
+        
+        leaf mask {
+            type uint32;
+            description "Bitmap of OFPPC_* flags to be changed"
+        }        
+    }
+}
\ No newline at end of file