* Added affinity config yang. 18/2018/1
authorSuchi Raman <suchi.raman@plexxi.com>
Fri, 18 Oct 2013 20:58:56 +0000 (16:58 -0400)
committerSuchi Raman <suchi.raman@plexxi.com>
Fri, 18 Oct 2013 20:58:56 +0000 (16:58 -0400)
Signed-off-by: Suchi Raman <suchi.raman@plexxi.com>
affinity/yang/pom.xml
affinity/yang/src/main/yang/affinity-config-all.yang

index 0b9c8683f8b9121741bc51be5a67b4e4f8351634..527d17e03e837c1ffeb23c3f360d160c303890ac 100644 (file)
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang-ext</artifactId>
         <version>2013.09.07-SNAPSHOT</version>
-      </dependency>-->
+      </dependency> -->
+      <dependency>
+        <groupId>org.opendaylight.yangtools.model</groupId>
+        <artifactId>opendaylight-l2-types</artifactId>
+        <version>2013.08.27.1-SNAPSHOT</version>
+      </dependency>
     </dependencies>
 
 </project>
index 614e8faf6414a2ea14627c0766c319b122b4d1fd..f17fc59026943e3964dfd39dbcb41321d13afe95 100644 (file)
@@ -6,6 +6,7 @@ module affinity-config-all {
     import ietf-yang-types { prefix yang; }
     import yang-ext { prefix ext; }
     import opendaylight-inventory {prefix inv;}
+    import opendaylight-l2-types { prefix l2types; }
 
     revision "2013-09-25" {
         description "Initial revision of affinity model to be reviewed";
@@ -45,12 +46,11 @@ module affinity-config-all {
             description "Mac or Inet address";
             type union {
                 type inet:ip-address;
-                type inet:ip-prefix; // tbd
-                type inet:ip-range; // tbd
-                type yang:vlanid; // tbd
+                type inet:ip-prefix; 
+                type l2types:vlan-id; // tbd
                 type yang:mac-address;
-                type yang:mac-address-range;
-                type yang:tp-address; // tbd
+//                type yang:mac-address-range;
+//                type yang:tp-address; // tbd
             }
         }
     }
@@ -67,6 +67,23 @@ module affinity-config-all {
         type instance-identifier;
     }
 
+
+    grouping affinity-element {
+        leaf id {
+            type string;
+        }
+        choice element {
+            description "affinity element";
+            case affinity-endpoint {
+                 uses affinity-endpoint;
+                }
+                
+            // Apply waypoint routing to the selected flows and send it through service chain. 
+            case affinity-address-domain {
+                 uses affinity-address-domain;
+            }
+        }
+    }       
   //**************************************************
   // Affinity group
   //**************************************************
@@ -74,9 +91,9 @@ module affinity-config-all {
         leaf id {
             type string;
         }   
-        list affinity-identifiers {
+        list affinity-element {
             key id;
-            uses affinity-identifier;
+            uses affinity-element;
         }
     }
 
@@ -104,6 +121,13 @@ module affinity-config-all {
         }
     }
 
+    typedef affinity-access-control-type {
+              type enumeration {
+                  enum permit;
+                  enum deny;
+              }
+    }
+
     //**************************************************
     // Affinity attribute. Each is expanded in their own grouping construct below. 
     //**************************************************
@@ -114,12 +138,9 @@ module affinity-config-all {
         choice attribute-type {
             description "affinity attribute";
             // Apply access control to selected flows. 
-            case access-control {
-                    leaf access-control {
-                        type values {
-                            enum permit;
-                            enum deny;
-                        }
+            case affinity-access-control {
+                    leaf affinity-access-control {
+                        type  affinity-access-control-type;
                     }
                 }
                 
@@ -181,66 +202,6 @@ module affinity-config-all {
         }
     }
 
-    //******************************
-    // RPCs to create affinity groups, add endpoints and address domains. 
-    //******************************
-    rpc create-affinity-group {
-        input {
-            uses affinity-group;
-        }
-        output {
-            leaf status {
-                type string;
-            }
-        }
-    }
-
-    rpc add-affinity-endpoint {
-        input {
-            leaf affinity-endpoint {
-                type inv:node-connector-id;
-            }
-        }
-        output {
-            leaf status {
-                type string;
-            }
-        }
-    }
-
-    rpc add-affinity-domain {
-        input {
-            leaf affinity-domain {
-                type affinity-domain;
-            }
-        }    
-        output {
-            leaf status {
-                type string;
-            }
-        }
-    }
-
-    rpc get-affinity-groups {
-        output {
-            list affinity-group {
-            key id;
-            uses affinity-group;
-            }
-        }
-    }
-    rpc get-affinity-links;
-    rpc get-affinity-group;
-    rpc get-affinity-link;
-
-    rpc get-stats-per-affinity-link;
-
-    //**************************************************
-    // Notifications 
-    //**************************************************
-    notification new-affinity-endpoint;
-    notification new-affinity-domain;
-    notification modify-affinity-attribute;
 }