complete yang model of alto by Xin Wang, need update other modules correspondingly... 15/17615/2
authorXin Li <yakumolx@gmail.com>
Thu, 2 Apr 2015 11:01:58 +0000 (19:01 +0800)
committerXin Li <yakumolx@gmail.com>
Sat, 4 Apr 2015 07:34:23 +0000 (15:34 +0800)
Change-Id: Ife92b7d709c17e09cb9794eaee818fd66f7d765b
Signed-off-by: Xin Li <yakumolx@gmail.com>
alto-model/src/main/yang/alto-service-types.yang
alto-model/src/main/yang/alto-service.yang

index 35f4e2580591ea54391fc6a9327afb551f327e62..fa96093a9bb8d52d8285871c23d3433f49a17aac 100644 (file)
@@ -244,6 +244,7 @@ module alto-service-types {
 
   grouping dependent-vtags {
     list dependent-vtags {
+      key resource-id;
       uses vtag;
       min-elements 1;
     }
index 82a377737cbf51ced9772ade853d991d0f608cb1..ba52770296389d98a529c19e598374e95245d01f 100644 (file)
@@ -12,10 +12,6 @@ module alto-service {
     prefix alto;
   }
 
-  import alto-service-did {
-    prefix alto-did;
-  }
-
   organization "ALTO WG";
   contact "alto@ietf.org";
 
@@ -27,6 +23,52 @@ module alto-service {
     description "Initial version for ODL.";
   }
 
+  grouping network-map {
+    leaf resource-id {
+      type alto:resource-id;
+        mandatory true;
+      }
+    leaf tag {
+      type alto:tag-string;
+        mandatory true;
+      }
+    list map {
+      key "pid";
+      leaf pid {
+        type alto:pid-name;
+      }
+      uses alto:endpoint-address-group;
+    }
+  }
+
+  grouping cost-map {
+    leaf resource-id {
+      type alto:resource-id;
+      mandatory true;
+    }
+    leaf tag {
+      type alto:tag-string;
+      mandatory true;
+    }
+    container meta {
+      must "current()";
+      uses alto:cost-map-meta;
+    }
+    list map {
+      leaf src {
+        type alto:pid-name;
+      }
+      key "src";
+      list dst-costs {
+        leaf dst {
+          type alto:pid-name;
+        }
+        key "dst";
+        uses alto:alto-cost;
+      }
+    }
+  }
+
   /************************************
    * Data Instances                   *
    ************************************/
@@ -34,26 +76,30 @@ module alto-service {
   container resources {
     //presence "Indicates that the alto service is available.";
 
-    leaf teststring {
-      type string;
-      config false;
-    }
-
-    leaf testdatastring {
-      type string;
+    container IRD {
+      container meta {
+        uses alto:IRD-meta;
+      }
+      uses alto:IRD-data;
     }
 
     container network-maps {
-      config false;
       list network-map {
         key "resource-id";
-        uses alto-did:network-map;
+        uses network-map;
       }
     }
 
-/*
-    uses alto-did:alto-resources;
-*/
+    container cost-maps {
+      list cost-map {
+        key "resource-id";
+        uses cost-map;
+      }
+    }
+
+    container endpoint-property-map {
+      uses alto:endpoint-property-map;
+    }
   }
 
   /************************************
@@ -76,7 +122,7 @@ module alto-service {
     }
     output {
       container filtered-network-map-service {
-        uses alto-did:network-map;
+        uses network-map;
       }
     }
   }
@@ -105,25 +151,7 @@ module alto-service {
     }
     output {
       container filtered-cost-map-service {
-        uses alto-did:cost-map;
-      }
-    }
-  }
-
-  rpc endpoint-property-service {
-    input {
-      leaf-list properties {
-        type alto:endpoint-property-type;
-        min-elements 1;
-      }
-      leaf-list endpoints {
-        type alto:typed-endpoint-address;
-        min-elements 1;
-      }
-    }
-    output {
-      container endpoint-property-service {
-        uses alto:endpoint-property-map;
+        uses cost-map;
       }
     }
   }