import java.io.Serializable;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
/**
* Neutron Northbound REST APIs for Firewall.<br>
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createFirewalls(final NeutronFirewallRequest input) {
INeutronFirewallCRUD firewallInterface = getNeutronInterfaces().getFirewallInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateFirewall(
@PathParam("firewallUUID") String firewallUUID, final NeutronFirewallRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteFirewall(
@PathParam("firewallUUID") String firewallUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createFirewallPolicies(final NeutronFirewallPolicyRequest input) {
INeutronFirewallPolicyCRUD firewallPolicyInterface = getNeutronInterfaces().getFirewallPolicyInterface();
//@TypeHint(OpenStackSubnets.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateFirewallPolicy(
@PathParam("firewallPolicyUUID") String firewallPolicyUUID, final NeutronFirewallPolicyRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteFirewallPolicy(
@PathParam("firewallPolicyUUID") String firewallPolicyUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
private static final int HTTP_OK_TOP = 299;
private static final String INTERFACE_NAME = "Firewall Rule CRUD Interface";
private static final String UUID_NO_EXIST = "Firewall Rule UUID does not exist.";
- private static final String UUID_EXISTS = "Firewall Rule UUID already exists.";
private static final String NO_PROVIDERS = "No providers registered. Please try again later";
private static final String NO_PROVIDER_LIST = "Couldn't get providers list. Please try again later";
@Consumes({MediaType.APPLICATION_JSON})
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createFirewallRules(final NeutronFirewallRuleRequest input) {
INeutronFirewallRuleCRUD firewallRuleInterface = getNeutronInterfaces().getFirewallRuleInterface();
}
}
} else {
- Map<String, NeutronFirewallRule> testMap = new HashMap<String, NeutronFirewallRule>();
Object[] instances = NeutronUtil.getInstances(INeutronFirewallRuleAware.class, this);
for (NeutronFirewallRule test : input.getBulk()) {
if (instances != null) {
@Consumes({MediaType.APPLICATION_JSON})
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateFirewallRule(
@PathParam("firewallRuleUUID") String firewallRuleUUID, final NeutronFirewallRuleRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteFirewallRule(
@PathParam("firewallRuleUUID") String firewallRuleUUID) {
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
import org.opendaylight.neutron.spi.NeutronFloatingIP;
import org.opendaylight.neutron.spi.NeutronNetwork;
-import org.opendaylight.neutron.spi.NeutronPort;
-import org.opendaylight.neutron.spi.NeutronSubnet;
-import org.opendaylight.neutron.spi.Neutron_IPs;
/**
* Neutron Northbound REST APIs.<br>
return o.extractFields(fields);
}
- private boolean isIpV4Network(NeutronNetwork externNetwork,
- INeutronSubnetCRUD subnetInterface) {
- for (String subnetUUID: externNetwork.getSubnets()) {
- if (!subnetInterface.subnetExists(subnetUUID)) {
- continue;
- }
- NeutronSubnet subnet = subnetInterface.getSubnet(subnetUUID);
- if (subnet.getIpVersion() == 4) {
- return true;
- }
- }
- return false;
- }
-
private NeutronCRUDInterfaces getNeutronInterfaces(boolean flag) {
NeutronCRUDInterfaces answer = new NeutronCRUDInterfaces().fetchINeutronFloatingIPCRUD(this);
if (answer.getFloatingIPInterface() == null) {
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createFloatingIPs(final NeutronFloatingIPRequest input) {
NeutronCRUDInterfaces interfaces = getNeutronInterfaces(true);
INeutronFloatingIPCRUD floatingIPInterface = interfaces.getFloatingIPInterface();
- INeutronNetworkCRUD networkInterface = interfaces.getNetworkInterface();
- INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
- INeutronPortCRUD portInterface = interfaces.getPortInterface();
if (input.isSingleton()) {
Object[] instances = NeutronUtil.getInstances(INeutronFloatingIPAware.class, this);
if (instances != null) {
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateFloatingIP(
@PathParam("floatingipUUID") String floatingipUUID,
) {
NeutronCRUDInterfaces interfaces = getNeutronInterfaces(true);
INeutronFloatingIPCRUD floatingIPInterface = interfaces.getFloatingIPInterface();
- INeutronNetworkCRUD networkInterface = interfaces.getNetworkInterface();
- INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
- INeutronPortCRUD portInterface = interfaces.getPortInterface();
NeutronFloatingIP singleton = input.getSingleton();
NeutronFloatingIP target = floatingIPInterface.getFloatingIP(floatingipUUID);
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteFloatingIP(
@PathParam("floatingipUUID") String floatingipUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createLoadBalancerHealthMonitors(final NeutronLoadBalancerHealthMonitorRequest input) {
INeutronLoadBalancerHealthMonitorCRUD loadBalancerHealthMonitorInterface = getNeutronInterfaces().getLoadBalancerHealthMonitorInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateLoadBalancerHealthMonitor(
@PathParam("loadBalancerHealthMonitorID") String loadBalancerHealthMonitorID,
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteLoadBalancerHealthMonitor(
@PathParam("loadBalancerHealthMonitorID") String loadBalancerHealthMonitorID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createLoadBalancerListeners(final NeutronLoadBalancerListenerRequest input) {
INeutronLoadBalancerListenerCRUD loadBalancerListenerInterface = getNeutronInterfaces().getLoadBalancerListenerInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateLoadBalancerListener(
@PathParam("loadBalancerListenerID") String loadBalancerListenerID, final NeutronLoadBalancerListenerRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteLoadBalancerListener(
@PathParam("loadBalancerListenerID") String loadBalancerListenerID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createLoadBalancers(final NeutronLoadBalancerRequest input) {
INeutronLoadBalancerCRUD loadBalancerInterface = getNeutronInterfaces().getLoadBalancerInterface();
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateLoadBalancer(
@PathParam("loadBalancerID") String loadBalancerID, final NeutronLoadBalancerRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteLoadBalancer(
@PathParam("loadBalancerID") String loadBalancerID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({MediaType.APPLICATION_JSON})
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createLoadBalancerPoolMember(
@PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID,
if (input.isSingleton()) {
NeutronLoadBalancerPoolMember singleton = input.getSingleton();
singleton.setPoolID(loadBalancerPoolUUID);
- String loadBalancerPoolMemberUUID = singleton.getPoolMemberID();
Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolMemberAware.class, this);
if (instances != null) {
} else {
Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolMemberAware.class, this);
for (NeutronLoadBalancerPoolMember test : input.getBulk()) {
- String loadBalancerPoolMemberUUID = test.getPoolMemberID();
if (instances != null) {
if (instances.length > 0) {
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented") })
public Response updateLoadBalancerPoolMember(
@PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID,
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteLoadBalancerPoolMember(
@PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID,
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createLoadBalancerPools(final NeutronLoadBalancerPoolRequest input) {
INeutronLoadBalancerPoolCRUD loadBalancerPoolInterface = getNeutronInterfaces().getLoadBalancerPoolInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateLoadBalancerPool(
@PathParam("loadBalancerPoolID") String loadBalancerPoolID, final NeutronLoadBalancerPoolRequest input) {
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteLoadBalancerPool(
@PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID) {
//@TypeHint(NeutronNetwork.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createMeteringLabelRule(final NeutronMeteringLabelRuleRequest input) {
INeutronMeteringLabelRuleCRUD meteringLabelRuleInterface = getNeutronInterfaces().getMeteringLabelRuleInterface();
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteMeteringLabelRule(
@PathParam("ruleUUID") String ruleUUID) {
//@TypeHint(NeutronNetwork.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createMeteringLabel(final NeutronMeteringLabelRequest input) {
INeutronMeteringLabelCRUD meteringLabelInterface = getNeutronInterfaces().getMeteringLabelInterface();
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteMeteringLabel(
@PathParam("labelUUID") String labelUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
private static final int HTTP_OK_TOP = 299;
private static final String INTERFACE_NAME = "Network CRUD Interface";
private static final String UUID_NO_EXIST = "Network UUID does not exist.";
- private static final String UUID_EXISTS = "Network UUID already exists.";
private static final String NO_PROVIDERS = "No providers registered. Please try again later";
private static final String NO_PROVIDER_LIST = "Couldn't get providers list. Please try again later";
@TypeHint(NeutronNetwork.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createNetworks(final NeutronNetworkRequest input) {
INeutronNetworkCRUD networkInterface = getNeutronInterfaces().getNetworkInterface();
//@TypeHint(OpenStackNetworks.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateNetwork(
@PathParam("netUUID") String netUUID, final NeutronNetworkRequest input
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Network In Use"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteNetwork(
@PathParam("netUUID") String netUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
import org.opendaylight.neutron.spi.NeutronPort;
-import org.opendaylight.neutron.spi.NeutronSubnet;
-import org.opendaylight.neutron.spi.Neutron_IPs;
/**
* Neutron Northbound REST APIs.<br>
private static final int HTTP_OK_TOP = 299;
private static final String INTERFACE_NAME = "Port CRUD Interface";
private static final String UUID_NO_EXIST = "Port UUID does not exist.";
- private static final String UUID_EXISTS = "Port UUID already exists.";
private static final String NO_PROVIDERS = "No providers registered. Please try again later";
private static final String NO_PROVIDER_LIST = "Couldn't get providers list. Please try again later";
- private static final String NET_UUID_MATCH = "Network UUID must match that of subnet";
-
- private static final String MAC_REGEX="^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$";
private NeutronPort extractFields(NeutronPort o, List<String> fields) {
return o.extractFields(fields);
//@TypeHint(OpenStackPorts.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "MAC generation failure"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createPorts(final NeutronPortRequest input) {
NeutronCRUDInterfaces interfaces = getNeutronInterfaces(true, true);
INeutronPortCRUD portInterface = interfaces.getPortInterface();
- INeutronNetworkCRUD networkInterface = interfaces.getNetworkInterface();
- INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
if (input.isSingleton()) {
NeutronPort singleton = input.getSingleton();
//@TypeHint(OpenStackPorts.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updatePort(
@PathParam("portUUID") String portUUID,
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deletePort(
@PathParam("portUUID") String portUUID) {
import org.opendaylight.neutron.spi.INeutronRouterCRUD;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
-import org.opendaylight.neutron.spi.NeutronNetwork;
-import org.opendaylight.neutron.spi.NeutronPort;
import org.opendaylight.neutron.spi.NeutronRouter;
import org.opendaylight.neutron.spi.NeutronRouter_Interface;
-import org.opendaylight.neutron.spi.NeutronSubnet;
/**
//@TypeHint(OpenStackRouters.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createRouters(final NeutronRouterRequest input) {
NeutronCRUDInterfaces interfaces = getNeutronInterfaces(true);
INeutronRouterCRUD routerInterface = interfaces.getRouterInterface();
- INeutronNetworkCRUD networkInterface = interfaces.getNetworkInterface();
if (input.isSingleton()) {
NeutronRouter singleton = input.getSingleton();
//@TypeHint(OpenStackRouters.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateRouter(
@PathParam("routerUUID") String routerUUID,
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteRouter(
@PathParam("routerUUID") String routerUUID) {
//@TypeHint(OpenStackRouterInterfaces.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response addRouterInterface(
@PathParam("routerUUID") String routerUUID,
) {
NeutronCRUDInterfaces interfaces = getAttachInterfaces();
INeutronRouterCRUD routerInterface = interfaces.getRouterInterface();
- INeutronPortCRUD portInterface = interfaces.getPortInterface();
- INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
NeutronRouter target = routerInterface.getRouter(routerUUID);
Object[] instances = NeutronUtil.getInstances(INeutronRouterAware.class, this);
//@TypeHint(OpenStackRouterInterfaces.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response removeRouterInterface(
@PathParam("routerUUID") String routerUUID,
) {
NeutronCRUDInterfaces interfaces = getAttachInterfaces();
INeutronRouterCRUD routerInterface = interfaces.getRouterInterface();
- INeutronPortCRUD portInterface = interfaces.getPortInterface();
- INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
Object[] instances = NeutronUtil.getInstances(INeutronRouterAware.class, this);
NeutronRouter target = routerInterface.getRouter(routerUUID);
@Consumes ({MediaType.APPLICATION_JSON})
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode (code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode (code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createSecurityGroups(final NeutronSecurityGroupRequest input) {
INeutronSecurityGroupCRUD securityGroupInterface = getNeutronInterfaces().getSecurityGroupInterface();
@Consumes ({MediaType.APPLICATION_JSON})
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode (code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateSecurityGroup(
@PathParam ("securityGroupUUID") String securityGroupUUID, final NeutronSecurityGroupRequest input) {
@DELETE
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode (code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteSecurityGroup(
@PathParam ("securityGroupUUID") String securityGroupUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
private static final int HTTP_OK_TOP = 299;
private static final String INTERFACE_NAME = "Security Rule CRUD Interface";
private static final String UUID_NO_EXIST = "Security Rule UUID does not exist.";
- private static final String UUID_EXISTS = "Security Rule UUID already exists.";
private static final String NO_PROVIDERS = "No providers registered. Please try again later";
private static final String NO_PROVIDER_LIST = "Couldn't get providers list. Please try again later";
@Consumes ({MediaType.APPLICATION_JSON})
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode (code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode (code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createSecurityRules(final NeutronSecurityRuleRequest input) {
INeutronSecurityRuleCRUD securityRuleInterface = getNeutronInterfaces().getSecurityRuleInterface();
@Consumes ({MediaType.APPLICATION_JSON})
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode (code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateSecurityRule(
@PathParam ("securityRuleUUID") String securityRuleUUID, final NeutronSecurityRuleRequest input) {
@DELETE
@StatusCodes ({
@ResponseCode (code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode (code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode (code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode (code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteSecurityRule(
@PathParam ("securityRuleUUID") String securityRuleUUID) {
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
private static final int HTTP_OK_TOP = 299;
private static final String INTERFACE_NAME = "Subnet CRUD Interface";
private static final String UUID_NO_EXIST = "Subnet UUID does not exist.";
- private static final String UUID_EXISTS = "Subnet UUID already exists.";
private static final String NO_PROVIDERS = "No providers registered. Please try again later";
private static final String NO_PROVIDER_LIST = "Couldn't get providers list. Please try again later";
//@TypeHint(OpenStackSubnets.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createSubnets(final NeutronSubnetRequest input) {
NeutronCRUDInterfaces interfaces = getNeutronInterfaces(true);
INeutronSubnetCRUD subnetInterface = interfaces.getSubnetInterface();
- INeutronNetworkCRUD networkInterface = interfaces.getNetworkInterface();
if (input.isSingleton()) {
NeutronSubnet singleton = input.getSingleton();
//@TypeHint(OpenStackSubnets.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateSubnet(
@PathParam("subnetUUID") String subnetUUID, final NeutronSubnetRequest input
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteSubnet(
@PathParam("subnetUUID") String subnetUUID) {
@TypeHint(NeutronVPNIKEPolicy.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createVPNIKEPolicy(final NeutronVPNIKEPolicyRequest input) {
INeutronVPNIKEPolicyCRUD ikePolicyInterface = getNeutronInterfaces().getVPNIKEPolicyInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateVPNIKEPolicy(
@PathParam("policyID") String policyUUID, final NeutronVPNIKEPolicyRequest input
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteVPNIKEPolicy(
@PathParam("policyID") String policyUUID) {
@TypeHint(NeutronVPNIPSECPolicy.class)
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createVPNIPSECPolicy(final NeutronVPNIPSECPolicyRequest input) {
INeutronVPNIPSECPolicyCRUD ipsecPolicyInterface = getNeutronInterfaces().getVPNIPSECPolicyInterface();
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateVPNIPSECPolicy(
@PathParam("policyID") String policyUUID, final NeutronVPNIPSECPolicyRequest input
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteVPNIPSECPolicy(
@PathParam("policyID") String policyUUID) {
@Consumes({ MediaType.APPLICATION_JSON })
@TypeHint(NeutronVPNIPSECSiteConnection.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createVPNIPSECSiteConnection(final NeutronVPNIPSECSiteConnectionRequest input) {
INeutronVPNIPSECSiteConnectionsCRUD ipsecSiteConnectionsInterface = getNeutronInterfaces()
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateVPNIPSECSiteConnection(@PathParam("policyID") String policyID,
final NeutronVPNIPSECSiteConnectionRequest input) {
@Path("{policyID}")
@DELETE
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteVPNIPSECSiteConnection(@PathParam("policyID") String policyID) {
INeutronVPNIPSECSiteConnectionsCRUD ipsecSiteConnectionsInterface = getNeutronInterfaces()
import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@Consumes({ MediaType.APPLICATION_JSON })
@TypeHint(NeutronVPNService.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response createVPNService(final NeutronVPNServiceRequest input) {
INeutronVPNServiceCRUD VPNServiceInterface = getNeutronInterfaces().getVPNServiceInterface();
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
- @ResponseCode(code = HttpURLConnection.HTTP_BAD_REQUEST, condition = "Bad Request"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_FORBIDDEN, condition = "Forbidden"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateVPNService(@PathParam("serviceID") String serviceID, final NeutronVPNServiceRequest input) {
INeutronVPNServiceCRUD VPNServiceInterface = getNeutronInterfaces().getVPNServiceInterface();
@Path("{serviceID}")
@DELETE
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
- @ResponseCode(code = HttpURLConnection.HTTP_UNAUTHORIZED, condition = "Unauthorized"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
- @ResponseCode(code = HttpURLConnection.HTTP_CONFLICT, condition = "Conflict"),
- @ResponseCode(code = HttpURLConnection.HTTP_NOT_IMPLEMENTED, condition = "Not Implemented"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteVPNService(@PathParam("serviceID") String serviceID) {
INeutronVPNServiceCRUD VPNServiceInterface = getNeutronInterfaces().getVPNServiceInterface();
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
import org.opendaylight.neutron.spi.NeutronFloatingIP;
-import org.opendaylight.neutron.spi.NeutronPort;
import org.opendaylight.neutron.spi.NeutronSubnet;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l3.rev141002.floatingips.attributes.Floatingips;
@Override
public boolean addFloatingIP(NeutronFloatingIP input) {
- NeutronCRUDInterfaces interfaces = new NeutronCRUDInterfaces()
- .fetchINeutronNetworkCRUD(this)
- .fetchINeutronSubnetCRUD(this)
- .fetchINeutronPortCRUD(this);
- INeutronNetworkCRUD networkCRUD = interfaces.getNetworkInterface();
- INeutronSubnetCRUD subnetCRUD = interfaces.getSubnetInterface();
- INeutronPortCRUD portCRUD = interfaces.getPortInterface();
-
if (floatingIPExists(input.getID())) {
return false;
}
- //if floating_ip_address isn't there, allocate from the subnet pool
- NeutronSubnet subnet = subnetCRUD.getSubnet(networkCRUD.getNetwork(input.getFloatingNetworkUUID()).getSubnets().get(0));
- if (input.getFloatingIPAddress() == null) {
- input.setFloatingIPAddress(subnet.getLowAddr());
- }
floatingIPDB.putIfAbsent(input.getID(), input);
return true;
}
@Override
public boolean removeFloatingIP(String uuid) {
- NeutronCRUDInterfaces interfaces = new NeutronCRUDInterfaces()
- .fetchINeutronPortCRUD(this);
- INeutronPortCRUD portCRUD = interfaces.getPortInterface();
-
if (!floatingIPExists(uuid)) {
return false;
}
@Override
public boolean updateFloatingIP(String uuid, NeutronFloatingIP delta) {
- NeutronCRUDInterfaces interfaces = new NeutronCRUDInterfaces()
- .fetchINeutronPortCRUD(this);
- INeutronPortCRUD portCRUD = interfaces.getPortInterface();
-
if (!floatingIPExists(uuid)) {
return false;
}
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.Map.Entry;
import java.util.Set;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
return result;
}
- protected Network toMd(NeutronNetwork network) {
-
+ private void fillExtensions(NetworkBuilder networkBuilder,
+ NeutronNetwork network) {
NetworkL3ExtensionBuilder l3ExtensionBuilder = new NetworkL3ExtensionBuilder();
if (network.getRouterExternal() != null) {
l3ExtensionBuilder.setExternal(network.getRouterExternal());
providerExtensionBuilder.setSegmentationId(network.getProviderSegmentationID());
}
- NetworkBuilder networkBuilder = new NetworkBuilder();
networkBuilder.addAugmentation(NetworkL3Extension.class,
l3ExtensionBuilder.build());
networkBuilder.addAugmentation(NetworkProviderExtension.class,
providerExtensionBuilder.build());
+ }
+
+ protected Network toMd(NeutronNetwork network) {
+ NetworkBuilder networkBuilder = new NetworkBuilder();
+ fillExtensions(networkBuilder, network);
networkBuilder.setAdminStateUp(network.getAdminStateUp());
if (network.getNetworkName() != null) {
import java.util.concurrent.ConcurrentMap;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.neutron.spi.INeutronNetworkCRUD;
import org.opendaylight.neutron.spi.INeutronPortCRUD;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
-import org.opendaylight.neutron.spi.NeutronNetwork;
import org.opendaylight.neutron.spi.NeutronPort;
import org.opendaylight.neutron.spi.NeutronPort_AllowedAddressPairs;
import org.opendaylight.neutron.spi.NeutronPort_ExtraDHCPOption;