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 {
67 "The network domain associated with this endpoint's fowarding
69 case network-domain-containment {
70 uses forwarding:network-domain-key;
72 case forwarding-context-containment {
73 uses forwarding:context-key;
77 leaf-list endpoint-group {
78 type gbp-common:endpoint-group-id;
80 "The groups associated with this endpoint";
85 type gbp-common:condition-name;
87 "The conditions associated with this endpoint";
92 "The last timestamp associated with this endpoint record. This
93 will be used for aging data in the registry.";
97 grouping address-endpoint-fields {
98 uses address-endpoint-key;
99 uses parent-child-endpoints;
100 uses common-endpoint-fields;
103 grouping containment-endpoint-fields {
104 uses forwarding:context-key;
105 uses has-child-endpoints;
106 uses common-endpoint-fields;
109 grouping has-endpoint-group-conditions {
111 "Base type for object with endpoint group to condition mappings.";
113 leaf endpoint-group {
114 description "The endpoint group conditions to assign";
115 type gbp-common:endpoint-group-id;
117 list endpoint-group-condition {
119 "The conditions associated with this endpoint group";
122 description "A condition name to associate.";
123 type gbp-common:condition-name;
128 grouping has-regular-location {
131 type instance-identifier;
133 leaf node-connector {
134 type instance-identifier;
138 grouping has-external-location {
139 leaf external-node-mount-point {
141 type instance-identifier;
143 leaf external-node-location {
144 type string; // TODO switch to external-reference
146 leaf external-node-connector {
147 type string; // TODO switch to external-reference
151 grouping has-location {
152 container real-location {
153 choice location-type {
154 case regular-location-case {
155 uses has-regular-location;
157 case external-location-case {
158 uses has-external-location;
162 container relative-location {
164 key "node node-connector";
165 uses has-regular-location;
167 list external-location {
168 key "external-node-mount-point external-node-connector";
169 uses has-external-location;
174 container endpoints {
176 "Repository for operational state data about endpoints needed
177 for policy resolution.";
180 container address-endpoints {
181 list address-endpoint {
182 key "context-type context-id address-type address";
183 uses address-endpoint-fields;
187 container containment-endpoints {
188 list containment-endpoint {
189 key "context-type context-id";
190 uses containment-endpoint-fields;
195 container endpoint-locations {
196 list address-endpoint-location {
197 key "context-type context-id address-type address";
198 uses address-endpoint-key;
202 list containment-endpoint-location {
203 key "context-type context-id";
204 uses forwarding:context-key;
209 rpc register-endpoint {
211 "Register a new endpoint into the registry. If there is already
212 an existing endpoint with the same keys, they will be overwritten
213 with the new information.";
216 list address-endpoint-reg {
217 key "context-type context-id address-type address";
218 uses address-endpoint-fields;
221 list containment-endpoint-reg {
222 key "context-type context-id";
223 uses containment-endpoint-fields;
229 rpc unregister-endpoint {
230 description "Unregister an endpoint or endpoints from the registry.";
233 list address-endpoint-unreg {
234 key "context-type context-id address-type address";
235 uses address-endpoint-key;
237 list containment-endpoint-unreg {
238 key "context-type context-id";
239 uses forwarding:context-key;