* updating information about endpoints.
* @author readamsO
*/
-public class AbstractEndpointRegistry
+public abstract class AbstractEndpointRegistry
implements AutoCloseable, EndpointService {
protected final DataBroker dataProvider;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.ofoverlay.rev140528.OfOverlayContext;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.ofoverlay.rev140528.OfOverlayContextBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.ofoverlay.rev140528.OfOverlayContextInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.binding.DataObject;
@Override
protected EndpointBuilder buildEndpoint(RegisterEndpointInput input) {
- return super.buildEndpoint(input);
+ OfOverlayContextInput ictx =
+ input.getAugmentation(OfOverlayContextInput.class);
+ return super.buildEndpoint(input)
+ .addAugmentation(OfOverlayContext.class,
+ new OfOverlayContextBuilder(ictx).build());
}
@Override
description
"Repository for operational state data about endpoints needed for
policy resolution.";
+ config false;
list endpoint {
description
list as well.";
key "l3-context ip-address";
-
- leaf l3-context {
- type gbp-common:l3-context-id;
- mandatory true;
- description
- "The context for this layer 3 address";
- }
- leaf ip-address {
- type inet:ip-address;
- mandatory true;
- description
- "The actual IP address for the endpoint";
- }
+ uses l3-key;
uses endpoint-fields;
}
}
}
- augment "/endpoint:endpoints/endpoint:endpoint" {
- ext:augment-identifier "of-overlay-context";
+ grouping endpoint-location {
+ description
+ "The location for this endpoint in the overlay network";
+
+ leaf location-type {
+ default internal;
+
+ type enumeration {
+ enum internal {
+ description
+ "The endpoint is located on a port that is part of
+ the overlay network. You must include the node ID
+ and port number for this endpoint.";
+ }
+ enum external {
+ description "This endpoint is not inside the overlay.";
+ }
+ }
+ }
leaf node-id {
- description "The OpenFlow switch for the endpoint";
+ description
+ "The OpenFlow switch for the endpoint. Must be included
+ for all internal endpoints.";
type inv:node-id;
}
leaf port-number {
description
- "The port number of the OpenFlow port for the endpoint";
+ "The port number of the OpenFlow port for the endpoint.
+ Must be included for all internal endpoints";
type uint32;
}
}
+
+ augment "/endpoint:endpoints/endpoint:endpoint" {
+ ext:augment-identifier "of-overlay-context";
+ uses endpoint-location;
+ }
+
+ augment "/endpoint:register-endpoint/endpoint:input" {
+ ext:augment-identifier "of-overlay-context-input";
+ uses endpoint-location;
+ }
}