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:endpoints";
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:has-address-type;
31 grouping endpoint-key {
32 uses forwarding:context-key;
33 uses address-endpoint-key;
36 grouping has-child-endpoints {
38 key "context-type context-id address-type address";
43 grouping parent-child-endpoints {
44 choice parent-endpoint-choice {
45 case parent-containment-endpoint-case {
46 list parent-containment-endpoint {
47 key "context-type context-id";
48 uses forwarding:context-key;
51 case parent-endpoint-case {
52 list parent-endpoint {
53 key "context-type context-id address-type address";
58 uses has-child-endpoints;
61 grouping common-endpoint-fields {
63 type gbp-common:tenant-id;
66 "The tenant with which this endpoint is associated";
68 container network-containment {
70 "The network domain associated with this endpoint's fowarding
72 uses forwarding:network-domain-key;
74 leaf-list endpoint-group {
75 type gbp-common:endpoint-group-id;
77 "The groups associated with this endpoint";
82 type gbp-common:condition-name;
84 "The conditions associated with this endpoint";
89 "The last timestamp associated with this endpoint record. This
90 will be used for aging data in the registry.";
94 grouping has-endpoint-group-conditions {
96 "Base type for object with endpoint group to condition mappings.";
99 description "The endpoint group conditions to assign";
100 type gbp-common:endpoint-group-id;
102 list endpoint-group-condition {
104 "The conditions associated with this endpoint group";
107 description "A condition name to associate.";
108 type gbp-common:condition-name;
113 grouping has-regular-location {
116 type instance-identifier;
118 leaf node-connector {
119 type instance-identifier;
123 grouping has-external-location {
124 leaf external-node-mount-point {
126 type instance-identifier;
128 leaf external-node-location {
129 type string; // TODO switch to external-reference
131 leaf external-node-connector {
132 type string; // TODO switch to external-reference
136 grouping has-location {
137 container real-location {
138 choice location-type {
139 case regular-location {
140 uses has-regular-location;
142 case external-location {
143 uses has-external-location;
147 container relative-location {
149 key "node node-connector";
150 uses has-regular-location;
152 list external-location {
153 key "external-node-mount-point external-node-connector";
154 uses has-external-location;
159 container endpoints {
161 "Repository for operational state data about endpoints needed
162 for policy resolution.";
165 list address-endpoints-by-containment {
166 key "context-type context-id";
167 uses forwarding:context-key;
169 list address-endpoint {
170 key "address-type address";
171 uses address-endpoint-key;
173 uses parent-child-endpoints;
174 uses common-endpoint-fields;
179 list containment-endpoint {
180 key "context-type context-id";
181 uses forwarding:context-key;
183 uses has-child-endpoints;
184 uses common-endpoint-fields;
188 container endpoint-locations {
189 list address-endpoint-location {
190 key "context-type context-id address-type address";
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";
213 uses parent-child-endpoints;
214 uses common-endpoint-fields;
217 list containment-endpoint-reg {
218 key "context-type context-id";
219 uses forwarding:context-key;
221 uses has-child-endpoints;
222 uses common-endpoint-fields;
228 rpc unregister-endpoint {
229 description "Unregister an endpoint or endpoints from the registry.";
232 list address-endpoint-unreg {
233 key "context-type context-id address-type address";
236 list containment-endpoint-unreg {
237 key "context-type context-id";
238 uses forwarding:context-key;