2 * Copyright (c) 2014 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
9 module openstack-endpoint {
12 namespace "urn:opendaylight:groupbasedpolicy:openstackendpoint";
13 prefix "gbp-openstackendpoint";
15 import gbp-common {prefix gbp-common;}
16 import ietf-inet-types {prefix inet;}
17 import ietf-yang-types {
19 revision-date 2010-09-24;
24 revision-date 2014-04-21;
27 revision "2014-12-04" {
34 "The fields that identify an endpoint by a layer 2 address";
36 type gbp-common:l2-bridge-domain-id;
38 "The bridge domain for the layer 2 address for this endpoint";
41 type yang:mac-address;
43 "The MAC address for the endpoint";
49 "The fields that identify an endpoint by a layer 3 address";
51 type gbp-common:l3-context-id;
54 "The context for this layer 3 address";
60 "The actual IP address for the endpoint";
64 // A base type for an end point
65 grouping endpoint-fields {
66 description "An endpoint and its associated metadata";
68 type gbp-common:tenant-id;
71 "The tenant with which this endpoint is associated";
78 "All the layer 3 addresses associated with this endpoint";
79 key "l3-context ip-address";
83 type gbp-common:endpoint-group-id;
85 "The group associated with this endpoint";
88 type gbp-common:condition-name;
90 "The conditions associated with this endpoint";
95 "The last timestamp associated with this endpoint record.
96 This will be used for aging data in the registry.";
98 leaf neutron-port-id {
100 "Tap port known to neutron at time of VM creation";
101 type gbp-common:name;
105 grouping has-endpoint-group-conditions {
107 "Base type for object with endpoint group to condition
110 leaf endpoint-group {
111 description "The endpoint group conditions to assign";
112 type gbp-common:endpoint-group-id;
114 list endpoint-group-condition {
116 "The conditions associated with this endpoint
120 description "A condition name to associate.";
121 type gbp-common:condition-name;
127 // A base type for an end point
128 container openstack-endpoints {
130 "Repository for operational state data about endpoints needed for
136 "Endpoints indexed by layer 2 addreses. When modifying
137 data here, you must also modify data in the
138 endpoints-l3 list as well.";
139 key "l2-context mac-address";
140 uses endpoint-fields;
145 "Endpoints indexed by layer 3 addreses. When modifying
146 data here, you must also modify data in the endpoints
149 key "l3-context ip-address";
152 uses endpoint-fields;
155 list condition-mapping {
157 "A list mapping conditions to entire endpoint groups.
158 This offers a quickly way to set a condition on many
161 key "endpoint-group";
162 uses has-endpoint-group-conditions;
167 rpc unregister-endpoint {
168 description "Unregister an endpoint or endpoints from the registry.";
172 key "l2-context mac-address";
176 key "l3-context ip-address";
182 rpc register-endpoint {
184 "Register a new endpoint into the registry. If there
185 is already an existing endpoint with the same keys, they
186 will be overwritten with the new information.";
189 uses endpoint-fields;