2 * Copyright (c) 2016 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:base_endpoint";
13 prefix "base-endpoint";
15 import gbp-common { prefix gbp-common; revision-date 2014-04-21; }
16 import forwarding { prefix forwarding; revision-date 2016-04-27; }
18 revision "2016-04-27" {
23 grouping address-endpoint-key {
24 uses forwarding:context-key;
25 uses forwarding:has-address-type;
32 grouping has-child-endpoints {
34 key "context-type context-id address-type address";
35 uses address-endpoint-key;
39 grouping parent-child-endpoints {
40 choice parent-endpoint-choice {
41 case parent-containment-endpoint-case {
42 list parent-containment-endpoint {
43 key "context-type context-id";
44 uses forwarding:context-key;
47 case parent-endpoint-case {
48 list parent-endpoint {
49 key "context-type context-id address-type address";
50 uses address-endpoint-key;
54 uses has-child-endpoints;
57 grouping common-endpoint-fields {
59 type gbp-common:tenant-id;
62 "The tenant with which this endpoint is associated";
64 container network-containment {
66 "The network domain associated with this endpoint's fowarding
68 uses forwarding:network-domain-key;
70 leaf-list endpoint-group {
71 type gbp-common:endpoint-group-id;
73 "The groups associated with this endpoint";
78 type gbp-common:condition-name;
80 "The conditions associated with this endpoint";
85 "The last timestamp associated with this endpoint record. This
86 will be used for aging data in the registry.";
90 grouping address-endpoint-fields {
91 uses address-endpoint-key;
92 uses parent-child-endpoints;
93 uses common-endpoint-fields;
96 grouping containment-endpoint-fields {
97 uses forwarding:context-key;
98 uses has-child-endpoints;
99 uses common-endpoint-fields;
102 grouping has-endpoint-group-conditions {
104 "Base type for object with endpoint group to condition mappings.";
106 leaf endpoint-group {
107 description "The endpoint group conditions to assign";
108 type gbp-common:endpoint-group-id;
110 list endpoint-group-condition {
112 "The conditions associated with this endpoint group";
115 description "A condition name to associate.";
116 type gbp-common:condition-name;
121 grouping has-regular-location {
124 type instance-identifier;
126 leaf node-connector {
127 type instance-identifier;
131 grouping has-external-location {
132 leaf external-node-mount-point {
134 type instance-identifier;
136 leaf external-node-location {
137 type string; // TODO switch to external-reference
139 leaf external-node-connector {
140 type string; // TODO switch to external-reference
144 grouping has-location {
145 container real-location {
146 choice location-type {
147 case regular-location-case {
148 uses has-regular-location;
150 case external-location-case {
151 uses has-external-location;
155 container relative-location {
157 key "node node-connector";
158 uses has-regular-location;
160 list external-location {
161 key "external-node-mount-point external-node-connector";
162 uses has-external-location;
167 container endpoints {
169 "Repository for operational state data about endpoints needed
170 for policy resolution.";
173 container address-endpoints {
174 list address-endpoint {
175 key "context-type context-id address-type address";
176 uses address-endpoint-fields;
180 container containment-endpoints {
181 list containment-endpoint {
182 key "context-type context-id";
183 uses containment-endpoint-fields;
188 container endpoint-locations {
189 list address-endpoint-location {
190 key "context-type context-id address-type address";
191 uses address-endpoint-key;
195 list containment-endpoint-location {
196 key "context-type context-id";
197 uses forwarding:context-key;
202 rpc register-endpoint {
204 "Register a new endpoint into the registry. If there is already
205 an existing endpoint with the same keys, they will be overwritten
206 with the new information.";
209 list address-endpoint-reg {
210 key "context-type context-id address-type address";
211 uses address-endpoint-fields;
214 list containment-endpoint-reg {
215 key "context-type context-id";
216 uses containment-endpoint-fields;
222 rpc unregister-endpoint {
223 description "Unregister an endpoint or endpoints from the registry.";
226 list address-endpoint-unreg {
227 key "context-type context-id address-type address";
228 uses address-endpoint-key;
230 list containment-endpoint-unreg {
231 key "context-type context-id";
232 uses forwarding:context-key;