fixedIPs.addAll(this.getFixedIPs()); ans.setFixedIPs(fixedIPs);
throw new ResourceNotFoundException("Port UUID doesn't exist."); NeutronPort port = portInterface.getPort(port_id); if (port.getFixedIPs().size() < 1) throw new BadRequestException("port ID doesn't have a fixed IP address."); if (port.getFixedIPs().size() > 1) { fixedIP = singleton.getFixedIPAddress(); if (fixedIP == null) throw new BadRequestException("request doesn't have a fixed IP address"); Iterator<Neutron_IPs> i = port.getFixedIPs().iterator(); boolean validFixedIP = false; while (i.hasNext() && !validFixedIP) { throw new BadRequestException("couldn't find a valid fixed IP address"); } else { fixedIP = port.getFixedIPs().get(0).getIpAddress(); if (singleton.getFixedIPAddress() != null && !fixedIP.equalsIgnoreCase(singleton.getFixedIPAddress()))
throw new ResourceNotFoundException("Port UUID doesn't exist."); NeutronPort port = portInterface.getPort(port_id); if (port.getFixedIPs().size() < 1) throw new BadRequestException("port UUID doesn't have an IP address."); if (port.getFixedIPs().size() > 1) { fixedIP = singleton.getFixedIPAddress(); if (fixedIP == null) throw new BadRequestException("fixed IP address doesn't exist."); Iterator<Neutron_IPs> i = port.getFixedIPs().iterator(); boolean validFixedIP = false; while (i.hasNext() && !validFixedIP) { throw new BadRequestException("can't find a valid fixed IP address"); } else { fixedIP = port.getFixedIPs().get(0).getIpAddress(); if (singleton.getFixedIPAddress() != null && !fixedIP.equalsIgnoreCase(singleton.getFixedIPAddress())) throw new BadRequestException("mismatched fixed IP address in request");
throw new BadRequestException("Port id not part of subnet id"); if (targetPort.getFixedIPs().size() != 1) throw new BadRequestException("Port id must have a single fixedIP address"); if (targetPort.getDeviceID() != null && !targetPort.getDeviceID().equals(routerUUID))
List<Neutron_IPs> fixedIPs = singleton.getFixedIPs(); if (fixedIPs != null && fixedIPs.size() > 0) { Iterator<Neutron_IPs> fixedIPIterator = fixedIPs.iterator();
List<Neutron_IPs> fixedIPs = singleton.getFixedIPs(); if (fixedIPs != null && fixedIPs.size() > 0) { Iterator<Neutron_IPs> fixedIPIterator = fixedIPs.iterator(); throw new ResourceConflictException("MAC address already allocated"); for (Neutron_IPs test_fixedIP : test.getFixedIPs()) { for (Neutron_IPs check_fixedIP : check.getFixedIPs()) { if (test_fixedIP.getIpAddress().equals(check_fixedIP.getIpAddress())) { throw new ResourceConflictException("IP address already allocated"); List<Neutron_IPs> fixedIPs = test.getFixedIPs(); if (fixedIPs != null && fixedIPs.size() > 0) { Iterator<Neutron_IPs> fixedIPIterator = fixedIPs.iterator();
throw new ResourceNotFoundException("Port UUID not found"); if (port.getFixedIPs() == null) { throw new ResourceNotFoundException("Port UUID has no fixed IPs"); throw new ResourceNotFoundException("Subnet UUID not found"); if (!subnet.isValidIP(port.getFixedIPs().get(0).getIpAddress())) throw new ResourceConflictException("Target Port IP not in Target Subnet"); Object[] instances = ServiceHelper.getGlobalInstances(INeutronRouterAware.class, this, null);
NeutronNetwork neutronNetwork = neutronNetworkIf.getNetwork(port.getNetworkUUID()); INeutronSubnetCRUD neutronSubnetIf = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this); NeutronSubnet neutronSubnet = neutronSubnetIf.getSubnet(port.getFixedIPs().get(0).getSubnetUUID());
NeutronNetwork neutronNetwork = neutronNetworkIf.getNetwork(port.getNetworkUUID()); INeutronSubnetCRUD neutronSubnetIf = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this); NeutronSubnet neutronSubnet = neutronSubnetIf.getSubnet(port.getFixedIPs().get(0).getSubnetUUID()); if (!neutronNetwork.isRouterExternal()) { if (neutronNetwork.isShared()) {