import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.ParameterizedType;
import java.net.HttpURLConnection;
-import java.util.Collection;
import java.util.List;
import java.util.Objects;
import javax.ws.rs.core.Response;
import org.opendaylight.neutron.spi.INeutronCRUD;
import org.opendaylight.neutron.spi.INeutronObject;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public abstract class AbstractNeutronNorthbound<T extends INeutronObject<T>, R extends INeutronRequest<T>,
I extends INeutronCRUD<T>> {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractNeutronNorthbound.class);
-
// T extends INeutronObject<T> as 0th type argument
private static final int NEUTRON_ARGUMENT_TYPE_INDEX = 0;
// NeutronRequest extends INeutronRequest<T> as 1st type argument
private static final int NEUTRON_REQUEST_TYPE_INDEX = 1;
- // I extends INeutronCRUD<T> as 2nd type argument
- private static final int NEUTRON_CRUD_TYPE_INDEX = 2;
protected static final int HTTP_OK_BOTTOM = 200;
protected static final int HTTP_OK_TOP = 299;
private final I neutronCRUD;
- /**
- * Default constructor.
- *
- * @deprecated Replace usage of this method with direct dependency injection,
- * see NeutronNetworksNorthbound for how-to. This will shortly be removed.
- */
- @Deprecated
- protected AbstractNeutronNorthbound() {
- this.neutronCRUD = null;
- }
-
protected AbstractNeutronNorthbound(I neutronCRUD) {
this.neutronCRUD = Objects.requireNonNull(neutronCRUD, "neutronCRUD");
}
}
protected I getNeutronCRUD() {
- // TODO remove null check and everything below when the @deprecated default constructor is removed...
- if (this.neutronCRUD != null) {
- return this.neutronCRUD;
- }
-
- // cls = I.class
- Class<I> cls = getActualTypeArgument(NEUTRON_CRUD_TYPE_INDEX);
- I neutronCrud = fetchINeutronCRUD(cls, (Object) this);
- if (neutronCrud == null) {
- throw new ServiceUnavailableException(serviceUnavailable());
- }
- return neutronCrud;
- }
-
- private static <T extends INeutronObject<T>, I extends INeutronCRUD<T>> I fetchINeutronCRUD(Class<I> clazz,
- Object bundle) {
- try {
- BundleContext bundleCtx = FrameworkUtil.getBundle(bundle.getClass()).getBundleContext();
- Collection<ServiceReference<I>> services = bundleCtx.getServiceReferences(clazz, null);
- for (ServiceReference<I> service : services) {
- return bundleCtx.getService(service);
- }
- } catch (InvalidSyntaxException e) {
- LOG.error("Error in getInstances", e);
- }
- return null;
+ return this.neutronCRUD;
}
protected Response show(String uuid,
// return fields
List<String> fields) {
- I gotNeutronCRUD = getNeutronCRUD(); // TODO remove and just use new private neutronCRUD field
- T ans = gotNeutronCRUD.get(uuid);
+ T ans = neutronCRUD.get(uuid);
if (ans == null) {
throw new ResourceNotFoundException(uuidNoExist());
}
}
protected Response create(final R input) {
- I gotNeutronCRUD = getNeutronCRUD(); // TODO remove and just use new private neutronCRUD field
if (input.isSingleton()) {
T singleton = input.getSingleton();
singleton.initDefaults();
- gotNeutronCRUD.add(singleton);
+ neutronCRUD.add(singleton);
} else {
if (input.getBulk() == null) {
throw new BadRequestException("Invalid requests");
}
for (T test : input.getBulk()) {
test.initDefaults();
- gotNeutronCRUD.add(test);
+ neutronCRUD.add(test);
}
}
return Response.status(HttpURLConnection.HTTP_CREATED).entity(input).build();
}
protected Response update(String uuid, final R input) {
- I gotNeutronCRUD = getNeutronCRUD(); // TODO remove and just use new private neutronCRUD field
if (!input.isSingleton()) {
throw new BadRequestException("Only singleton edit supported");
}
T delta = input.getSingleton();
- T original = gotNeutronCRUD.get(uuid);
+ T original = neutronCRUD.get(uuid);
if (original == null) {
throw new ResourceNotFoundException(uuidNoExist());
}
/*
* update the object and return it
*/
- if (!gotNeutronCRUD.update(uuid, delta)) {
+ if (!neutronCRUD.update(uuid, delta)) {
throw new ResourceNotFoundException(uuidNoExist());
}
- T updated = gotNeutronCRUD.get(uuid);
+ T updated = neutronCRUD.get(uuid);
return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(updated)).build();
}
protected Response delete(String uuid) {
- final I gotNeutronCRUD = getNeutronCRUD(); // TODO remove and just use new private neutronCRUD field
-
/*
* remove it and return 204 status
*/
- if (!gotNeutronCRUD.remove(uuid)) {
+ if (!neutronCRUD.remove(uuid)) {
throw new ResourceNotFoundException(uuidNoExist());
}
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import org.codehaus.enunciate.jaxrs.TypeHint;
import org.opendaylight.neutron.spi.INeutronBgpvpnCRUD;
import org.opendaylight.neutron.spi.NeutronBgpvpn;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Bgpvpn.
*/
+@Singleton
@Path("/bgpvpns")
public final class NeutronBgpvpnsNorthbound
extends AbstractNeutronNorthbound<NeutronBgpvpn, NeutronBgpvpnRequest, INeutronBgpvpnCRUD> {
@Context
UriInfo uriInfo;
+ @Inject
+ public NeutronBgpvpnsNorthbound(@OsgiService INeutronBgpvpnCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronFirewallCRUD;
import org.opendaylight.neutron.spi.NeutronFirewall;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Firewall.
*/
+@Singleton
@Path("/fw/firewalls")
public final class NeutronFirewallNorthbound
extends AbstractNeutronNorthbound<NeutronFirewall, NeutronFirewallRequest, INeutronFirewallCRUD> {
private static final String RESOURCE_NAME = "Firewall";
+ @Inject
+ public NeutronFirewallNorthbound(@OsgiService INeutronFirewallCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronFirewallPolicyCRUD;
import org.opendaylight.neutron.spi.NeutronFirewallPolicy;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Firewall Policies.
*/
+@Singleton
@Path("/fw/firewall_policies")
public final class NeutronFirewallPolicyNorthbound extends
AbstractNeutronNorthbound<NeutronFirewallPolicy, NeutronFirewallPolicyRequest, INeutronFirewallPolicyCRUD> {
private static final String RESOURCE_NAME = "Firewall Policy";
+ @Inject
+ public NeutronFirewallPolicyNorthbound(@OsgiService INeutronFirewallPolicyCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronFirewallRuleCRUD;
import org.opendaylight.neutron.spi.NeutronFirewallRule;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Firewall Rule.
*/
+@Singleton
@Path("fw/firewall_rules")
public final class NeutronFirewallRulesNorthbound
extends AbstractNeutronNorthbound<NeutronFirewallRule, NeutronFirewallRuleRequest, INeutronFirewallRuleCRUD> {
private static final String RESOURCE_NAME = "Firewall Rule";
+ @Inject
+ public NeutronFirewallRulesNorthbound(@OsgiService INeutronFirewallRuleCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronFloatingIpCRUD;
import org.opendaylight.neutron.spi.NeutronFloatingIp;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for managing Neutron Floating IPs.
*/
+@Singleton
@Path("/floatingips")
public final class NeutronFloatingIpsNorthbound
extends AbstractNeutronNorthbound<NeutronFloatingIp, NeutronFloatingIpRequest, INeutronFloatingIpCRUD> {
private static final String RESOURCE_NAME = "Floating IP";
+ @Inject
+ public NeutronFloatingIpsNorthbound(@OsgiService INeutronFloatingIpCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronL2gatewayConnectionCRUD;
import org.opendaylight.neutron.spi.NeutronL2gatewayConnection;
+import org.ops4j.pax.cdi.api.OsgiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Neutron Northbound REST APIs for L2 gateway Connection.
*/
+@Singleton
@Path("/l2gateway-connections")
public final class NeutronL2gatewayConnectionNorthbound extends AbstractNeutronNorthbound<NeutronL2gatewayConnection,
NeutronL2gatewayConnectionRequest, INeutronL2gatewayConnectionCRUD> {
private static final String RESOURCE_NAME = "L2gatewayConnection";
+ @Inject
+ public NeutronL2gatewayConnectionNorthbound(@OsgiService INeutronL2gatewayConnectionCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronL2gatewayCRUD;
import org.opendaylight.neutron.spi.NeutronL2gateway;
+import org.ops4j.pax.cdi.api.OsgiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Neutron Northbound REST APIs for L2 gateway.
*/
+@Singleton
@Path("/l2-gateways")
public final class NeutronL2gatewayNorthbound
extends AbstractNeutronNorthbound<NeutronL2gateway, NeutronL2gatewayRequest, INeutronL2gatewayCRUD> {
private static final String RESOURCE_NAME = "L2gateway";
+ @Inject
+ public NeutronL2gatewayNorthbound(@OsgiService INeutronL2gatewayCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronLoadBalancerHealthMonitorCRUD;
import org.opendaylight.neutron.spi.NeutronLoadBalancerHealthMonitor;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Load Balancer HealthMonitor.
*
*/
+@Singleton
@Path("/lbaas/healthmonitors")
public final class NeutronLoadBalancerHealthMonitorNorthbound
extends AbstractNeutronNorthbound<NeutronLoadBalancerHealthMonitor, NeutronLoadBalancerHealthMonitorRequest,
private static final String RESOURCE_NAME = "LoadBalancerHealthMonitor";
+ @Inject
+ public NeutronLoadBalancerHealthMonitorNorthbound(@OsgiService INeutronLoadBalancerHealthMonitorCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronLoadBalancerListenerCRUD;
import org.opendaylight.neutron.spi.NeutronLoadBalancerListener;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for LoadBalancerListener Policies.
*/
+@Singleton
@Path("/lbaas/listeners")
public final class NeutronLoadBalancerListenerNorthbound extends AbstractNeutronNorthbound<NeutronLoadBalancerListener,
NeutronLoadBalancerListenerRequest, INeutronLoadBalancerListenerCRUD> {
private static final String RESOURCE_NAME = "LoadBalancerListener";
+ @Inject
+ public NeutronLoadBalancerListenerNorthbound(@OsgiService INeutronLoadBalancerListenerCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronLoadBalancerCRUD;
import org.opendaylight.neutron.spi.NeutronLoadBalancer;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for LoadBalancers.<br>
*/
+@Singleton
@Path("/lbaas/loadbalancers")
public final class NeutronLoadBalancerNorthbound
extends AbstractNeutronNorthbound<NeutronLoadBalancer, NeutronLoadBalancerRequest, INeutronLoadBalancerCRUD> {
private static final String RESOURCE_NAME = "LoadBalancer";
+ @Inject
+ public NeutronLoadBalancerNorthbound(@OsgiService INeutronLoadBalancerCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.opendaylight.neutron.spi.INeutronLoadBalancerPoolCRUD;
import org.opendaylight.neutron.spi.NeutronLoadBalancerPool;
import org.opendaylight.neutron.spi.NeutronLoadBalancerPoolMember;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for LoadBalancerPool Policies.
* <p>For now, the LB pool member data is maintained with the INeutronLoadBalancerPoolCRUD,
* and not duplicated within the INeutronLoadBalancerPoolMemberCRUD's cache.
*/
+@Singleton
@Path("/lbaas/pools")
public final class NeutronLoadBalancerPoolNorthbound extends AbstractNeutronNorthbound<NeutronLoadBalancerPool,
NeutronLoadBalancerPoolRequest, INeutronLoadBalancerPoolCRUD> {
private static final String RESOURCE_NAME = "LoadBalancerPool";
+ @Inject
+ public NeutronLoadBalancerPoolNorthbound(@OsgiService INeutronLoadBalancerPoolCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronMeteringLabelRuleCRUD;
import org.opendaylight.neutron.spi.NeutronMeteringLabelRule;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Metering Lable Rules.<br>
*/
+@Singleton
@Path("/metering/metering-label-rules")
public final class NeutronMeteringLabelRulesNorthbound extends AbstractNeutronNorthbound<NeutronMeteringLabelRule,
NeutronMeteringLabelRuleRequest, INeutronMeteringLabelRuleCRUD> {
private static final String RESOURCE_NAME = "Metering Label Rule";
+ @Inject
+ public NeutronMeteringLabelRulesNorthbound(@OsgiService INeutronMeteringLabelRuleCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronMeteringLabelCRUD;
import org.opendaylight.neutron.spi.NeutronMeteringLabel;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Metering Lables.
*/
+@Singleton
@Path("/metering/metering-labels")
public final class NeutronMeteringLabelsNorthbound extends
AbstractNeutronNorthbound<NeutronMeteringLabel, NeutronMeteringLabelRequest, INeutronMeteringLabelCRUD> {
private static final String RESOURCE_NAME = "Metering Label";
+ @Inject
+ public NeutronMeteringLabelsNorthbound(@OsgiService INeutronMeteringLabelCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
private static final int HASHMAP_SIZE = 3;
private final NeutronNetworksNorthbound neutronNetworksNorthbound;
+ private final NeutronSubnetsNorthbound neutronSubnetsNorthbound;
+ private final NeutronPortsNorthbound neutronPortsNorthbound;
+ private final NeutronRoutersNorthbound neutronRoutersNorthbound;
+ private final NeutronFloatingIpsNorthbound neutronFloatingIpsNorthbound;
+ private final NeutronSecurityGroupsNorthbound neutronSecurityGroupsNorthbound;
+ private final NeutronSecurityRulesNorthbound neutronSecurityRulesNorthbound;
+ private final NeutronFirewallNorthbound neutronFirewallNorthbound;
+ private final NeutronFirewallPolicyNorthbound neutronFirewallPolicyNorthbound;
+ private final NeutronFirewallRulesNorthbound neutronFirewallRulesNorthbound;
+ private final NeutronLoadBalancerNorthbound neutronLoadBalancerNorthbound;
+ private final NeutronLoadBalancerListenerNorthbound neutronLoadBalancerListenerNorthbound;
+ private final NeutronLoadBalancerPoolNorthbound neutronLoadBalancerPoolNorthbound;
+ private final NeutronBgpvpnsNorthbound neutronBgpvpnsNorthbound;
+ private final NeutronL2gatewayNorthbound neutronL2gatewayNorthbound;
+ private final NeutronL2gatewayConnectionNorthbound neutronL2gatewayConnectionNorthbound;
+ private final NeutronLoadBalancerHealthMonitorNorthbound neutronLoadBalancerHealthMonitorNorthbound;
+ private final NeutronMeteringLabelsNorthbound neutronMeteringLabelsNorthbound;
+ private final NeutronMeteringLabelRulesNorthbound neutronMeteringLabelRulesNorthbound;
+ private final NeutronVpnServicesNorthbound neutronVpnServicesNorthbound;
+ private final NeutronVpnIkePoliciesNorthbound neutronVpnIkePoliciesNorthbound;
+ private final NeutronVpnIpSecPoliciesNorthbound neutronVpnIpSecPoliciesNorthbound;
+ private final NeutronVpnIpSecSiteConnectionsNorthbound neutronVpnIpSecSiteConnectionsNorthbound;
+ private final NeutronSFCFlowClassifiersNorthbound neutronSFCFlowClassifiersNorthbound;
+ private final NeutronSFCPortChainsNorthbound neutronSFCPortChainsNorthbound;
+ private final NeutronSFCPortPairGroupsNorthbound neutronSFCPortPairGroupsNorthbound;
+ private final NeutronSFCPortPairsNorthbound neutronSFCPortPairsNorthbound;
+ private final NeutronQosPolicyNorthbound neutronQosPolicyNorthbound;
+ private final NeutronTrunksNorthbound neutronTrunksNorthbound;
+ private final NeutronTapServiceNorthbound neutronTapServiceNorthbound;
+ private final NeutronTapFlowNorthbound neutronTapFlowNorthbound;
@Inject
- public NeutronNorthboundRSApplication(NeutronNetworksNorthbound neutronNetworksNorthbound) {
+ public NeutronNorthboundRSApplication(
+ NeutronNetworksNorthbound neutronNetworksNorthbound,
+ NeutronSubnetsNorthbound neutronSubnetsNorthbound,
+ NeutronPortsNorthbound neutronPortsNorthbound,
+ NeutronRoutersNorthbound neutronRoutersNorthbound,
+ NeutronFloatingIpsNorthbound neutronFloatingIpsNorthbound,
+ NeutronSecurityGroupsNorthbound neutronSecurityGroupsNorthbound,
+ NeutronSecurityRulesNorthbound neutronSecurityRulesNorthbound,
+ NeutronFirewallNorthbound neutronFirewallNorthbound,
+ NeutronFirewallPolicyNorthbound neutronFirewallPolicyNorthbound,
+ NeutronFirewallRulesNorthbound neutronFirewallRulesNorthbound,
+ NeutronLoadBalancerListenerNorthbound neutronLoadBalancerListenerNorthbound,
+ NeutronLoadBalancerNorthbound neutronLoadBalancerNorthbound,
+ NeutronLoadBalancerPoolNorthbound neutronLoadBalancerPoolNorthbound,
+ NeutronBgpvpnsNorthbound neutronBgpvpnsNorthbound,
+ NeutronL2gatewayNorthbound neutronL2gatewayNorthbound,
+ NeutronL2gatewayConnectionNorthbound neutronL2gatewayConnectionNorthbound,
+ NeutronLoadBalancerHealthMonitorNorthbound neutronLoadBalancerHealthMonitorNorthbound,
+ NeutronMeteringLabelsNorthbound neutronMeteringLabelsNorthbound,
+ NeutronMeteringLabelRulesNorthbound neutronMeteringLabelRulesNorthbound,
+ NeutronVpnServicesNorthbound neutronVpnServicesNorthbound,
+ NeutronVpnIkePoliciesNorthbound neutronVpnIkePoliciesNorthbound,
+ NeutronVpnIpSecSiteConnectionsNorthbound neutronVpnIpSecSiteConnectionsNorthbound,
+ NeutronVpnIpSecPoliciesNorthbound neutronVpnIpSecPoliciesNorthbound,
+ NeutronSFCFlowClassifiersNorthbound neutronSFCFlowClassifiersNorthbound,
+ NeutronSFCPortChainsNorthbound neutronSFCPortChainsNorthbound,
+ NeutronSFCPortPairGroupsNorthbound neutronSFCPortPairGroupsNorthbound,
+ NeutronSFCPortPairsNorthbound neutronSFCPortPairsNorthbound,
+ NeutronQosPolicyNorthbound neutronQosPolicyNorthbound,
+ NeutronTrunksNorthbound neutronTrunksNorthbound,
+ NeutronTapServiceNorthbound neutronTapServiceNorthbound,
+ NeutronTapFlowNorthbound neutronTapFlowNorthbound) {
+
this.neutronNetworksNorthbound = neutronNetworksNorthbound;
+ this.neutronSubnetsNorthbound = neutronSubnetsNorthbound;
+ this.neutronPortsNorthbound = neutronPortsNorthbound;
+ this.neutronRoutersNorthbound = neutronRoutersNorthbound;
+ this.neutronFloatingIpsNorthbound = neutronFloatingIpsNorthbound;
+ this.neutronSecurityGroupsNorthbound = neutronSecurityGroupsNorthbound;
+ this.neutronSecurityRulesNorthbound = neutronSecurityRulesNorthbound;
+ this.neutronFirewallNorthbound = neutronFirewallNorthbound;
+ this.neutronFirewallRulesNorthbound = neutronFirewallRulesNorthbound;
+ this.neutronLoadBalancerListenerNorthbound = neutronLoadBalancerListenerNorthbound;
+ this.neutronLoadBalancerNorthbound = neutronLoadBalancerNorthbound;
+ this.neutronFirewallPolicyNorthbound = neutronFirewallPolicyNorthbound;
+ this.neutronLoadBalancerPoolNorthbound = neutronLoadBalancerPoolNorthbound;
+ this.neutronBgpvpnsNorthbound = neutronBgpvpnsNorthbound;
+ this.neutronL2gatewayNorthbound = neutronL2gatewayNorthbound;
+ this.neutronL2gatewayConnectionNorthbound = neutronL2gatewayConnectionNorthbound;
+ this.neutronLoadBalancerHealthMonitorNorthbound = neutronLoadBalancerHealthMonitorNorthbound;
+ this.neutronMeteringLabelsNorthbound = neutronMeteringLabelsNorthbound;
+ this.neutronMeteringLabelRulesNorthbound = neutronMeteringLabelRulesNorthbound;
+ this.neutronVpnServicesNorthbound = neutronVpnServicesNorthbound;
+ this.neutronVpnIkePoliciesNorthbound = neutronVpnIkePoliciesNorthbound;
+ this.neutronVpnIpSecSiteConnectionsNorthbound = neutronVpnIpSecSiteConnectionsNorthbound;
+ this.neutronVpnIpSecPoliciesNorthbound = neutronVpnIpSecPoliciesNorthbound;
+ this.neutronSFCFlowClassifiersNorthbound = neutronSFCFlowClassifiersNorthbound;
+ this.neutronSFCPortChainsNorthbound = neutronSFCPortChainsNorthbound;
+ this.neutronSFCPortPairGroupsNorthbound = neutronSFCPortPairGroupsNorthbound;
+ this.neutronSFCPortPairsNorthbound = neutronSFCPortPairsNorthbound;
+ this.neutronQosPolicyNorthbound = neutronQosPolicyNorthbound;
+ this.neutronTrunksNorthbound = neutronTrunksNorthbound;
+ this.neutronTapServiceNorthbound = neutronTapServiceNorthbound;
+ this.neutronTapFlowNorthbound = neutronTapFlowNorthbound;
}
@Override
.add(getMOXyJsonProvider())
// Northbound URIs JAX RS Resources:
.add(neutronNetworksNorthbound)
- .add(new NeutronSubnetsNorthbound())
- .add(new NeutronPortsNorthbound())
- .add(new NeutronRoutersNorthbound())
- .add(new NeutronFloatingIpsNorthbound())
- .add(new NeutronSecurityGroupsNorthbound())
- .add(new NeutronSecurityRulesNorthbound())
- .add(new NeutronFirewallNorthbound())
- .add(new NeutronFirewallPolicyNorthbound())
- .add(new NeutronFirewallRulesNorthbound())
- .add(new NeutronLoadBalancerNorthbound())
- .add(new NeutronLoadBalancerListenerNorthbound())
- .add(new NeutronLoadBalancerPoolNorthbound())
- .add(new NeutronLoadBalancerHealthMonitorNorthbound())
- .add(new NeutronMeteringLabelsNorthbound())
- .add(new NeutronMeteringLabelRulesNorthbound())
- .add(new NeutronVpnServicesNorthbound())
- .add(new NeutronVpnIkePoliciesNorthbound())
- .add(new NeutronVpnIpSecPoliciesNorthbound())
- .add(new NeutronVpnIpSecSiteConnectionsNorthbound())
- .add(new NeutronBgpvpnsNorthbound())
- .add(new NeutronL2gatewayNorthbound())
- .add(new NeutronL2gatewayConnectionNorthbound())
- .add(new NeutronSFCFlowClassifiersNorthbound())
- .add(new NeutronSFCPortPairsNorthbound())
- .add(new NeutronSFCPortPairGroupsNorthbound())
- .add(new NeutronSFCPortChainsNorthbound())
- .add(new NeutronQosPolicyNorthbound())
- .add(new NeutronTrunksNorthbound())
- .add(new NeutronTapServiceNorthbound())
- .add(new NeutronTapFlowNorthbound())
+ .add(neutronSubnetsNorthbound)
+ .add(neutronPortsNorthbound)
+ .add(neutronRoutersNorthbound)
+ .add(neutronFloatingIpsNorthbound)
+ .add(neutronSecurityGroupsNorthbound)
+ .add(neutronSecurityRulesNorthbound)
+ .add(neutronFirewallNorthbound)
+ .add(neutronFirewallPolicyNorthbound)
+ .add(neutronFirewallRulesNorthbound)
+ .add(neutronLoadBalancerNorthbound)
+ .add(neutronLoadBalancerListenerNorthbound)
+ .add(neutronLoadBalancerPoolNorthbound)
+ .add(neutronLoadBalancerHealthMonitorNorthbound)
+ .add(neutronMeteringLabelsNorthbound)
+ .add(neutronMeteringLabelRulesNorthbound)
+ .add(neutronVpnServicesNorthbound)
+ .add(neutronVpnIkePoliciesNorthbound)
+ .add(neutronVpnIpSecPoliciesNorthbound)
+ .add(neutronVpnIpSecSiteConnectionsNorthbound)
+ .add(neutronBgpvpnsNorthbound)
+ .add(neutronL2gatewayNorthbound)
+ .add(neutronL2gatewayConnectionNorthbound)
+ .add(neutronSFCFlowClassifiersNorthbound)
+ .add(neutronSFCPortPairsNorthbound)
+ .add(neutronSFCPortPairGroupsNorthbound)
+ .add(neutronSFCPortChainsNorthbound)
+ .add(neutronQosPolicyNorthbound)
+ .add(neutronTrunksNorthbound)
+ .add(neutronTapServiceNorthbound)
+ .add(neutronTapFlowNorthbound)
.build();
}
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronPortCRUD;
import org.opendaylight.neutron.spi.NeutronPort;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for managing neutron port objects.
*/
+@Singleton
@Path("/ports")
public final class NeutronPortsNorthbound
extends AbstractNeutronNorthbound<NeutronPort, NeutronPortRequest, INeutronPortCRUD> {
private static final String RESOURCE_NAME = "Port";
+ @Inject
+ public NeutronPortsNorthbound(@OsgiService INeutronPortCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronQosPolicyCRUD;
import org.opendaylight.neutron.spi.NeutronQosPolicy;
+import org.ops4j.pax.cdi.api.OsgiService;
+@Singleton
@Path("/qos/policies")
public final class NeutronQosPolicyNorthbound
extends AbstractNeutronNorthbound<NeutronQosPolicy, NeutronQosPolicyRequest, INeutronQosPolicyCRUD> {
private static final String RESOURCE_NAME = "Qos Policy";
+ @Inject
+ public NeutronQosPolicyNorthbound(@OsgiService INeutronQosPolicyCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.opendaylight.neutron.spi.INeutronRouterCRUD;
import org.opendaylight.neutron.spi.NeutronRouter;
import org.opendaylight.neutron.spi.NeutronRouterInterface;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for managing neutron routers.
*/
+@Singleton
@Path("/routers")
public final class NeutronRoutersNorthbound
extends AbstractNeutronNorthbound<NeutronRouter, NeutronRouterRequest, INeutronRouterCRUD> {
private static final String RESOURCE_NAME = "Router";
+ @Inject
+ public NeutronRoutersNorthbound(@OsgiService INeutronRouterCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSFCFlowClassifierCRUD;
import org.opendaylight.neutron.spi.NeutronSFCFlowClassifier;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for OpenStack SFC Flow Classifier.
*/
+@Singleton
@Path("/sfc/flowclassifiers")
public final class NeutronSFCFlowClassifiersNorthbound extends AbstractNeutronNorthbound<NeutronSFCFlowClassifier,
NeutronSFCFlowClassifierRequest, INeutronSFCFlowClassifierCRUD> {
private static final String RESOURCE_NAME = "Sfc Flow Classifier";
+ @Inject
+ public NeutronSFCFlowClassifiersNorthbound(@OsgiService INeutronSFCFlowClassifierCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSFCPortChainCRUD;
import org.opendaylight.neutron.spi.NeutronSFCPortChain;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for OpenStack SFC Port Chain.
*/
+@Singleton
@Path("/sfc/portchains")
public final class NeutronSFCPortChainsNorthbound
extends AbstractNeutronNorthbound<NeutronSFCPortChain, NeutronSFCPortChainRequest, INeutronSFCPortChainCRUD> {
private static final String RESOURCE_NAME = "Sfc Port Chain";
+ @Inject
+ public NeutronSFCPortChainsNorthbound(@OsgiService INeutronSFCPortChainCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSFCPortPairGroupCRUD;
import org.opendaylight.neutron.spi.NeutronSFCPortPairGroup;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for OpenStack SFC Port Pair.
*/
+@Singleton
@Path("/sfc/portpairgroups")
public final class NeutronSFCPortPairGroupsNorthbound extends AbstractNeutronNorthbound<NeutronSFCPortPairGroup,
NeutronSFCPortPairGroupRequest, INeutronSFCPortPairGroupCRUD> {
private static final String RESOURCE_NAME = "Sfc Port Pair Group";
+ @Inject
+ public NeutronSFCPortPairGroupsNorthbound(@OsgiService INeutronSFCPortPairGroupCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSFCPortPairCRUD;
import org.opendaylight.neutron.spi.NeutronSFCPortPair;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for OpenStack SFC Port Pair.
*/
+@Singleton
@Path("/sfc/portpairs")
public final class NeutronSFCPortPairsNorthbound
extends AbstractNeutronNorthbound<NeutronSFCPortPair, NeutronSFCPortPairRequest, INeutronSFCPortPairCRUD> {
private static final String RESOURCE_NAME = "Sfc Port Pair";
+ @Inject
+ public NeutronSFCPortPairsNorthbound(@OsgiService INeutronSFCPortPairCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSecurityGroupCRUD;
import org.opendaylight.neutron.spi.NeutronSecurityGroup;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Security Group.
*/
+@Singleton
@Path("/security-groups")
public final class NeutronSecurityGroupsNorthbound extends
AbstractNeutronNorthbound<NeutronSecurityGroup, NeutronSecurityGroupRequest, INeutronSecurityGroupCRUD> {
private static final String RESOURCE_NAME = "Security Group";
+ @Inject
+ public NeutronSecurityGroupsNorthbound(@OsgiService INeutronSecurityGroupCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSecurityRuleCRUD;
import org.opendaylight.neutron.spi.NeutronSecurityRule;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Security Rule.<br>
*/
+@Singleton
@Path("/security-group-rules")
public final class NeutronSecurityRulesNorthbound
extends AbstractNeutronNorthbound<NeutronSecurityRule, NeutronSecurityRuleRequest, INeutronSecurityRuleCRUD> {
private static final String RESOURCE_NAME = "Security Rule";
+ @Inject
+ public NeutronSecurityRulesNorthbound(@OsgiService INeutronSecurityRuleCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronSubnet;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for Subnets.<br>
*/
+@Singleton
@Path("/subnets")
public final class NeutronSubnetsNorthbound
extends AbstractNeutronNorthbound<NeutronSubnet, NeutronSubnetRequest, INeutronSubnetCRUD> {
private static final String RESOURCE_NAME = "Subnet";
+ @Inject
+ public NeutronSubnetsNorthbound(@OsgiService INeutronSubnetCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronTapFlowCRUD;
import org.opendaylight.neutron.spi.NeutronTapFlow;
+import org.ops4j.pax.cdi.api.OsgiService;
+@Singleton
@Path("/tap/flows")
public final class NeutronTapFlowNorthbound
extends AbstractNeutronNorthbound<NeutronTapFlow, NeutronTapFlowRequest, INeutronTapFlowCRUD> {
private static final String RESOURCE_NAME = "Tap Flow";
+ @Inject
+ public NeutronTapFlowNorthbound(@OsgiService INeutronTapFlowCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronTapServiceCRUD;
import org.opendaylight.neutron.spi.NeutronTapService;
+import org.ops4j.pax.cdi.api.OsgiService;
+@Singleton
@Path("/tap/services")
public final class NeutronTapServiceNorthbound
extends AbstractNeutronNorthbound<NeutronTapService, NeutronTapServiceRequest, INeutronTapServiceCRUD> {
private static final String RESOURCE_NAME = "Tap Service";
+ @Inject
+ public NeutronTapServiceNorthbound(@OsgiService INeutronTapServiceCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.opendaylight.neutron.spi.INeutronTrunkCRUD;
import org.opendaylight.neutron.spi.NeutronTrunk;
+import org.ops4j.pax.cdi.api.OsgiService;
+@Singleton
@Path("/trunks")
public final class NeutronTrunksNorthbound
extends AbstractNeutronNorthbound<NeutronTrunk, NeutronTrunkRequest, INeutronTrunkCRUD> {
private static final String RESOURCE_NAME = "Trunk";
+ @Inject
+ public NeutronTrunksNorthbound(@OsgiService INeutronTrunkCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.TypeHint;
import org.opendaylight.neutron.spi.INeutronVpnIkePolicyCRUD;
import org.opendaylight.neutron.spi.NeutronVpnIkePolicy;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for VPN IKE Policy.
*/
+@Singleton
@Path("/vpn/ikepolicies")
public final class NeutronVpnIkePoliciesNorthbound
extends AbstractNeutronNorthbound<NeutronVpnIkePolicy, NeutronVpnIkePolicyRequest, INeutronVpnIkePolicyCRUD> {
private static final String RESOURCE_NAME = "VPNIKEPolicy";
+ @Inject
+ public NeutronVpnIkePoliciesNorthbound(@OsgiService INeutronVpnIkePolicyCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.TypeHint;
import org.opendaylight.neutron.spi.INeutronVpnIpSecPolicyCRUD;
import org.opendaylight.neutron.spi.NeutronVpnIpSecPolicy;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for VPN IPSEC Policy.
*/
+@Singleton
@Path("/vpn/ipsecpolicies")
public final class NeutronVpnIpSecPoliciesNorthbound extends
AbstractNeutronNorthbound<NeutronVpnIpSecPolicy, NeutronVpnIpSecPolicyRequest, INeutronVpnIpSecPolicyCRUD> {
private static final String RESOURCE_NAME = "VPNIPSECPolicy";
+ @Inject
+ public NeutronVpnIpSecPoliciesNorthbound(@OsgiService INeutronVpnIpSecPolicyCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.TypeHint;
import org.opendaylight.neutron.spi.INeutronVpnIpSecSiteConnectionsCRUD;
import org.opendaylight.neutron.spi.NeutronVpnIpSecSiteConnection;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for VPN IPSEC SiteConnection.<br>
*/
+@Singleton
@Path("/vpn/ipsecsiteconnections")
public final class NeutronVpnIpSecSiteConnectionsNorthbound
extends AbstractNeutronNorthbound<NeutronVpnIpSecSiteConnection,
private static final String RESOURCE_NAME = "VPNIPSECSiteConnections";
+ @Inject
+ public NeutronVpnIpSecSiteConnectionsNorthbound(@OsgiService INeutronVpnIpSecSiteConnectionsCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import org.codehaus.enunciate.jaxrs.TypeHint;
import org.opendaylight.neutron.spi.INeutronVpnServiceCRUD;
import org.opendaylight.neutron.spi.NeutronVpnService;
+import org.ops4j.pax.cdi.api.OsgiService;
/**
* Neutron Northbound REST APIs for VPN Service.
*/
+@Singleton
@Path("/vpn/vpnservices")
public final class NeutronVpnServicesNorthbound
extends AbstractNeutronNorthbound<NeutronVpnService, NeutronVpnServiceRequest, INeutronVpnServiceCRUD> {
private static final String RESOURCE_NAME = "VpnService";
+ @Inject
+ public NeutronVpnServicesNorthbound(@OsgiService INeutronVpnServiceCRUD neutronCRUD) {
+ super(neutronCRUD);
+ }
+
@Override
protected String getResourceName() {
return RESOURCE_NAME;