2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 namespace "urn:opendaylight:groupbasedpolicy:renderer";
13 prefix "gbp-renderer";
15 import gbp-common { prefix gbp-common; revision-date 2014-04-21; }
16 import policy { prefix policy; revision-date 2014-04-21; }
17 import resolved-policy { prefix resolved-policy; revision-date 2015-08-28; }
18 import base-endpoint { prefix base-endpoint; revision-date 2016-04-27; }
19 import forwarding { prefix forwarding; revision-date 2016-04-27; }
20 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
23 "This module defines renderer capabilities.";
25 revision "2015-11-03" {
30 typedef renderer-name {
32 description "A name for a renderer";
39 typedef endpoint-policy-participation {
46 grouping supported-string-value-fields {
47 list supported-string-value {
48 description "String value has to be identical.";
56 grouping supported-int-value-fields {
57 list supported-int-value {
58 description "Int value has to be identical.";
64 list supported-int-value-in-range {
65 description "Int value has to be inside the range include boundaries.";
76 grouping supported-range-value-fields {
77 list supported-range-value {
78 description "Min and max values have to be inside the range include boundaries.";
89 grouping has-parameters-type {
90 choice parameter-type {
92 uses supported-string-value-fields;
95 uses supported-int-value-fields;
98 uses supported-range-value-fields;
103 grouping has-peer-endpoints {
105 key "context-type context-id address-type address";
106 uses base-endpoint:address-endpoint-key;
110 grouping has-peer-containment-endpoints {
111 list peer-containment-endpoint {
112 key "context-type context-id";
113 uses forwarding:context-key;
117 grouping has-peer-external-endpoints {
118 list peer-external-endpoint {
119 key "context-type context-id address-type address";
120 uses base-endpoint:address-endpoint-key;
124 grouping has-peer-external-containment-endpoints {
125 list peer-external-containment-endpoint {
126 key "context-type context-id";
127 uses forwarding:context-key;
131 grouping has-renderer-name {
138 container renderers {
140 "Leaf containing all renderers' description.";
144 "A renderer provides a list of capabilities and status about configured policy.
145 The renderer must store data only to OPER!";
150 "A user-visible name for the renderer.";
154 container renderer-nodes {
155 description "Contains location of nodes (network elements) which are configured by the renderer.";
162 description "Path to the node where policy needs to be enforced.";
163 type instance-identifier;
168 container renderer-policy {
169 description "Policy is named by version and describes desired vs real state.
170 Desired state of policy described by /renderers/renderer/renderer-policy/configuration and version are stored in CONF.
171 The real state of policy described by /renderers/renderer/renderer-policy/status and version are stored in OPER.";
175 "Version in CONF represents desired state of policy while version in OPER means real state.";
180 container configuration {
181 description "Renderer tries to apply given policy on devices.";
182 container endpoint-resolved-policies {
183 list endpoint-resolved-policy {
184 description "Policy between renderer-endpoints and peer-endpoints.";
187 description "Key is here only as workaround for bugs around unkeyed list. It can be removed anytime.";
191 container resolved-policy {
192 list rule-group-with-renderer-endpoint-participation {
193 description "A specific policy rule group that apply to pair of endpoints.
194 Entire rule-group is located on /renderers/renderer/renderer-policy/configuration/rule-groups/rule-group";
195 key "tenant-id contract-id subject-name renderer-endpoint-participation";
196 uses resolved-policy:has-subject-key;
197 leaf renderer-endpoint-participation {
198 type endpoint-policy-participation;
203 container renderer-endpoints-and-peers {
204 description "Every renderer-endpoint has the same set of peer-endpoints.
205 A renderer should not configure a policy when renderer-endpoint is peer-endpoint.";
206 list renderer-endpoint {
207 key "context-type context-id address-type address";
208 uses base-endpoint:address-endpoint-key;
210 uses has-peer-endpoints;
211 uses has-peer-external-endpoints;
212 uses has-peer-external-containment-endpoints;
217 container rule-groups {
219 description "A specific policy rule group that apply to pair of endpoints.
220 The policy rule group represents the subject with resolved rules.";
221 key "tenant-id contract-id subject-name";
222 uses resolved-policy:has-subject-key;
224 uses policy:has-order;
225 uses resolved-policy:has-resolved-rules;
229 container endpoints {
230 list address-endpoint-with-location {
231 key "context-type context-id address-type address";
232 uses base-endpoint:address-endpoint-fields;
233 uses base-endpoint:has-location;
234 uses has-renderer-name;
237 list containment-endpoint-with-location {
238 key "context-type context-id";
239 uses base-endpoint:address-endpoint-fields;
240 uses base-endpoint:has-location;
244 container forwarding-contexts {
245 list forwarding-context-by-tenant {
247 uses forwarding:forwarding-with-tenant-fields;
253 description "The renderer exposes status of policy here.";
256 list unconfigured-rule {
257 key "tenant-id contract-id subject-name renderer-endpoint-participation rule-name";
258 uses resolved-policy:has-subject-key;
259 leaf renderer-endpoint-participation {
260 type endpoint-policy-participation;
263 type gbp-common:rule-name;
266 container renderer-endpoints-with-peers {
267 list renderer-endpoint-with-peers {
268 key "context-type context-id address-type address";
269 uses base-endpoint:address-endpoint-key;
271 uses has-peer-endpoints;
272 uses has-peer-external-endpoints;
273 uses has-peer-external-containment-endpoints;
280 // TODO remove - does not make sense anymore
281 container interests {
287 description "Represents interests of the renderer.";
289 container followed-tenants {
290 description "Interesting tenants for the renderer.";
292 list followed-tenant {
293 description "Tenant which is followed by the renderer.";
298 type gbp-common:tenant-id;
301 list followed-endpoint-group {
302 description "Endpoint-group which is followed by the renderer.";
307 type gbp-common:endpoint-group-id;
314 container capabilities {
318 description "Capabilities this renderer provides.";
320 list supported-classifier-definition {
322 "Classifier definitions this renderer can use.";
324 key classifier-definition-id;
326 leaf classifier-definition-id {
327 description "Reference to a classifier definition in config datastore.";
329 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:id";
333 leaf parent-classifier-definition-id {
335 "Optional reference to a parent classifier definition,
336 to provide a hierarchical structure.";
338 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:id";
342 list supported-parameter-values {
343 description "Represents supported paramters and its values by renderer.
344 If it contains only parameter-name without paramater-type, it means that any value is supported.";
347 leaf parameter-name {
350 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:parameter/policy:name";
354 uses has-parameters-type;
358 list supported-action-definition {
360 "Action definitions this renderer can use.";
362 key action-definition-id;
364 leaf action-definition-id {
365 description "Reference to an action definition in config datastore.";
367 path "/policy:subject-feature-definitions/policy:action-definition/policy:id";
371 leaf parent-action-definition-id {
373 "Optional reference to a parent action definition,
374 to provide a hierarchical structure.";
376 path "/policy:subject-feature-definitions/policy:action-definition/policy:id";
380 list supported-parameter-values {
381 description "Represents supported paramters and its values by renderer.
382 If it contains only parameter-name without paramater-type, it means that any value is supported.";
385 leaf parameter-name {
388 path "/policy:subject-feature-definitions/policy:action-definition/policy:parameter/policy:name";
392 uses has-parameters-type;