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
12 namespace "urn:opendaylight:groupbasedpolicy:ofoverlay";
15 import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
17 import yang-ext {prefix ext; revision-date "2013-07-09";}
18 import opendaylight-inventory {prefix inv; revision-date "2013-08-19";}
19 import overlay {prefix ovsdb-overlay; revision-date 2015-01-05;}
21 import gbp-common {prefix gbp-common;}
22 import endpoint {prefix endpoint;}
25 "This module defines the group-based policy ofoverlay renderer model.";
27 revision "2014-05-28" {
35 container of-overlay-config {
37 "Configuration for the OpenFlow overlay renderer";
41 leaf encapsulation-format {
42 description "The encapsulation format to use for tunnels";
45 description "Use VXLAN encapsulation";
52 "Selects how and whether we learn endpoints";
56 "An external orchestration system will provide
57 information about all endpoints, and no
58 direct learning will occur.";
64 grouping endpoint-location {
66 "The location for this endpoint in the overlay network";
72 "The endpoint is located on a port that is part of
73 the overlay network. You must include the node
74 ID and port number for this endpoint.";
77 description "This endpoint is not inside the overlay.";
83 "The OpenFlow switch for the endpoint. Must be included
84 for all internal endpoints. The format is
85 openflow:[dpid] where the dpid is the value of the
86 switch DPID cast to a long.";
89 leaf node-connector-id {
91 "The node connector for the endpoint's OpenFlow port. The
92 format is openflow:[dpid]:[port] where the dpid is
93 the value of the switch DPID cast to a long, and port
94 is the openflow port number of the interface where
95 the endpoint is connected.";
96 type inv:node-connector-id;
104 type gbp-common:unique-id;
106 "Unique identifier for interface";
110 grouping napt-translations-fields {
111 container napt-translations {
112 description "List of NAPT translations";
113 list napt-translation {
120 grouping napt-fields {
121 description "Support for IP NAPT";
123 description "Ip address the L3Endpoint translates to.";
124 type inet:ip-address;
127 description "Port that L3Endpoint translates to.";
128 type inet:port-number;
132 augment "/endpoint:endpoints/endpoint:endpoint" {
133 ext:augment-identifier "of-overlay-context";
134 uses endpoint-location;
137 augment "/endpoint:endpoints/endpoint:endpoint-l3" {
138 ext:augment-identifier "of-overlay-l3-context";
139 uses endpoint-location;
142 augment "/endpoint:register-endpoint/endpoint:input" {
143 ext:augment-identifier "of-overlay-context-input";
144 uses endpoint-location;
147 augment "/endpoint:endpoints/endpoint:endpoint-l3" {
148 ext:augment-identifier "of-overlay-l3-nat";
149 uses napt-translations-fields;
152 augment "/endpoint:register-endpoint/endpoint:input" {
153 ext:augment-identifier "of-overlay-l3-nat-input";
154 uses napt-translations-fields;
157 augment "/inv:nodes/inv:node" {
158 ext:augment-identifier "of-overlay-node-config";
161 uses ovsdb-overlay:tunnel-type-attributes;
162 uses ovsdb-overlay:ip-port-locator;
163 leaf node-connector-id {
165 "The node connector where is the tunnel located. The
166 format is openflow:[dpid]:[port] where the dpid is
167 the value of the switch DPID cast to a long, and port
168 is the openflow port number of the interface where
169 the endpoint is connected.";
170 type inv:node-connector-id;
173 container ovsdb-config {
176 "The IP address used to connect to OVSDB on this switch";
177 type inet:ip-address;
181 "The port number used to connect to OVSDB on this switch";
182 type inet:port-number;
186 list external-interfaces {
188 "The node connectors for the external interfaces to the underlay.
189 If interface name is required, can be looked up from inventory using
190 this field as a key to FCNC (FlowCapableNodeConnector)";
191 key "node-connector-id";
192 leaf node-connector-id {
193 type inv:node-connector-id;