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-renderer-name {
110 grouping has-rule-group-with-renderer-endpoint-participation {
111 list rule-group-with-renderer-endpoint-participation {
112 description "A specific policy rule group that apply to pair of endpoints.
113 Entire rule-group is located on /renderers/renderer/renderer-policy/configuration/rule-groups/rule-group";
114 key "tenant-id contract-id subject-name renderer-endpoint-participation";
115 uses resolved-policy:has-subject-key;
116 leaf renderer-endpoint-participation {
117 type endpoint-policy-participation;
122 grouping has-unconfigured-rule-groups {
123 list unconfigured-rule-group {
124 key "tenant-id contract-id subject-name renderer-endpoint-participation";
125 uses resolved-policy:has-subject-key;
126 leaf renderer-endpoint-participation {
127 type endpoint-policy-participation;
129 list unconfigured-resolved-rule {
132 type gbp-common:rule-name;
138 container renderers {
141 "A renderer provides a list of capabilities and status about configured policy.
142 The renderer must store data only to OPER!";
147 "A user-visible name for the renderer.";
151 container renderer-nodes {
152 description "Contains location of nodes (network elements) which are configured by the renderer.";
159 description "Path to the node where policy needs to be enforced.
160 This field is matched against internal-node and external-node-mount-point
161 from base-endoint:endpoint-locations.";
162 type instance-identifier;
167 container renderer-policy {
168 description "Policy is named by version and describes desired vs real state.
169 Desired state of policy described by /renderers/renderer/renderer-policy/configuration and version are stored in CONF.
170 The real state of policy described by /renderers/renderer/renderer-policy/status and version are stored in OPER.";
174 "Version in CONF represents desired state of policy while version in OPER means real state.";
179 container configuration {
180 description "Renderer tries to apply given policy on devices.";
181 container renderer-endpoints {
182 list renderer-endpoint {
184 description "Policy between renderer-endpoint and peer-endpoints (peers).
185 Renderer configures policy for renderer endpoints.";
186 key "context-type context-id address-type address";
187 uses base-endpoint:address-endpoint-key;
190 description "peer endpoint with-policy - keys";
191 key "context-type context-id address-type address";
192 uses base-endpoint:address-endpoint-key;
193 uses has-rule-group-with-renderer-endpoint-participation;
196 list peer-external-endpoint {
197 description "peer external endpoint with-policy - keys";
198 key "context-type context-id address-type address";
199 uses base-endpoint:address-endpoint-key;
200 uses has-rule-group-with-renderer-endpoint-participation;
203 list peer-external-containment-endpoint {
204 description "peer external endpoint with containment and policy - keys";
205 key "context-type context-id";
206 uses forwarding:context-key;
207 uses has-rule-group-with-renderer-endpoint-participation;
212 container rule-groups {
215 description "A specific policy rule group that apply to pair of endpoints.
216 The policy rule group represents the subject with resolved rules.";
217 key "tenant-id contract-id subject-name";
218 uses resolved-policy:has-subject-key;
220 uses policy:has-order;
221 uses resolved-policy:has-resolved-rules;
225 container endpoints {
226 list address-endpoint-with-location {
228 key "context-type context-id address-type address";
229 uses base-endpoint:address-endpoint-fields;
230 uses base-endpoint:has-location;
231 uses has-renderer-name;
234 list containment-endpoint-with-location {
235 key "context-type context-id";
236 uses base-endpoint:containment-endpoint-fields;
237 uses base-endpoint:has-relative-location;
241 container renderer-forwarding {
242 list renderer-forwarding-by-tenant {
246 type gbp-common:tenant-id;
248 "The tenant with which forwarding is associated";
251 list renderer-forwarding-context {
252 key "context-type context-id";
253 uses forwarding:context-key;
255 uses forwarding:forwarding-fields;
258 list renderer-network-domain {
259 key "network-domain-type network-domain-id";
260 uses forwarding:network-domain-key;
262 uses forwarding:forwarding-fields;
263 description "Renderer network domain can be augmented with further information.";
270 description "The renderer exposes status of policy here.";
273 container unconfigured-endpoints {
274 list unconfigured-renderer-endpoint {
275 description "Renderer-endpoint with unconfigured rules.";
276 key "context-type context-id address-type address";
277 uses base-endpoint:address-endpoint-key;
279 list unconfigured-peer-endpoint {
280 key "context-type context-id address-type address";
281 uses base-endpoint:address-endpoint-key;
282 uses has-unconfigured-rule-groups;
285 list unconfigured-peer-external-endpoint {
286 key "context-type context-id address-type address";
287 uses base-endpoint:address-endpoint-key;
288 uses has-unconfigured-rule-groups;
291 list unconfigured-peer-external-containment-endpoint {
292 key "context-type context-id";
293 uses forwarding:context-key;
294 uses has-unconfigured-rule-groups;
298 description "More details on reason for configuration failure.";
306 // TODO remove - does not make sense anymore
307 container interests {
313 description "Represents interests of the renderer.";
315 container followed-tenants {
316 description "Interesting tenants for the renderer.";
318 list followed-tenant {
319 description "Tenant which is followed by the renderer.";
324 type gbp-common:tenant-id;
327 list followed-endpoint-group {
328 description "Endpoint-group which is followed by the renderer.";
333 type gbp-common:endpoint-group-id;
340 container capabilities {
344 description "Capabilities this renderer provides.";
346 list supported-classifier-definition {
348 "Classifier definitions this renderer can use.";
350 key classifier-definition-id;
352 leaf classifier-definition-id {
353 description "Reference to a classifier definition in config datastore.";
355 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:id";
359 leaf parent-classifier-definition-id {
361 "Optional reference to a parent classifier definition,
362 to provide a hierarchical structure.";
364 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:id";
368 list supported-parameter-values {
369 description "Represents supported paramters and its values by renderer.
370 If it contains only parameter-name without paramater-type, it means that any value is supported.";
373 leaf parameter-name {
376 path "/policy:subject-feature-definitions/policy:classifier-definition/policy:parameter/policy:name";
380 uses has-parameters-type;
384 list supported-action-definition {
386 "Action definitions this renderer can use.";
388 key action-definition-id;
390 leaf action-definition-id {
391 description "Reference to an action definition in config datastore.";
393 path "/policy:subject-feature-definitions/policy:action-definition/policy:id";
397 leaf parent-action-definition-id {
399 "Optional reference to a parent action definition,
400 to provide a hierarchical structure.";
402 path "/policy:subject-feature-definitions/policy:action-definition/policy:id";
406 list supported-parameter-values {
407 description "Represents supported paramters and its values by renderer.
408 If it contains only parameter-name without paramater-type, it means that any value is supported.";
411 leaf parameter-name {
414 path "/policy:subject-feature-definitions/policy:action-definition/policy:parameter/policy:name";
418 uses has-parameters-type;