Registration point for renderer capabilities
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / model / policy.yang
index 13ece140f7cdb6e70db1fed446e84ec9ad08f494..a9b90bc57d775fe6fcb9db64e5afc2998195dbd1 100755 (executable)
@@ -13,7 +13,10 @@ module policy {
     prefix "gbp-policy";
 
     import gbp-common {prefix gbp-common;}
-    import ietf-inet-types {prefix inet;}
+    import ietf-inet-types {
+        prefix inet;
+        revision-date 2010-09-24;
+    }
 
     description
         "This module defines the group-based policy configuration
@@ -633,6 +636,37 @@ module policy {
     // Global Configuration
     // ********************
 
+    grouping classifier-definition-fields {
+        uses subject-feature-definition;
+
+        leaf id {
+            description "A unique ID for the classifier definition";
+            type gbp-common:classifier-definition-id;
+            mandatory true;
+        }
+
+        leaf name {
+            description
+                "A user-visible name for the classifier definition";
+            type gbp-common:classifier-name;
+        }
+    }
+
+    grouping action-definition-fields {
+        uses subject-feature-definition;
+
+        leaf id {
+            description "A unique ID for the action";
+            type gbp-common:action-definition-id;
+            mandatory true;
+        }
+
+        leaf name {
+            description "A user-visible name for the action";
+            type gbp-common:action-name;
+        }
+    }
+
     container subject-feature-definitions {
         description
             "Contains configuration for the set of actions and
@@ -664,27 +698,7 @@ module policy {
                  references it.";
 
             key "id";
-            uses subject-feature-definition;
-
-            leaf id {
-                description "A unique ID for the classifier definition";
-                type gbp-common:classifier-definition-id;
-                mandatory true;
-            }
-
-            leaf name {
-                description
-                    "A user-visible name for the classifier definition";
-                type gbp-common:classifier-name;
-            }
-
-            leaf parent {
-                description
-                    "Parent classifier definition from which we inherit";
-                type leafref {
-                    path "/subject-feature-definitions/classifier-definition/id";
-                }
-            }
+            uses classifier-definition-fields;
         }
 
         list action-definition {
@@ -695,26 +709,7 @@ module policy {
                  references it.";
 
             key "id";
-            uses subject-feature-definition;
-
-            leaf id {
-                description "A unique ID for the action";
-                type gbp-common:action-definition-id;
-                mandatory true;
-            }
-
-            leaf name {
-                description "A user-visible name for the action";
-                type gbp-common:action-name;
-            }
-
-            leaf parent {
-                description
-                    "Parent action definition from which we inherit";
-                type leafref {
-                    path "/subject-feature-definitions/action-definition/id";
-                }
-            }
+            uses action-definition-fields;
         }
     }
 
@@ -840,7 +835,7 @@ module policy {
                 }
                 list gateways {
                     description
-                        "External gateways for subnets we serve, 
+                        "External gateways for subnets we serve,
                         includes prefixes for static routing";
                     key "gateway";
                     leaf gateway {
@@ -852,7 +847,7 @@ module policy {
                             type inet:ip-prefix;
                         }
                     }
-                    
+
                 }
             }