3 namespace "urn:opendaylight:alto:spce";
6 import ietf-inet-types {prefix inet;}
7 import ietf-yang-types {prefix yang;}
10 contact "Jensen Zhang <jingxuan.zhang@gmail.com>,
11 Shawn Lin <x.shawn.lin@gmail.com>";
13 revision "2016-07-18" {
14 description "The second revision of alto-spce model. The model is based
15 on PCEP (https://tools.ietf.org/rfc/rfc5440.txt) but with simplifications.
16 And we extend it with end to end rate limiting, and getting the network state.";
26 typedef error-code-type {
29 enum COMPUTING_ROUTE_ERROR;
30 enum SETTING_UP_ROUTE_ERROR;
31 enum SETTING_UP_METER_ERROR;
33 enum REMOVING_ROUTE_ERROR;
34 enum REMOVING_METTER_ERROR;
35 enum MISSING_ROUTE_ERROR;
36 enum UPDATING_RATE_LIMITING_ERROR;
41 typedef alto-spce-metric {
48 grouping endpoints-group {
51 type inet:ipv4-address;
53 description "Source IP address";
56 type inet:ipv4-address;
58 description "Destination IP address";
64 description "Given the endpoints, this service computes a route
65 satisfying the constraints; among those satisfying the constraints,
66 it computes the one with the best object metrics. If a route is
67 found, the service will setup the route by installing flow rules
68 in FRM. This service does not handle the complexity of re-route.";
74 description "The metric is kbps.";
79 description "The metric is kb. The smaller value means rate limiting is more fine grain";
87 leaf-list objective-metrics {
88 type alto-spce-metric;
91 list constraint-metric {
93 type alto-spce-metric;
97 description "We use min and max to allow more flexible range spec.";
113 type error-code-type;
127 type error-code-type;
134 uses endpoints-group;
141 type error-code-type;
146 rpc update-rate-limiting {
147 description "Given the route (source IP and destination IP are all included), and the value of the rate limiting,
148 this service will set the meter with the rate limiting value, and update every related
149 flow entries in switches along this route.";
152 uses endpoints-group;
155 description "The metric is kbps.";
160 description "The metric is kb. The smaller value means rate limiting is more fine grain";
171 type error-code-type;
176 rpc remove-rate-limiting {
178 uses endpoints-group;
190 type error-code-type;