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-external-endpoints {
111 list peer-external-endpoint {
112 key "context-type context-id address-type address";
113 uses base-endpoint:address-endpoint-key;
117 grouping has-peer-external-containment-endpoints {
118 list peer-external-containment-endpoint {
119 key "context-type context-id";
120 uses forwarding:context-key;
124 grouping has-renderer-name {
131 grouping has-rule-group-with-renderer-endpoint-participation {
132 list rule-group-with-renderer-endpoint-participation {
133 description "A specific policy rule group that apply to pair of endpoints.
134 Entire rule-group is located on /renderers/renderer/renderer-policy/configuration/rule-groups/rule-group";
135 key "tenant-id contract-id subject-name renderer-endpoint-participation";
136 uses resolved-policy:has-subject-key;
137 leaf renderer-endpoint-participation {
138 type endpoint-policy-participation;
143 container renderers {
146 "A renderer provides a list of capabilities and status about configured policy.
147 The renderer must store data only to OPER!";
152 "A user-visible name for the renderer.";
156 container renderer-nodes {
157 description "Contains location of nodes (network elements) which are configured by the renderer.";
164 description "Path to the node where policy needs to be enforced.
165 This field is matched against internal-node and external-node-mount-point
166 from base-endoint:endpoint-locations.";
167 type instance-identifier;
172 container renderer-policy {
173 description "Policy is named by version and describes desired vs real state.
174 Desired state of policy described by /renderers/renderer/renderer-policy/configuration and version are stored in CONF.
175 The real state of policy described by /renderers/renderer/renderer-policy/status and version are stored in OPER.";
179 "Version in CONF represents desired state of policy while version in OPER means real state.";
184 container configuration {
185 description "Renderer tries to apply given policy on devices.";
186 container renderer-endpoints {
187 list renderer-endpoint {
189 description "Policy between renderer-endpoint and peer-endpoints (peers).
190 Renderer configures policy for renderer endpoints.";
191 key "context-type context-id address-type address";
192 uses base-endpoint:address-endpoint-key;
194 list peer-endpoint-with-policy {
195 key "context-type context-id address-type address";
196 uses base-endpoint:address-endpoint-key;
197 uses has-rule-group-with-renderer-endpoint-participation;
200 list peer-external-endpoint-with-policy {
201 key "context-type context-id address-type address";
202 uses base-endpoint:address-endpoint-key;
203 uses has-rule-group-with-renderer-endpoint-participation;
206 list peer-external-containment-endpoint-with-policy {
207 key "context-type context-id";
208 uses forwarding:context-key;
209 uses has-rule-group-with-renderer-endpoint-participation;
214 container rule-groups {
217 description "A specific policy rule group that apply to pair of endpoints.
218 The policy rule group represents the subject with resolved rules.";
219 key "tenant-id contract-id subject-name";
220 uses resolved-policy:has-subject-key;
222 uses policy:has-order;
223 uses resolved-policy:has-resolved-rules;
227 container endpoints {
228 list address-endpoint-with-location {
230 key "context-type context-id address-type address";
231 uses base-endpoint:address-endpoint-fields;
232 uses base-endpoint:has-location;
233 uses has-renderer-name;
236 list containment-endpoint-with-location {
237 key "context-type context-id";
238 uses base-endpoint:containment-endpoint-fields;
239 uses base-endpoint:has-relative-location;
243 container forwarding-contexts {
244 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;