Introduced DomainSpecificRegistry service
[groupbasedpolicy.git] / groupbasedpolicy / src / main / java / org / opendaylight / groupbasedpolicy / util / IidFactory.java
index 7cb3f3be39602370d1a3e99900e61e50a3e1f458..f8bb98c2e6109b02d4d58e1ee4859d0ee236b26f 100644 (file)
@@ -11,15 +11,31 @@ package org.opendaylight.groupbasedpolicy.util;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.EndpointLocations;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoint.locations.AddressEndpointLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoint.locations.AddressEndpointLocationKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoint.locations.ContainmentEndpointLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoint.locations.ContainmentEndpointLocationKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.AddressEndpoints;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.ContainmentEndpoints;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.address.endpoints.AddressEndpoint;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.address.endpoints.AddressEndpointKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.containment.endpoints.ContainmentEndpoint;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.containment.endpoints.ContainmentEndpointKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.parent.child.endpoints.parent.endpoint.choice.parent.containment.endpoint._case.ParentContainmentEndpoint;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.parent.child.endpoints.parent.endpoint.choice.parent.containment.endpoint._case.ParentContainmentEndpointKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.absolute.location.AbsoluteLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.relative.location.RelativeLocations;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.relative.location.relative.locations.ExternalLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.relative.location.relative.locations.ExternalLocationKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.relative.location.relative.locations.InternalLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.has.relative.location.relative.locations.InternalLocationKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionDefinitionId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionName;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClassifierDefinitionId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClassifierName;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ClauseName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ContextId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ContractId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.EndpointGroupId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L2BridgeDomainId;
@@ -37,8 +53,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.r
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Key;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3Prefix;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint.rev140421.endpoints.EndpointL3PrefixKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.address.endpoints.AddressEndpoint;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.endpoints.address.endpoints.AddressEndpointKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.LocationProviders;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.ProviderName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.location.providers.LocationProvider;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.location.providers.LocationProviderKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.location.providers.location.provider.ProviderAddressEndpointLocation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.endpoint_location_provider.rev160419.location.providers.location.provider.ProviderAddressEndpointLocationKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.forwarding.rev160427.AddressType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.forwarding.rev160427.ContextType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.forwarding.rev160427.Forwarding;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.forwarding.rev160427.forwarding.ForwardingByTenant;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.forwarding.rev160427.forwarding.ForwardingByTenantKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.SubjectFeatureDefinitions;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.Tenants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.has.classifier.refs.ClassifierRef;
@@ -383,4 +408,78 @@ public class IidFactory {
             .build();
     }
 
+    public static InstanceIdentifier<AddressEndpointLocation> addressEndpointLocationIid(AddressEndpointLocationKey addrEndpointLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(AddressEndpointLocation.class, addrEndpointLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<ContainmentEndpointLocation> containmentEndpointLocationIid(ContainmentEndpointLocationKey addrEndpointLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(ContainmentEndpointLocation.class, addrEndpointLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<InternalLocation> internalLocationIid(AddressEndpointLocationKey addrEndpointLocationKey,
+            InternalLocationKey internalLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(AddressEndpointLocation.class, addrEndpointLocationKey)
+                .child(RelativeLocations.class)
+                .child(InternalLocation.class, internalLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<InternalLocation> internalLocationIid(ContainmentEndpointLocationKey contEndpointLocationKey,
+            InternalLocationKey internalLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(ContainmentEndpointLocation.class, contEndpointLocationKey)
+                .child(RelativeLocations.class)
+                .child(InternalLocation.class, internalLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<ExternalLocation> externalLocationIid(AddressEndpointLocationKey addrEndpointLocationKey,
+            ExternalLocationKey externalLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(AddressEndpointLocation.class, addrEndpointLocationKey)
+                .child(RelativeLocations.class)
+                .child(ExternalLocation.class, externalLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<ExternalLocation> externalLocationIid(ContainmentEndpointLocationKey contEndpointLocationKey,
+            ExternalLocationKey externalLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(ContainmentEndpointLocation.class, contEndpointLocationKey)
+                .child(RelativeLocations.class)
+                .child(ExternalLocation.class, externalLocationKey)
+                .build();
+    }
+
+    public static InstanceIdentifier<AbsoluteLocation> absoluteLocationIid(AddressEndpointLocationKey addrEndpointLocationKey) {
+        return InstanceIdentifier.builder(EndpointLocations.class)
+                .child(AddressEndpointLocation.class, addrEndpointLocationKey)
+                .child(AbsoluteLocation.class)
+                .build();
+    }
+
+    public static InstanceIdentifier<ProviderAddressEndpointLocation> providerAddressEndpointLocationIid(String provider,
+            Class<? extends AddressType> addrType, String addr, Class<? extends ContextType> cType,
+            ContextId containment) {
+        return InstanceIdentifier.builder(LocationProviders.class)
+                .child(LocationProvider.class, new LocationProviderKey(new ProviderName(provider)))
+            .child(ProviderAddressEndpointLocation.class, new ProviderAddressEndpointLocationKey(addr, addrType, containment, cType))
+            .build();
+    }
+
+    public static InstanceIdentifier<ForwardingByTenant> forwardingByTenantIid(TenantId tenantId) {
+        return forwardingByTenantIid(new ForwardingByTenantKey(tenantId));
+    }
+
+    public static InstanceIdentifier<ForwardingByTenant> forwardingByTenantIid(
+            ForwardingByTenantKey forwardingByTenantKey) {
+        return InstanceIdentifier.builder(Forwarding.class)
+            .child(ForwardingByTenant.class, forwardingByTenantKey)
+            .build();
+    }
 }