module base-endpoint {
yang-version 1;
- namespace "urn:opendaylight:groupbasedpolicy:endpoints";
+ namespace "urn:opendaylight:groupbasedpolicy:base_endpoint";
prefix "base-endpoint";
import gbp-common { prefix gbp-common; revision-date 2014-04-21; }
}
grouping address-endpoint-key {
+ uses forwarding:context-key;
uses forwarding:has-address-type;
leaf address {
type string;
}
}
- grouping endpoint-key {
- uses forwarding:context-key;
- uses address-endpoint-key;
- }
-
grouping has-child-endpoints {
list child-endpoint {
key "context-type context-id address-type address";
- uses endpoint-key;
+ uses address-endpoint-key;
}
}
case parent-endpoint-case {
list parent-endpoint {
key "context-type context-id address-type address";
- uses endpoint-key;
+ uses address-endpoint-key;
}
}
}
"The tenant with which this endpoint is associated";
}
container network-containment {
- description
- "The network domain associated with this endpoint's fowarding
- context.";
- uses forwarding:network-domain-key;
+ choice containment {
+ description
+ "The network domain associated with this endpoint's fowarding
+ context.";
+ case network-domain-containment {
+ uses forwarding:network-domain-key;
+ }
+ case forwarding-context-containment {
+ uses forwarding:context-key;
+ }
+ }
}
leaf-list endpoint-group {
type gbp-common:endpoint-group-id;
}
}
+ grouping address-endpoint-fields {
+ uses address-endpoint-key;
+ uses parent-child-endpoints;
+ uses common-endpoint-fields;
+ }
+
+ grouping containment-endpoint-fields {
+ uses forwarding:context-key;
+ uses has-child-endpoints;
+ uses common-endpoint-fields;
+ }
+
grouping has-endpoint-group-conditions {
description
"Base type for object with endpoint group to condition mappings.";
}
}
- grouping has-regular-location {
- leaf node {
+ grouping internal-location-fields {
+ description "Location inside ODL - node and node-connector
+ are represented directly in ODL.";
+ leaf internal-node {
mandatory true;
type instance-identifier;
}
- leaf node-connector {
+ leaf internal-node-connector {
type instance-identifier;
}
}
- grouping has-external-location {
+ grouping external-location-fields {
+ description "Location outside of ODL - node and node-connector
+ are outside of ODL. external-node-mount-point is path
+ to external system where node and node-connector are located.";
leaf external-node-mount-point {
mandatory true;
type instance-identifier;
}
- leaf external-node-location {
+ leaf external-node {
type string; // TODO switch to external-reference
}
leaf external-node-connector {
}
}
- grouping has-location {
- container real-location {
+ grouping has-absolute-location {
+ container absolute-location {
choice location-type {
- case regular-location {
- uses has-regular-location;
+ case internal-location-case {
+ uses internal-location-fields;
}
- case external-location {
- uses has-external-location;
+ case external-location-case {
+ uses external-location-fields;
}
}
}
- container relative-location {
- list location {
- key "node node-connector";
- uses has-regular-location;
+ }
+
+ grouping has-relative-location {
+ container relative-locations {
+ list internal-location {
+ key "internal-node internal-node-connector";
+ uses internal-location-fields;
}
list external-location {
key "external-node-mount-point external-node-connector";
- uses has-external-location;
+ uses external-location-fields;
}
}
}
+ grouping has-location {
+ uses has-absolute-location;
+ uses has-relative-location;
+ }
+
container endpoints {
description
"Repository for operational state data about endpoints needed
for policy resolution.";
config false;
- list address-endpoints-by-containment {
- key "context-type context-id";
- uses forwarding:context-key;
-
+ container address-endpoints {
list address-endpoint {
- key "address-type address";
- uses address-endpoint-key;
-
- uses parent-child-endpoints;
- uses common-endpoint-fields;
- min-elements 1;
+ key "context-type context-id address-type address";
+ uses address-endpoint-fields;
}
}
- list containment-endpoint {
- key "context-type context-id";
- uses forwarding:context-key;
-
- uses has-child-endpoints;
- uses common-endpoint-fields;
+ container containment-endpoints {
+ list containment-endpoint {
+ key "context-type context-id";
+ uses containment-endpoint-fields;
+ }
}
}
container endpoint-locations {
+ config false;
+
list address-endpoint-location {
key "context-type context-id address-type address";
- uses endpoint-key;
+ uses address-endpoint-key;
uses has-location;
}
list containment-endpoint-location {
key "context-type context-id";
uses forwarding:context-key;
- uses has-location;
+ uses has-relative-location;
}
}
input {
list address-endpoint-reg {
key "context-type context-id address-type address";
- uses endpoint-key;
-
- uses parent-child-endpoints;
- uses common-endpoint-fields;
+ uses address-endpoint-fields;
uses has-location;
}
list containment-endpoint-reg {
key "context-type context-id";
- uses forwarding:context-key;
-
- uses has-child-endpoints;
- uses common-endpoint-fields;
- uses has-location;
+ uses containment-endpoint-fields;
+ uses has-relative-location;
}
}
}
input {
list address-endpoint-unreg {
key "context-type context-id address-type address";
- uses endpoint-key;
+ uses address-endpoint-key;
}
list containment-endpoint-unreg {
key "context-type context-id";