fix AbbreviationAsWordInName and enable AbbreviationAsWordInName.
Change-Id: I6d0756598b7d2a000325b4986e2752aacfd30eb3
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
NeutronSubnetTests.runTests(base);
NeutronPortTests.runTests(base);
NeutronRouterTests.runTests(base);
- NeutronFloatingIPTests.runTests(base);
+ NeutronFloatingIpTests.runTests(base);
NeutronSecurityGroupTests.runTests(base);
NeutronSecurityRuleTests.runTests(base);
NeutronFirewallTests.runTests(base);
NeutronLBHealthMonitorTests.runTests(base);
NeutronMeteringLabelTests.runTests(base);
NeutronMeteringRuleTests.runTests(base);
- NeutronVPNServicesTests.runTests(base);
- NeutronIPSECPoliciesTests.runTests(base);
- NeutronIPSECSiteConnectionTests.runTests(base);
+ NeutronVpnServicesTests.runTests(base);
+ NeutronIpSecPoliciesTests.runTests(base);
+ NeutronIpSecSiteConnectionTests.runTests(base);
NeutronIKEPoliciesTests.runTests(base);
NeutronBgpvpnTests.runTests(base);
NeutronL2GatewayTests.runTests(base);
package org.opendaylight.neutron.e2etest;
-public class NeutronFloatingIPTests {
+public class NeutronFloatingIpTests {
String base;
- public NeutronFloatingIPTests(String base) {
+ public NeutronFloatingIpTests(String base) {
this.base = base;
}
- public void floatingIP_collection_get_test() {
+ public void floatingIp_collection_get_test() {
String url = base + "/floatingips";
- ITNeutronE2E.test_fetch(url, "FloatingIP Collection GET failed");
+ ITNeutronE2E.test_fetch(url, "FloatingIp Collection GET failed");
}
- public String singleton_floatingIP_create_test() {
+ public String singleton_floatingIp_create_test() {
String url = base + "/floatingips";
String content = "{ \"floatingip\": { " + "\"fixed_ip_address\": \"10.0.0.3\","
+ "\"floating_ip_address\": \"172.24.4.228\","
return content;
}
- public void singleton_floatingIP_get_with_one_query_item_test(String createJsonString) {
+ public void singleton_floatingIp_get_with_one_query_item_test(String createJsonString) {
String url = base + "/floatingips";
ITNeutronE2E.test_fetch_with_one_query_item(url, createJsonString, "floatingips");
}
- public void update_floatingIP_test() {
+ public void update_floatingIp_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7";
String content1 = "{ \"floatingip\": {" + "\"floating_network_id\": \"376da547-b977-4cfe-9cba-275c80debf57\","
+ "\"router_id\": \"d23abc8d-2991-4a55-ba98-2aaea84cc72f\"," + "\"fixed_ip_address\": \"10.0.0.4\","
ITNeutronE2E.test_modify(url, content2, "Singleton Floating IP Put 2 Failed NB");
}
- public void floatingIP_element_get_test() {
+ public void floatingIp_element_get_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7";
ITNeutronE2E.test_fetch(url, true, "Floating IP Element Get Test");
}
- public void floatingIP_element_get_with_query_test() {
+ public void floatingIp_element_get_with_query_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7"
+ "?fields=id&fields=floating_network_id&fields=port_id&fields=status"
+ "&fields=fixed_ip_address&fields=floating_ip_address&fields=tenant_id"
ITNeutronE2E.test_fetch(url, true, "Floating IP Element Get Query Test");
}
- public void floatingIP_delete_test() {
+ public void floatingIp_delete_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7";
ITNeutronE2E.test_delete(url, "Floating IP Delete Test");
}
- public void floatingIP_element_negative_get_test() {
+ public void floatingIp_element_negative_get_test() {
String url = base + "/floatingips/2f245a7b-796b-4f26-9cf9-9e82d248fda7";
ITNeutronE2E.test_fetch(url, false, "Floating IP Element Negative Get Test");
}
public static void runTests(String base) {
- NeutronFloatingIPTests floatingIPTester = new NeutronFloatingIPTests(base);
- String createJsonString = floatingIPTester.singleton_floatingIP_create_test();
- floatingIPTester.singleton_floatingIP_get_with_one_query_item_test(createJsonString);
- floatingIPTester.update_floatingIP_test();
- floatingIPTester.floatingIP_element_get_test();
- floatingIPTester.floatingIP_element_get_with_query_test();
- floatingIPTester.floatingIP_collection_get_test();
- floatingIPTester.floatingIP_delete_test();
- floatingIPTester.floatingIP_element_negative_get_test();
+ NeutronFloatingIpTests floatingIpTester = new NeutronFloatingIpTests(base);
+ String createJsonString = floatingIpTester.singleton_floatingIp_create_test();
+ floatingIpTester.singleton_floatingIp_get_with_one_query_item_test(createJsonString);
+ floatingIpTester.update_floatingIp_test();
+ floatingIpTester.floatingIp_element_get_test();
+ floatingIpTester.floatingIp_element_get_with_query_test();
+ floatingIpTester.floatingIp_collection_get_test();
+ floatingIpTester.floatingIp_delete_test();
+ floatingIpTester.floatingIp_element_negative_get_test();
}
}
package org.opendaylight.neutron.e2etest;
-public class NeutronIPSECPoliciesTests {
+public class NeutronIpSecPoliciesTests {
String base;
- public NeutronIPSECPoliciesTests(String base) {
+ public NeutronIpSecPoliciesTests(String base) {
this.base = base;
}
}
public static void runTests(String base) {
- NeutronIPSECPoliciesTests ipsecPolicyTester = new NeutronIPSECPoliciesTests(base);
+ NeutronIpSecPoliciesTests ipsecPolicyTester = new NeutronIpSecPoliciesTests(base);
String createJsonString = ipsecPolicyTester.singleton_ipsecPolicy_create_test();
ipsecPolicyTester.singleton_ipsecPolicy_get_with_one_query_item_test(createJsonString);
ipsecPolicyTester.ipsecPolicy_update_test();
package org.opendaylight.neutron.e2etest;
-public class NeutronIPSECSiteConnectionTests {
+public class NeutronIpSecSiteConnectionTests {
String base;
- public NeutronIPSECSiteConnectionTests(String base) {
+ public NeutronIpSecSiteConnectionTests(String base) {
this.base = base;
}
}
public static void runTests(String base) {
- NeutronIPSECSiteConnectionTests ipsecSiteConnectionTester = new NeutronIPSECSiteConnectionTests(base);
+ NeutronIpSecSiteConnectionTests ipsecSiteConnectionTester = new NeutronIpSecSiteConnectionTests(base);
String createJsonString = ipsecSiteConnectionTester.singleton_ipsecSiteConnection_create_test();
ipsecSiteConnectionTester.singleton_ipsecSiteConnection_get_with_one_query_item_test(createJsonString);
ipsecSiteConnectionTester.ipsecSiteConnection_update_test();
package org.opendaylight.neutron.e2etest;
-public class NeutronVPNServicesTests {
+public class NeutronVpnServicesTests {
String base;
- public NeutronVPNServicesTests(String base) {
+ public NeutronVpnServicesTests(String base) {
this.base = base;
}
}
public static void runTests(String base) {
- NeutronVPNServicesTests vpnServiceTester = new NeutronVPNServicesTests(base);
+ NeutronVpnServicesTests vpnServiceTester = new NeutronVpnServicesTests(base);
String createJsonString = vpnServiceTester.singleton_vpnservice_create_test();
vpnServiceTester.singleton_vpnservice_get_with_one_query_item_test(createJsonString);
vpnServiceTester.vpnservice_update_test();
package org.opendaylight.neutron.spi;
/**
- * This interface defines the methods for CRUD of NB FloatingIP objects.
+ * This interface defines the methods for CRUD of NB FloatingIp objects.
*
*/
-public interface INeutronFloatingIPCRUD extends INeutronCRUD<NeutronFloatingIP> {
+public interface INeutronFloatingIpCRUD extends INeutronCRUD<NeutronFloatingIp> {
// Nothing Here.
// This class is defined to use reflection.
}
package org.opendaylight.neutron.spi;
-public interface INeutronVPNIKEPolicyCRUD extends INeutronCRUD<NeutronVPNIKEPolicy> {
+public interface INeutronVpnIkePolicyCRUD extends INeutronCRUD<NeutronVpnIkePolicy> {
// Nothing Here.
// This class is defined to use reflection.
}
package org.opendaylight.neutron.spi;
-public interface INeutronVPNIPSECPolicyCRUD extends INeutronCRUD<NeutronVPNIPSECPolicy> {
+public interface INeutronVpnIpSecPolicyCRUD extends INeutronCRUD<NeutronVpnIpSecPolicy> {
// Nothing Here.
// This class is defined to use reflection.
}
package org.opendaylight.neutron.spi;
-public interface INeutronVPNIPSECSiteConnectionsCRUD extends INeutronCRUD<NeutronVPNIPSECSiteConnection> {
+public interface INeutronVpnIpSecSiteConnectionsCRUD extends INeutronCRUD<NeutronVpnIpSecSiteConnection> {
// Nothing Here.
// This class is defined to use reflection.
}
*
*/
-public interface INeutronVPNServiceCRUD extends INeutronCRUD<NeutronVPNService> {
+public interface INeutronVpnServiceCRUD extends INeutronCRUD<NeutronVpnService> {
// Nothing Here.
// This class is defined to use reflection.
}
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronFloatingIP
- extends NeutronObject<NeutronFloatingIP> implements Serializable, INeutronObject<NeutronFloatingIP> {
+public final class NeutronFloatingIp
+ extends NeutronObject<NeutronFloatingIp> implements Serializable, INeutronObject<NeutronFloatingIp> {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
String portUUID;
@XmlElement(name = "fixed_ip_address")
- String fixedIPAddress;
+ String fixedIpAddress;
@XmlElement(name = "floating_ip_address")
- String floatingIPAddress;
+ String floatingIpAddress;
@XmlElement(name = "router_id")
String routerUUID;
@XmlElement(name = "status")
String status;
- public NeutronFloatingIP() {
+ public NeutronFloatingIp() {
}
public String getFloatingNetworkUUID() {
this.portUUID = portUUID;
}
- public String getFixedIPAddress() {
- return fixedIPAddress;
+ public String getFixedIpAddress() {
+ return fixedIpAddress;
}
- public void setFixedIPAddress(String fixedIPAddress) {
- this.fixedIPAddress = fixedIPAddress;
+ public void setFixedIpAddress(String fixedIpAddress) {
+ this.fixedIpAddress = fixedIpAddress;
}
- public String getFloatingIPAddress() {
- return floatingIPAddress;
+ public String getFloatingIpAddress() {
+ return floatingIpAddress;
}
- public void setFloatingIPAddress(String floatingIPAddress) {
- this.floatingIPAddress = floatingIPAddress;
+ public void setFloatingIpAddress(String floatingIpAddress) {
+ this.floatingIpAddress = floatingIpAddress;
}
public void setRouterUUID(String routerUUID) {
*
* @param fields
* List of attributes to be extracted
- * @return an OpenStackFloatingIPs object with only the selected fields
+ * @return an OpenStackFloatingIps object with only the selected fields
* populated
*/
- public NeutronFloatingIP extractFields(List<String> fields) {
- NeutronFloatingIP ans = new NeutronFloatingIP();
+ public NeutronFloatingIp extractFields(List<String> fields) {
+ NeutronFloatingIp ans = new NeutronFloatingIp();
for (String s : fields) {
extractField(s, ans);
if (s.equals("floating_network_id")) {
ans.setPortUUID(this.getPortUUID());
}
if (s.equals("fixed_ip_address")) {
- ans.setFixedIPAddress(this.getFixedIPAddress());
+ ans.setFixedIpAddress(this.getFixedIpAddress());
}
if (s.equals("floating_ip_address")) {
- ans.setFloatingIPAddress(this.getFloatingIPAddress());
+ ans.setFloatingIpAddress(this.getFloatingIpAddress());
}
if (s.equals("router_id")) {
ans.setRouterUUID(this.getRouterUUID());
@Override
public String toString() {
- return "NeutronFloatingIP{" + "fipUUID='" + uuid + '\'' + ", fipFloatingNetworkId='" + floatingNetworkUUID
- + '\'' + ", fipPortUUID='" + portUUID + '\'' + ", fipFixedIPAddress='" + fixedIPAddress + '\''
- + ", fipFloatingIPAddress=" + floatingIPAddress + ", fipTenantId='" + tenantID + '\''
+ return "NeutronFloatingIp{" + "fipUUID='" + uuid + '\'' + ", fipFloatingNetworkId='" + floatingNetworkUUID
+ + '\'' + ", fipPortUUID='" + portUUID + '\'' + ", fipFixedIpAddress='" + fixedIpAddress + '\''
+ + ", fipFloatingIpAddress=" + floatingIpAddress + ", fipTenantId='" + tenantID + '\''
+ ", fipRouterId='" + routerUUID + '\'' + ", fipStatus='" + status + '\'' + '}';
}
}
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronIPs implements Serializable {
+public final class NeutronIps implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
@XmlElement(name = "subnet_id")
String subnetUUID;
- public NeutronIPs() {
+ public NeutronIps() {
}
- public NeutronIPs(String uuid) {
+ public NeutronIps(String uuid) {
subnetUUID = uuid;
}
@Override
public String toString() {
- return "NeutronIPs{" + "ipAddress='" + ipAddress + '\'' + ", subnetUUID='" + subnetUUID + '\'' + "}";
+ return "NeutronIps{" + "ipAddress='" + ipAddress + '\'' + ", subnetUUID='" + subnetUUID + '\'' + "}";
}
}
Boolean meteringLabelRuleExcluded;
@XmlElement(name = "remote_ip_prefix")
- String meteringLabelRuleRemoteIPPrefix;
+ String meteringLabelRuleRemoteIpPrefix;
@XmlElement(name = "metering_label_id")
String meteringLabelRuleLabelID;
this.meteringLabelRuleExcluded = excluded;
}
- public String getMeteringLabelRuleRemoteIPPrefix() {
- return meteringLabelRuleRemoteIPPrefix;
+ public String getMeteringLabelRuleRemoteIpPrefix() {
+ return meteringLabelRuleRemoteIpPrefix;
}
- public void setMeteringLabelRuleRemoteIPPrefix(String prefix) {
- this.meteringLabelRuleRemoteIPPrefix = prefix;
+ public void setMeteringLabelRuleRemoteIpPrefix(String prefix) {
+ this.meteringLabelRuleRemoteIpPrefix = prefix;
}
public String getMeteringLabelRuleLabelID() {
public String toString() {
return "NeutronMeteringLabelRule [id=" + uuid + ", tenantID=" + tenantID + ", direction="
+ meteringLabelRuleDirection + ", excluded=" + meteringLabelRuleExcluded + ", remote_ip_prefix="
- + meteringLabelRuleRemoteIPPrefix + ", metering_label_id=" + meteringLabelRuleLabelID + "]";
+ + meteringLabelRuleRemoteIpPrefix + ", metering_label_id=" + meteringLabelRuleLabelID + "]";
}
/**
ans.setMeteringLabelRuleExcluded(this.getMeteringLabelRuleExcluded());
}
if (s.equals("remote_ip_prefix")) {
- ans.setMeteringLabelRuleRemoteIPPrefix(this.getMeteringLabelRuleRemoteIPPrefix());
+ ans.setMeteringLabelRuleRemoteIpPrefix(this.getMeteringLabelRuleRemoteIpPrefix());
}
if (s.equals("metering_label_id")) {
ans.setMeteringLabelRuleLabelID(this.getMeteringLabelRuleLabelID());
String macAddress;
@XmlElement(name = "fixed_ips")
- List<NeutronIPs> fixedIPs;
+ List<NeutronIps> fixedIps;
@XmlElement(name = "device_id")
String deviceID;
this.macAddress = macAddress;
}
- public List<NeutronIPs> getFixedIPs() {
- return fixedIPs;
+ public List<NeutronIps> getFixedIps() {
+ return fixedIps;
}
- public void setFixedIPs(List<NeutronIPs> fixedIPs) {
- this.fixedIPs = fixedIPs;
+ public void setFixedIps(List<NeutronIps> fixedIps) {
+ this.fixedIps = fixedIps;
}
public String getDeviceID() {
ans.setMacAddress(this.getMacAddress());
}
if ("fixed_ips".equals(field)) {
- ans.setFixedIPs(new ArrayList<NeutronIPs>(this.getFixedIPs()));
+ ans.setFixedIps(new ArrayList<NeutronIps>(this.getFixedIps()));
}
if ("device_id".equals(field)) {
ans.setDeviceID(this.getDeviceID());
if (status == null) {
status = "ACTIVE";
}
- if (fixedIPs == null) {
- fixedIPs = new ArrayList<NeutronIPs>();
+ if (fixedIps == null) {
+ fixedIps = new ArrayList<NeutronIps>();
}
}
@Override
public String toString() {
return "NeutronPort [portUUID=" + uuid + ", networkUUID=" + networkUUID + ", name=" + name + ", adminStateUp="
- + adminStateUp + ", status=" + status + ", macAddress=" + macAddress + ", fixedIPs=" + fixedIPs
+ + adminStateUp + ", status=" + status + ", macAddress=" + macAddress + ", fixedIps=" + fixedIps
+ ", deviceID=" + deviceID + ", deviceOwner=" + deviceOwner + ", tenantID=" + tenantID
+ ", securityGroups=" + securityGroups + ", allowedAddressPairs" + allowedAddressPairs
+ ", bindinghostID=" + bindinghostID + ", bindingvnicType=" + bindingvnicType + ", bindingvifType="
Boolean enableSNAT;
@XmlElement(name = "external_fixed_ips")
- List<NeutronIPs> externalFixedIPs;
+ List<NeutronIps> externalFixedIps;
public NeutronRouterNetworkReference() {
}
this.enableSNAT = enableSNAT;
}
- public List<NeutronIPs> getExternalFixedIPs() {
- return externalFixedIPs;
+ public List<NeutronIps> getExternalFixedIps() {
+ return externalFixedIps;
}
- public void setExternalFixedIPs(List<NeutronIPs> externalFixedIPs) {
- this.externalFixedIPs = externalFixedIPs;
+ public void setExternalFixedIps(List<NeutronIps> externalFixedIps) {
+ this.externalFixedIps = externalFixedIps;
}
@Override
public String toString() {
return "NeutronRouterNetworkReference [networkID=" + networkID + " enableSNAT=" + enableSNAT
- + " externalFixedIPs=" + externalFixedIPs + "]";
+ + " externalFixedIps=" + externalFixedIps + "]";
}
}
String cidr;
@XmlElement(name = "gateway_ip")
- String gatewayIP;
+ String gatewayIp;
@XmlElement(name = "dns_nameservers")
List<String> dnsNameservers;
@XmlElement(name = "allocation_pools")
- List<NeutronSubnetIPAllocationPool> allocationPools;
+ List<NeutronSubnetIpAllocationPool> allocationPools;
@XmlElement(name = "host_routes")
List<NeutronRoute> hostRoutes;
this.cidr = cidr;
}
- public String getGatewayIP() {
- return gatewayIP;
+ public String getGatewayIp() {
+ return gatewayIp;
}
- public void setGatewayIP(String gatewayIP) {
- this.gatewayIP = gatewayIP;
+ public void setGatewayIp(String gatewayIp) {
+ this.gatewayIp = gatewayIp;
}
public List<String> getDnsNameservers() {
this.dnsNameservers = dnsNameservers;
}
- public List<NeutronSubnetIPAllocationPool> getAllocationPools() {
+ public List<NeutronSubnetIpAllocationPool> getAllocationPools() {
return allocationPools;
}
- public void setAllocationPools(List<NeutronSubnetIPAllocationPool> allocationPools) {
+ public void setAllocationPools(List<NeutronSubnetIpAllocationPool> allocationPools) {
this.allocationPools = allocationPools;
}
ans.setCidr(this.getCidr());
}
if (s.equals("gateway_ip")) {
- ans.setGatewayIP(this.getGatewayIP());
+ ans.setGatewayIp(this.getGatewayIp());
}
if (s.equals("dns_nameservers")) {
List<String> nsList = new ArrayList<String>();
ans.setDnsNameservers(nsList);
}
if (s.equals("allocation_pools")) {
- List<NeutronSubnetIPAllocationPool> pools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
pools.addAll(this.getAllocationPools());
ans.setAllocationPools(pools);
}
* allocation pools (an error condition when creating a new subnet
* or assigning a gateway IP)
*/
- public boolean gatewayIP_Pool_overlap() {
- for (NeutronSubnetIPAllocationPool pool : allocationPools) {
- if (ipVersion == IPV4_VERSION && pool.contains(gatewayIP)) {
+ public boolean gatewayIp_Pool_overlap() {
+ for (NeutronSubnetIpAllocationPool pool : allocationPools) {
+ if (ipVersion == IPV4_VERSION && pool.contains(gatewayIp)) {
return true;
}
- if (ipVersion == IPV6_VERSION && pool.containsV6(gatewayIP)) {
+ if (ipVersion == IPV6_VERSION && pool.containsV6(gatewayIp)) {
return true;
}
}
hostRoutes = new ArrayList<NeutronRoute>();
}
if (allocationPools == null) {
- allocationPools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ allocationPools = new ArrayList<NeutronSubnetIpAllocationPool>();
if (ipVersion == IPV4_VERSION) {
try {
SubnetUtils util = new SubnetUtils(cidr);
SubnetInfo info = util.getInfo();
- if (gatewayIP == null || ("").equals(gatewayIP)) {
- gatewayIP = info.getLowAddress();
+ if (gatewayIp == null || ("").equals(gatewayIp)) {
+ gatewayIp = info.getLowAddress();
}
if (allocationPools.size() < 1) {
- NeutronSubnetIPAllocationPool source = new NeutronSubnetIPAllocationPool(info.getLowAddress(),
+ NeutronSubnetIpAllocationPool source = new NeutronSubnetIpAllocationPool(info.getLowAddress(),
info.getHighAddress());
- allocationPools = source.splitPool(gatewayIP);
+ allocationPools = source.splitPool(gatewayIp);
}
} catch (IllegalArgumentException e) {
LOGGER.warn("Failure in initDefault()", e);
}
int length = Integer.parseInt(parts[1]);
- BigInteger lowAddressBi = NeutronSubnetIPAllocationPool.convertV6(parts[0]);
- String lowAddress = NeutronSubnetIPAllocationPool.bigIntegerToIP(lowAddressBi.add(BigInteger.ONE));
+ BigInteger lowAddressBi = NeutronSubnetIpAllocationPool.convertV6(parts[0]);
+ String lowAddress = NeutronSubnetIpAllocationPool.bigIntegerToIp(lowAddressBi.add(BigInteger.ONE));
BigInteger mask = BigInteger.ONE.shiftLeft(length).subtract(BigInteger.ONE);
- String highAddress = NeutronSubnetIPAllocationPool
- .bigIntegerToIP(lowAddressBi.add(mask).subtract(BigInteger.ONE));
- if (gatewayIP == null || ("").equals(gatewayIP)) {
- gatewayIP = lowAddress;
+ String highAddress = NeutronSubnetIpAllocationPool
+ .bigIntegerToIp(lowAddressBi.add(mask).subtract(BigInteger.ONE));
+ if (gatewayIp == null || ("").equals(gatewayIp)) {
+ gatewayIp = lowAddress;
}
if (allocationPools.size() < 1) {
- NeutronSubnetIPAllocationPool source = new NeutronSubnetIPAllocationPool(lowAddress,
+ NeutronSubnetIpAllocationPool source = new NeutronSubnetIpAllocationPool(lowAddress,
highAddress);
- allocationPools = source.splitPoolV6(gatewayIP);
+ allocationPools = source.splitPoolV6(gatewayIp);
}
}
}
/* this method tests to see if the supplied IPv4 address
* is valid for this subnet or not
*/
- public boolean isValidIP(String ipAddress) {
+ public boolean isValidIp(String ipAddress) {
if (ipVersion == IPV4_VERSION) {
try {
SubnetUtils util = new SubnetUtils(cidr);
SubnetInfo info = util.getInfo();
return info.isInRange(ipAddress);
} catch (IllegalArgumentException e) {
- LOGGER.warn("Failure in isValidIP()", e);
+ LOGGER.warn("Failure in isValidIp()", e);
return false;
}
}
}
return (true);
} catch (UnknownHostException e) {
- LOGGER.warn("Failure in isValidIP()", e);
+ LOGGER.warn("Failure in isValidIp()", e);
return (false);
}
}
*/
public String getLowAddr() {
String ans = null;
- for (NeutronSubnetIPAllocationPool pool : allocationPools) {
+ for (NeutronSubnetIpAllocationPool pool : allocationPools) {
if (ans == null) {
ans = pool.getPoolStart();
} else {
- if (ipVersion == IPV4_VERSION && NeutronSubnetIPAllocationPool
- .convert(pool.getPoolStart()) < NeutronSubnetIPAllocationPool.convert(ans)) {
+ if (ipVersion == IPV4_VERSION && NeutronSubnetIpAllocationPool
+ .convert(pool.getPoolStart()) < NeutronSubnetIpAllocationPool.convert(ans)) {
ans = pool.getPoolStart();
}
- if (ipVersion == IPV6_VERSION && NeutronSubnetIPAllocationPool.convertV6(pool.getPoolStart())
- .compareTo(NeutronSubnetIPAllocationPool.convertV6(ans)) < 0) {
+ if (ipVersion == IPV6_VERSION && NeutronSubnetIpAllocationPool.convertV6(pool.getPoolStart())
+ .compareTo(NeutronSubnetIpAllocationPool.convertV6(ans)) < 0) {
ans = pool.getPoolStart();
}
}
@Override
public String toString() {
return "NeutronSubnet [subnetUUID=" + uuid + ", networkUUID=" + networkUUID + ", name=" + name + ", ipVersion="
- + ipVersion + ", cidr=" + cidr + ", gatewayIP=" + gatewayIP + ", dnsNameservers=" + dnsNameservers
+ + ipVersion + ", cidr=" + cidr + ", gatewayIp=" + gatewayIp + ", dnsNameservers=" + dnsNameservers
+ ", allocationPools=" + allocationPools + ", hostRoutes=" + hostRoutes + ", enableDHCP=" + enableDHCP
+ ", tenantID=" + tenantID + ", ipv6AddressMode=" + ipV6AddressMode + ", ipv6RaMode=" + ipV6RaMode
+ "]";
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronSubnetIPAllocationPool implements Serializable {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSubnetIPAllocationPool.class);
+public final class NeutronSubnetIpAllocationPool implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSubnetIpAllocationPool.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "end")
String poolEnd;
- public NeutronSubnetIPAllocationPool() {
+ public NeutronSubnetIpAllocationPool() {
}
- public NeutronSubnetIPAllocationPool(String lowAddress, String highAddress) {
+ public NeutronSubnetIpAllocationPool(String lowAddress, String highAddress) {
poolStart = lowAddress;
poolEnd = highAddress;
}
*/
public boolean contains(String inputString) {
- long inputIP = convert(inputString);
- long startIP = convert(poolStart);
- long endIP = convert(poolEnd);
- return inputIP >= startIP && inputIP <= endIP;
+ long inputIp = convert(inputString);
+ long startIp = convert(poolStart);
+ long endIp = convert(poolEnd);
+ return inputIp >= startIp && inputIp <= endIp;
}
/**
*/
public boolean containsV6(String inputString) {
- BigInteger inputIP = convertV6(inputString);
- BigInteger startIP = convertV6(poolStart);
- BigInteger endIP = convertV6(poolEnd);
- return inputIP.compareTo(startIP) >= 0 && inputIP.compareTo(endIP) <= 0;
+ BigInteger inputIp = convertV6(inputString);
+ BigInteger startIp = convertV6(poolStart);
+ BigInteger endIp = convertV6(poolEnd);
+ return inputIp.compareTo(startIp) >= 0 && inputIp.compareTo(endIp) <= 0;
}
/**
* high-endian representation of the IPv4 address as a long
* @return IPv4 address in dotted decimal format
*/
- static String longToIP(long input) {
+ static String longToIp(long input) {
int part;
long ipLong = input;
String[] parts = new String[IPV4_DOTTED_QUADS];
* high-endian representation of the IPv4 address as a long
* @return IPv4 address in dotted decimal format
*/
- static String bigIntegerToIP(BigInteger ipv4BigInteger) {
+ static String bigIntegerToIp(BigInteger ipv4BigInteger) {
try {
return Inet6Address.getByAddress(ipv4BigInteger.toByteArray()).getHostAddress();
} catch (UnknownHostException e) {
- LOGGER.error("bigIntegerToIP", e);
+ LOGGER.error("bigIntegerToIp", e);
return "ERROR";
}
}
/*
- * helper routine used by longToIP
+ * helper routine used by longToIp
*/
public static String join(String[] strings, String separator) {
if (strings.length == 0) {
* create two new instances, one ranging from low to parameter-1
* the other ranging from parameter+1 to high
*/
- public List<NeutronSubnetIPAllocationPool> splitPool(String ipAddress) {
- List<NeutronSubnetIPAllocationPool> ans = new ArrayList<>();
- long givenIp = NeutronSubnetIPAllocationPool.convert(ipAddress);
- long startIp = NeutronSubnetIPAllocationPool.convert(poolStart);
- long endIp = NeutronSubnetIPAllocationPool.convert(poolEnd);
+ public List<NeutronSubnetIpAllocationPool> splitPool(String ipAddress) {
+ List<NeutronSubnetIpAllocationPool> ans = new ArrayList<>();
+ long givenIp = NeutronSubnetIpAllocationPool.convert(ipAddress);
+ long startIp = NeutronSubnetIpAllocationPool.convert(poolStart);
+ long endIp = NeutronSubnetIpAllocationPool.convert(poolEnd);
long ipaddr;
- NeutronSubnetIPAllocationPool pool = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
boolean poolStarted = false;
for (ipaddr = startIp; ipaddr <= endIp; ipaddr++) {
if (ipaddr == startIp) {
poolStarted = true;
} else {
//FIX for bug 533
- pool.setPoolStart(NeutronSubnetIPAllocationPool.longToIP(ipaddr + 1));
+ pool.setPoolStart(NeutronSubnetIpAllocationPool.longToIp(ipaddr + 1));
}
}
if (ipaddr == endIp) {
if (ipaddr != givenIp) {
pool.setPoolEnd(poolEnd);
} else {
- pool.setPoolEnd(NeutronSubnetIPAllocationPool.longToIP(ipaddr - 1));
+ pool.setPoolEnd(NeutronSubnetIpAllocationPool.longToIp(ipaddr - 1));
}
ans.add(pool);
}
if (ipaddr != startIp && ipaddr != endIp) {
if (ipaddr != givenIp) {
if (!poolStarted) {
- pool.setPoolStart(NeutronSubnetIPAllocationPool.longToIP(ipaddr));
+ pool.setPoolStart(NeutronSubnetIpAllocationPool.longToIp(ipaddr));
poolStarted = true;
}
} else {
- pool.setPoolEnd(NeutronSubnetIPAllocationPool.longToIP(ipaddr - 1));
+ pool.setPoolEnd(NeutronSubnetIpAllocationPool.longToIp(ipaddr - 1));
poolStarted = false;
ans.add(pool);
- pool = new NeutronSubnetIPAllocationPool();
+ pool = new NeutronSubnetIpAllocationPool();
// Fix for 2120
- pool.setPoolStart(NeutronSubnetIPAllocationPool.longToIP(ipaddr + 1));
+ pool.setPoolStart(NeutronSubnetIpAllocationPool.longToIp(ipaddr + 1));
poolStarted = true;
}
}
@Override
public String toString() {
- return "NeutronSubnetIPAllocationPool [" + "start=" + poolStart + ", end=" + poolEnd + "]";
+ return "NeutronSubnetIpAllocationPool [" + "start=" + poolStart + ", end=" + poolEnd + "]";
}
/*
* the other ranging from parameter+1 to high
* If the pool is a single address, return null
*/
- public List<NeutronSubnetIPAllocationPool> splitPoolV6(String ipAddress) {
- List<NeutronSubnetIPAllocationPool> ans = new ArrayList<>();
- BigInteger givenIp = NeutronSubnetIPAllocationPool.convertV6(ipAddress);
- BigInteger startIp = NeutronSubnetIPAllocationPool.convertV6(poolStart);
- BigInteger endIp = NeutronSubnetIPAllocationPool.convertV6(poolEnd);
+ public List<NeutronSubnetIpAllocationPool> splitPoolV6(String ipAddress) {
+ List<NeutronSubnetIpAllocationPool> ans = new ArrayList<>();
+ BigInteger givenIp = NeutronSubnetIpAllocationPool.convertV6(ipAddress);
+ BigInteger startIp = NeutronSubnetIpAllocationPool.convertV6(poolStart);
+ BigInteger endIp = NeutronSubnetIpAllocationPool.convertV6(poolEnd);
if (givenIp.compareTo(startIp) == 0 && givenIp.compareTo(endIp) < 0) {
- NeutronSubnetIPAllocationPool pool = new NeutronSubnetIPAllocationPool();
- pool.setPoolStart(NeutronSubnetIPAllocationPool.bigIntegerToIP(startIp.add(BigInteger.ONE)));
+ NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
+ pool.setPoolStart(NeutronSubnetIpAllocationPool.bigIntegerToIp(startIp.add(BigInteger.ONE)));
pool.setPoolEnd(poolEnd);
ans.add(pool);
return ans;
}
if (givenIp.compareTo(endIp) == 0 && givenIp.compareTo(startIp) > 0) {
- NeutronSubnetIPAllocationPool pool = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
pool.setPoolStart(poolStart);
- pool.setPoolEnd(NeutronSubnetIPAllocationPool.bigIntegerToIP(endIp.subtract(BigInteger.ONE)));
+ pool.setPoolEnd(NeutronSubnetIpAllocationPool.bigIntegerToIp(endIp.subtract(BigInteger.ONE)));
ans.add(pool);
return ans;
}
if (givenIp.compareTo(endIp) < 0 && givenIp.compareTo(startIp) > 0) {
- NeutronSubnetIPAllocationPool pool = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
pool.setPoolStart(poolStart);
- pool.setPoolEnd(NeutronSubnetIPAllocationPool.bigIntegerToIP(givenIp.subtract(BigInteger.ONE)));
+ pool.setPoolEnd(NeutronSubnetIpAllocationPool.bigIntegerToIp(givenIp.subtract(BigInteger.ONE)));
ans.add(pool);
- NeutronSubnetIPAllocationPool p2 = new NeutronSubnetIPAllocationPool();
- p2.setPoolStart(NeutronSubnetIPAllocationPool.bigIntegerToIP(givenIp.add(BigInteger.ONE)));
+ NeutronSubnetIpAllocationPool p2 = new NeutronSubnetIpAllocationPool();
+ p2.setPoolStart(NeutronSubnetIpAllocationPool.bigIntegerToIp(givenIp.add(BigInteger.ONE)));
p2.setPoolEnd(poolEnd);
ans.add(p2);
return ans;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNDeadPeerDetection implements Serializable {
+public final class NeutronVpnDeadPeerDetection implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
@XmlElement(name = "timeout")
Integer timeout;
- public NeutronVPNDeadPeerDetection() {
+ public NeutronVpnDeadPeerDetection() {
}
public String getAction() {
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIKEPolicy extends NeutronBaseAttributes<NeutronVPNIKEPolicy> implements Serializable {
+public final class NeutronVpnIkePolicy extends NeutronBaseAttributes<NeutronVpnIkePolicy> implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
String ikeVersion;
@XmlElement(name = "lifetime")
- NeutronVPNLifetime lifetime;
+ NeutronVpnLifetime lifetime;
- public NeutronVPNIKEPolicy() {
+ public NeutronVpnIkePolicy() {
}
public String getAuthAlgorithm() {
this.ikeVersion = ikeVersion;
}
- public NeutronVPNLifetime getLifetime() {
+ public NeutronVpnLifetime getLifetime() {
return lifetime;
}
- public void setLifetime(NeutronVPNLifetime lifetime) {
+ public void setLifetime(NeutronVpnLifetime lifetime) {
this.lifetime = lifetime;
}
*
* @param fields
* List of attributes to be extracted
- * @return a NeutronVPNIKEPolicy object with only the selected fields
+ * @return a NeutronVpnIkePolicy object with only the selected fields
* populated
*/
- public NeutronVPNIKEPolicy extractFields(List<String> fields) {
- NeutronVPNIKEPolicy ans = new NeutronVPNIKEPolicy();
+ public NeutronVpnIkePolicy extractFields(List<String> fields) {
+ NeutronVpnIkePolicy ans = new NeutronVpnIkePolicy();
for (String s : fields) {
extractField(s, ans);
if (s.equals("auth_algorithm")) {
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIPSECPolicy extends NeutronBaseAttributes<NeutronVPNIPSECPolicy> implements Serializable {
+public final class NeutronVpnIpSecPolicy extends NeutronBaseAttributes<NeutronVpnIpSecPolicy> implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
String perfectForwardSecrecy;
@XmlElement(name = "lifetime")
- NeutronVPNLifetime lifetime;
+ NeutronVpnLifetime lifetime;
- public NeutronVPNIPSECPolicy() {
+ public NeutronVpnIpSecPolicy() {
}
public String getTransformProtocol() {
this.perfectForwardSecrecy = perfectForwardSecrecy;
}
- public NeutronVPNLifetime getLifetime() {
+ public NeutronVpnLifetime getLifetime() {
return lifetime;
}
- public void setLifetime(NeutronVPNLifetime lifetime) {
+ public void setLifetime(NeutronVpnLifetime lifetime) {
this.lifetime = lifetime;
}
*
* @param fields
* List of attributes to be extracted
- * @return a NeutronVPNIPSECPolicy object with only the selected fields
+ * @return a NeutronVpnIpSecPolicy object with only the selected fields
* populated
*/
- public NeutronVPNIPSECPolicy extractFields(List<String> fields) {
- NeutronVPNIPSECPolicy ans = new NeutronVPNIPSECPolicy();
+ public NeutronVpnIpSecPolicy extractFields(List<String> fields) {
+ NeutronVpnIpSecPolicy ans = new NeutronVpnIpSecPolicy();
for (String s : fields) {
extractField(s, ans);
if (s.equals("transform_protocol")) {
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIPSECSiteConnection extends NeutronAdminAttributes<NeutronVPNIPSECSiteConnection>
+public final class NeutronVpnIpSecSiteConnection extends NeutronAdminAttributes<NeutronVpnIpSecSiteConnection>
implements Serializable {
private static final long serialVersionUID = 1L;
String vpnServiceID;
@XmlElement(name = "dpd")
- NeutronVPNDeadPeerDetection deadPeerDetection;
+ NeutronVpnDeadPeerDetection deadPeerDetection;
- public NeutronVPNIPSECSiteConnection() {
+ public NeutronVpnIpSecSiteConnection() {
}
public String getPeerAddress() {
this.vpnServiceID = vpnServiceID;
}
- public NeutronVPNDeadPeerDetection getDeadPeerDetection() {
+ public NeutronVpnDeadPeerDetection getDeadPeerDetection() {
return deadPeerDetection;
}
- public void setDeadPeerDetection(NeutronVPNDeadPeerDetection deadPeerDetection) {
+ public void setDeadPeerDetection(NeutronVpnDeadPeerDetection deadPeerDetection) {
this.deadPeerDetection = deadPeerDetection;
}
*
* @param fields
* List of attributes to be extracted
- * @return a NeutronVPNIPSECSiteConnection object with only the selected
+ * @return a NeutronVpnIpSecSiteConnection object with only the selected
* fields populated
*/
- public NeutronVPNIPSECSiteConnection extractFields(List<String> fields) {
- NeutronVPNIPSECSiteConnection ans = new NeutronVPNIPSECSiteConnection();
+ public NeutronVpnIpSecSiteConnection extractFields(List<String> fields) {
+ NeutronVpnIpSecSiteConnection ans = new NeutronVpnIpSecSiteConnection();
for (String s : fields) {
extractField(s, ans);
if (s.equals("peer_address")) {
@Override
public String toString() {
- return "NeutronVPNIPSECSiteConnection{" + "id='" + uuid + '\'' + ", tenantID='" + tenantID + '\'' + ", name='"
+ return "NeutronVpnIpSecSiteConnection{" + "id='" + uuid + '\'' + ", tenantID='" + tenantID + '\'' + ", name='"
+ name + '\'' + ", peerAddress=" + peerAddress + ", peerID='" + peerID + '\'' + ", routeMode='"
+ routeMode + '\'' + ", mtu=" + mtu + ", authMode='" + authMode + '\'' + ", preSharedKey='"
+ preSharedKey + '\'' + ", initiator='" + initiator + '\'' + ", adminStateUp=" + adminStateUp
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNLifetime implements Serializable {
+public final class NeutronVpnLifetime implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
@XmlElement(name = "value")
Integer value;
- public NeutronVPNLifetime() {
+ public NeutronVpnLifetime() {
}
public String getUnits() {
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNService extends NeutronAdminAttributes<NeutronVPNService> implements Serializable {
+public final class NeutronVpnService extends NeutronAdminAttributes<NeutronVpnService> implements Serializable {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
@XmlElement(name = "subnet_id")
String subnetUUID;
- public NeutronVPNService() {
+ public NeutronVpnService() {
}
public String getRouterUUID() {
this.subnetUUID = subnetUUID;
}
- public NeutronVPNService extractFields(List<String> fields) {
- NeutronVPNService ans = new NeutronVPNService();
+ public NeutronVpnService extractFields(List<String> fields) {
+ NeutronVpnService ans = new NeutronVpnService();
for (String s : fields) {
extractField(s, ans);
if (s.equals("router_id")) {
import org.junit.Assert;
import org.junit.Test;
-public class NeutronFloatingIPJAXBTest {
+public class NeutronFloatingIpJAXBTest {
private static final String NEUTRON_FLOATING_IP_SOURCE_JSON = "{" + "\"fixed_ip_address\": \"10.0.0.3\", "
+ "\"floating_ip_address\": \"172.24.4.228\", "
+ "\"tenant_id\": \"4969c491a3c74ee4af974e6d800c62de\" }";
@Test
- public void test_NeutronFloatingIP_JAXB() throws JAXBException {
- NeutronFloatingIP dummyObject = new NeutronFloatingIP();
+ public void test_NeutronFloatingIp_JAXB() throws JAXBException {
+ NeutronFloatingIp dummyObject = new NeutronFloatingIp();
- NeutronFloatingIP testObject = (NeutronFloatingIP) JaxbTestHelper.jaxbUnmarshall(dummyObject,
+ NeutronFloatingIp testObject = (NeutronFloatingIp) JaxbTestHelper.jaxbUnmarshall(dummyObject,
NEUTRON_FLOATING_IP_SOURCE_JSON);
- Assert.assertEquals("NeutronFloatingIP JAXB Test 1: Testing id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 1: Testing id failed",
"2f245a7b-796b-4f26-9cf9-9e82d248fda7", testObject.getID());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 2: Testing tenant_id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 2: Testing tenant_id failed",
"4969c491a3c74ee4af974e6d800c62de", testObject.getTenantID());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 3: Testing router id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 3: Testing router id failed",
"d23abc8d-2991-4a55-ba98-2aaea84cc72f", testObject.getRouterUUID());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 4: Testing port id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 4: Testing port id failed",
"ce705c24-c1ef-408a-bda3-7bbd946164ab", testObject.getPortUUID());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 5: Testing floating network id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 5: Testing floating network id failed",
"376da547-b977-4cfe-9cba-275c80debf57", testObject.getFloatingNetworkUUID());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 6: Testing floating ip address failed", "172.24.4.228",
- testObject.getFloatingIPAddress());
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 6: Testing floating ip address failed", "172.24.4.228",
+ testObject.getFloatingIpAddress());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 7: Testing fixed ip address failed", "10.0.0.3",
- testObject.getFixedIPAddress());
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 7: Testing fixed ip address failed", "10.0.0.3",
+ testObject.getFixedIpAddress());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 8: Testing status failed", "ACTIVE",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 8: Testing status failed", "ACTIVE",
testObject.getStatus());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronIDJAXBTest {
+public class NeutronIdJAXBTest {
private static final String NEUTRON_ID_SOURCE_JSON =
"{ \"id\": \"4e8e5957-649f-477b-9e5b-f1f75b21c03c\" }";
import org.junit.Assert;
import org.junit.Test;
-public class NeutronIPsJAXBTest {
+public class NeutronIpsJAXBTest {
private static final String NEUTRON_IPS_SOURCE_JSON =
"{ \"ip_address\": \"192.168.111.3\", " + "\"subnet_id\": \"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27\" }";
@Test
- public void test_NeutronIPs_JAXB() throws JAXBException {
- NeutronIPs neutronObject = new NeutronIPs();
- NeutronIPs testObject = (NeutronIPs) JaxbTestHelper.jaxbUnmarshall(neutronObject, NEUTRON_IPS_SOURCE_JSON);
+ public void test_NeutronIps_JAXB() throws JAXBException {
+ NeutronIps neutronObject = new NeutronIps();
+ NeutronIps testObject = (NeutronIps) JaxbTestHelper.jaxbUnmarshall(neutronObject, NEUTRON_IPS_SOURCE_JSON);
- Assert.assertEquals("NeutronIPs JAXB Test 1: Testing ip_address failed", "192.168.111.3",
+ Assert.assertEquals("NeutronIps JAXB Test 1: Testing ip_address failed", "192.168.111.3",
testObject.getIpAddress());
- Assert.assertEquals("NeutronIPs JAXB Test 2: Testing subnet_id failed",
+ Assert.assertEquals("NeutronIps JAXB Test 2: Testing subnet_id failed",
"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", testObject.getSubnetUUID());
}
}
"e131d186-b02d-4c0b-83d5-0c0725c4f812", testObject.getMeteringLabelRuleLabelID());
Assert.assertEquals("NeutronMeteringLabelRule JAXB Test 2: Testing remote_ip_prefix failed", "10.0.0.0/24",
- testObject.getMeteringLabelRuleRemoteIPPrefix());
+ testObject.getMeteringLabelRuleRemoteIpPrefix());
Assert.assertEquals("NeutronMeteringLabelRule JAXB Test 3: Testing direction failed", "ingress",
testObject.getMeteringLabelRuleDirection());
Assert.assertEquals("NeutronPort JAXB Test 4: Testing status failed", "ACTIVE", neutronObject.getStatus());
- List<NeutronIPs> fixedIPs = neutronObject.getFixedIPs();
- Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIPs.size());
+ List<NeutronIps> fixedIps = neutronObject.getFixedIps();
+ Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIps.size());
Assert.assertEquals(" NeutronPort JAXB Test 5.2: Testing ip_address value failed", "192.168.111.3",
- fixedIPs.get(0).ipAddress);
+ fixedIps.get(0).ipAddress);
Assert.assertEquals(" NeutronPort JAXB Test 5.3: Testing subnet_id value failed",
- "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIPs.get(0).subnetUUID);
+ "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIps.get(0).subnetUUID);
List<NeutronPortExtraDHCPOption> extraDHCPOptions = neutronObject.getExtraDHCPOptions();
Assert.assertEquals("NeutronPort JAXB Test 4: Testing status failed", "ACTIVE", neutronObject.getStatus());
- List<NeutronIPs> fixedIPs = neutronObject.getFixedIPs();
- Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIPs.size());
+ List<NeutronIps> fixedIps = neutronObject.getFixedIps();
+ Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIps.size());
Assert.assertEquals(" NeutronPort JAXB Test 5.2: Testing ip_address value failed", "192.168.111.3",
- fixedIPs.get(0).ipAddress);
+ fixedIps.get(0).ipAddress);
Assert.assertEquals(" NeutronPort JAXB Test 5.3: Testing subnet_id value failed",
- "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIPs.get(0).subnetUUID);
+ "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIps.get(0).subnetUUID);
List<NeutronPortExtraDHCPOption> extraDHCPOptions = neutronObject.getExtraDHCPOptions();
Assert.assertEquals("NeutronPort JAXB Test 4: Testing status failed", "ACTIVE", neutronObject.getStatus());
- List<NeutronIPs> fixedIPs = neutronObject.getFixedIPs();
- Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIPs.size());
+ List<NeutronIps> fixedIps = neutronObject.getFixedIps();
+ Assert.assertEquals(" NeutronPort JAXB Test 5.1: Testing fixed_ips list length failed", 1, fixedIps.size());
Assert.assertEquals(" NeutronPort JAXB Test 5.2: Testing ip_address value failed", "192.168.111.3",
- fixedIPs.get(0).ipAddress);
+ fixedIps.get(0).ipAddress);
Assert.assertEquals(" NeutronPort JAXB Test 5.3: Testing subnet_id value failed",
- "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIPs.get(0).subnetUUID);
+ "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", fixedIps.get(0).subnetUUID);
List<NeutronPortExtraDHCPOption> extraDHCPOptions = neutronObject.getExtraDHCPOptions();
Assert.assertEquals("NeutronRouter JAXB Test 4: Testing status failed", "ACTIVE", testObject.getStatus());
- Assert.assertEquals("NeutronFloatingIP JAXB Test 5: Testing tenant_id failed",
+ Assert.assertEquals("NeutronFloatingIp JAXB Test 5: Testing tenant_id failed",
"aa902936679e4ea29bfe1158e3450a13", testObject.getTenantID());
Assert.assertEquals("NeutronRouter JAXB Test 6: Testing externalGatewayInfo failed",
NeutronRouterNetworkReference testObject = (NeutronRouterNetworkReference) JaxbTestHelper
.jaxbUnmarshall(dummyObject, NEUTRON_ROUTER_NETWORK_REFERENCE_SOURCE_JSON);
- List<NeutronIPs> externalFixedIPs = testObject.getExternalFixedIPs();
+ List<NeutronIps> externalFixedIps = testObject.getExternalFixedIps();
Assert.assertEquals("NeutronRouterNetworkReference JAXB Test 1: Testing network_id failed",
"e9330b1f-a2ef-4160-a991-169e56ab17f6", testObject.getNetworkID());
testObject.getEnableSNAT());
Assert.assertEquals(
- "NeutronRouterNetworkReference JAXB Test 3.1: Testing externalFixedIPs list length failed", 1,
- externalFixedIPs.size());
+ "NeutronRouterNetworkReference JAXB Test 3.1: Testing externalFixedIps list length failed", 1,
+ externalFixedIps.size());
Assert.assertEquals("NeutronRouterNetworkReference JAXB Test 3.2: Testing ip_address value failed",
- "192.168.111.3", externalFixedIPs.get(0).ipAddress);
+ "192.168.111.3", externalFixedIps.get(0).ipAddress);
Assert.assertEquals("NeutronRouterNetworkReference JAXB Test 3.3: Testing subnet_id value failed",
- "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", externalFixedIPs.get(0).subnetUUID);
+ "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", externalFixedIps.get(0).subnetUUID);
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronSubnetIPAllocationPoolTest {
+public class NeutronSubnetIpAllocationPoolTest {
@Test
public void convertTest() {
- Assert.assertEquals("Convert Test 1: null Argument failed", 0, NeutronSubnetIPAllocationPool.convert(null));
+ Assert.assertEquals("Convert Test 1: null Argument failed", 0, NeutronSubnetIpAllocationPool.convert(null));
Assert.assertEquals("Convert Test 2: convert of 32.20.10.0 failed", 538184192,
- NeutronSubnetIPAllocationPool.convert("32.20.10.0"));
+ NeutronSubnetIpAllocationPool.convert("32.20.10.0"));
Assert.assertEquals("Convert Test 3: convert of 192.168.2.140 failed", 3232236172L,
- NeutronSubnetIPAllocationPool.convert("192.168.2.140"));
+ NeutronSubnetIpAllocationPool.convert("192.168.2.140"));
}
@Test
public void convertV6Test() {
- boolean result = BigInteger.ZERO.equals(NeutronSubnetIPAllocationPool.convertV6(null));
+ boolean result = BigInteger.ZERO.equals(NeutronSubnetIpAllocationPool.convertV6(null));
Assert.assertTrue("Convert V6 Test 1: null Argument failed", result);
result = new BigInteger("42550872755692912415807417417958686721")
- .equals(NeutronSubnetIPAllocationPool.convertV6("2003:0:0:0:0:0:0:1"));
+ .equals(NeutronSubnetIpAllocationPool.convertV6("2003:0:0:0:0:0:0:1"));
Assert.assertTrue("Convert V6 Test 2: 2003:0:0:0:0:0:0:1 Argument failed", result);
}
@Test
- public void longToIPTest() {
- Assert.assertEquals("longToIP Test 1: convert of 538184192L failed", "32.20.10.0",
- NeutronSubnetIPAllocationPool.longToIP(538184192L));
+ public void longToIpTest() {
+ Assert.assertEquals("longToIp Test 1: convert of 538184192L failed", "32.20.10.0",
+ NeutronSubnetIpAllocationPool.longToIp(538184192L));
- Assert.assertEquals("longToIP Test 2: convert of 3232236172L failed", "192.168.2.140",
- NeutronSubnetIPAllocationPool.longToIP(3232236172L));
+ Assert.assertEquals("longToIp Test 2: convert of 3232236172L failed", "192.168.2.140",
+ NeutronSubnetIpAllocationPool.longToIp(3232236172L));
}
@Test
- public void bigIntegerToIPTest() {
+ public void bigIntegerToIpTest() {
BigInteger start = new BigInteger("42550872755692912415807417417958686721");
- Assert.assertEquals("longToIP Test 1: convert of 42550872755692912415807417417958686721 failed",
- "2003:0:0:0:0:0:0:1", NeutronSubnetIPAllocationPool.bigIntegerToIP(start));
+ Assert.assertEquals("longToIp Test 1: convert of 42550872755692912415807417417958686721 failed",
+ "2003:0:0:0:0:0:0:1", NeutronSubnetIpAllocationPool.bigIntegerToIp(start));
}
@Test
public void containsTest() {
- NeutronSubnetIPAllocationPool apUT = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.4");
@Test
public void containsV6Test() {
- NeutronSubnetIPAllocationPool apUT = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:4");
@Test
public void splitPoolTest() {
- NeutronSubnetIPAllocationPool apUT = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.6");
- List<NeutronSubnetIPAllocationPool> result = apUT.splitPool("10.18.0.2");
+ List<NeutronSubnetIpAllocationPool> result = apUT.splitPool("10.18.0.2");
Assert.assertEquals("splitPool Test 1.1: address == pool start (result size) failed", 1, result.size());
Assert.assertEquals("splitPool Test 1.2: address == pool start (pool start) failed", "10.18.0.3",
result.get(0).getPoolStart());
Assert.assertEquals("splitPool Test 1.3: address == pool start (pool end) failed", "10.18.0.6",
result.get(0).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.6");
result = apUT.splitPool("10.18.0.3");
Assert.assertEquals("splitPool Test 2.5: address one above pool start (pool 2 end) failed", "10.18.0.6",
result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.6");
result = apUT.splitPool("10.18.0.4");
Assert.assertEquals("splitPool Test 3.5: address one above pool start (pool 2 end) failed", "10.18.0.6",
result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.6");
result = apUT.splitPool("10.18.0.5");
Assert.assertEquals("splitPool Test 4.5: address one above pool start (pool 2 end) failed", "10.18.0.6",
result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("10.18.0.2");
apUT.setPoolEnd("10.18.0.6");
result = apUT.splitPool("10.18.0.6");
@Test
public void splitPoolV6Test() {
- NeutronSubnetIPAllocationPool apUT = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:6");
- List<NeutronSubnetIPAllocationPool> result = apUT.splitPoolV6("2015:0:0:0:0:0:0:2");
+ List<NeutronSubnetIpAllocationPool> result = apUT.splitPoolV6("2015:0:0:0:0:0:0:2");
Assert.assertEquals("splitPoolV6 Test 1.1: address == pool start (result size) failed", 1, result.size());
Assert.assertEquals("splitPoolV6 Test 1.2: address == pool start (pool start) failed", "2015:0:0:0:0:0:0:3",
result.get(0).getPoolStart());
Assert.assertEquals("splitPoolV6 Test 1.3: address == pool start (pool end) failed", "2015:0:0:0:0:0:0:6",
result.get(0).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:6");
result = apUT.splitPoolV6("2015:0:0:0:0:0:0:3");
Assert.assertEquals("splitPoolV6 Test 2.5: address one above pool start (pool 2 end) failed",
"2015:0:0:0:0:0:0:6", result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:6");
result = apUT.splitPoolV6("2015:0:0:0:0:0:0:4");
Assert.assertEquals("splitPoolV6 Test 3.5: address one above pool start (pool 2 end) failed",
"2015:0:0:0:0:0:0:6", result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:6");
result = apUT.splitPoolV6("2015:0:0:0:0:0:0:5");
Assert.assertEquals("splitPoolV6 Test 4.5: address one above pool start (pool 2 end) failed",
"2015:0:0:0:0:0:0:6", result.get(1).getPoolEnd());
- apUT = new NeutronSubnetIPAllocationPool();
+ apUT = new NeutronSubnetIpAllocationPool();
apUT.setPoolStart("2015:0:0:0:0:0:0:2");
apUT.setPoolEnd("2015:0:0:0:0:0:0:6");
result = apUT.splitPoolV6("2015:0:0:0:0:0:0:6");
dnsNameservers, testObject.getDnsNameservers());
Assert.assertEquals("NeutronSubnet JAXB Test 7: Testing gateway_ip failed",
- "2003::1", testObject.getGatewayIP());
+ "2003::1", testObject.getGatewayIp());
Assert.assertEquals("NeutronSubnet JAXB Test 8: Testing ipv6_ra_mode failed",
null, testObject.getIpV6RaMode());
Assert.assertEquals("NeutronSubnet JAXB Test 9: Testing ip_version failed",
}
@Test
- public void gatewayIP_PoolOverlapTest() {
+ public void gatewayIp_PoolOverlapTest() {
NeutronSubnet objectUT = new NeutronSubnet();
objectUT.setIpVersion(4);
objectUT.setCidr("10.18.0.0/16");
- NeutronSubnetIPAllocationPool allocationPool = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("10.18.0.2");
allocationPool.setPoolEnd("10.18.0.6");
- List<NeutronSubnetIPAllocationPool> pools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
pools.add(allocationPool);
objectUT.setAllocationPools(pools);
- objectUT.setGatewayIP("10.18.0.1");
- Assert.assertFalse("gatewayIP_Pool_overlap Test 1: test with address below allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("10.18.0.1");
+ Assert.assertFalse("gatewayIp_Pool_overlap Test 1: test with address below allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
- objectUT.setGatewayIP("10.18.0.4");
- Assert.assertTrue("gatewayIP_Pool_overlap Test 2: test with address in allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("10.18.0.4");
+ Assert.assertTrue("gatewayIp_Pool_overlap Test 2: test with address in allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
- objectUT.setGatewayIP("10.18.0.7");
- Assert.assertFalse("gatewayIP_Pool_overlap Test 3: test with address above allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("10.18.0.7");
+ Assert.assertFalse("gatewayIp_Pool_overlap Test 3: test with address above allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
objectUT.setIpVersion(6);
objectUT.setCidr("2015::0/64");
- allocationPool = new NeutronSubnetIPAllocationPool();
+ allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("2015::2");
allocationPool.setPoolEnd("2015::6");
- pools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ pools = new ArrayList<NeutronSubnetIpAllocationPool>();
pools.add(allocationPool);
objectUT.setAllocationPools(pools);
- objectUT.setGatewayIP("2015::1");
- Assert.assertFalse("gatewayIP_Pool_overlap v6 Test 1: test with address below allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("2015::1");
+ Assert.assertFalse("gatewayIp_Pool_overlap v6 Test 1: test with address below allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
- objectUT.setGatewayIP("2015::4");
- Assert.assertTrue("gatewayIP_Pool_overlap v6 Test 2: test with address in allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("2015::4");
+ Assert.assertTrue("gatewayIp_Pool_overlap v6 Test 2: test with address in allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
- objectUT.setGatewayIP("2015::7");
- Assert.assertFalse("gatewayIP_Pool_overlap v6 Test 3: test with address above allocation pool failed",
- objectUT.gatewayIP_Pool_overlap());
+ objectUT.setGatewayIp("2015::7");
+ Assert.assertFalse("gatewayIp_Pool_overlap v6 Test 3: test with address above allocation pool failed",
+ objectUT.gatewayIp_Pool_overlap());
}
@Test
- public void isValidIPTest() {
+ public void isValidIpTest() {
NeutronSubnet objectUT = new NeutronSubnet();
objectUT.setIpVersion(4);
objectUT.setCidr("10.18.0.0/24");
- Assert.assertFalse("isValidIP Negative Test 1: test of IP address outside of CIDR block failed",
- objectUT.isValidIP("10.18.1.1"));
+ Assert.assertFalse("isValidIp Negative Test 1: test of IP address outside of CIDR block failed",
+ objectUT.isValidIp("10.18.1.1"));
- Assert.assertTrue("isValidIP Test 1: test of IP address within CIDR block failed",
- objectUT.isValidIP("10.18.0.1"));
+ Assert.assertTrue("isValidIp Test 1: test of IP address within CIDR block failed",
+ objectUT.isValidIp("10.18.0.1"));
objectUT.setIpVersion(6);
objectUT.setCidr("2015::0/64");
- Assert.assertFalse("isValidIP v6 Negative Test 1: test of IP address outside of CIDR block failed",
- objectUT.isValidIP("2015:0:0:1:0:0:0:1"));
+ Assert.assertFalse("isValidIp v6 Negative Test 1: test of IP address outside of CIDR block failed",
+ objectUT.isValidIp("2015:0:0:1:0:0:0:1"));
- Assert.assertTrue("isValidIP v6 Test 1: test of IP address within CIDR block failed",
- objectUT.isValidIP("2015:0:0:0:1:0:0:1"));
+ Assert.assertTrue("isValidIp v6 Test 1: test of IP address within CIDR block failed",
+ objectUT.isValidIp("2015:0:0:0:1:0:0:1"));
}
@Test
objectUT.setIpVersion(4);
objectUT.setCidr("10.18.0.0/24");
- NeutronSubnetIPAllocationPool allocationPool = new NeutronSubnetIPAllocationPool();
+ NeutronSubnetIpAllocationPool allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("10.18.0.2");
allocationPool.setPoolEnd("10.18.0.6");
- List<NeutronSubnetIPAllocationPool> pools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
pools.add(allocationPool);
- allocationPool = new NeutronSubnetIPAllocationPool();
+ allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("10.18.0.10");
allocationPool.setPoolEnd("10.18.0.15");
objectUT.setAllocationPools(pools);
objectUT.setIpVersion(6);
objectUT.setCidr("2015::0/24");
- allocationPool = new NeutronSubnetIPAllocationPool();
+ allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("2015::2");
allocationPool.setPoolEnd("2015::6");
- pools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ pools = new ArrayList<NeutronSubnetIpAllocationPool>();
pools.add(allocationPool);
- allocationPool = new NeutronSubnetIPAllocationPool();
+ allocationPool = new NeutronSubnetIpAllocationPool();
allocationPool.setPoolStart("2015::10");
allocationPool.setPoolEnd("2015::15");
objectUT.setAllocationPools(pools);
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNDeadPeerDetectionJAXBTest {
+public class NeutronVpnDeadPeerDetectionJAXBTest {
private static final String NEUTRON_VPN_DEAD_PEER_DETECTION_SOURCE_JSON = "{" + "\"action\": \"hold\", "
+ "\"interval\": 30, " + "\"timeout\": 120 }";
@Test
public void test_NeutronVPNDeadPeerDetection_JAXB() throws JAXBException {
- NeutronVPNDeadPeerDetection dummyObject = new NeutronVPNDeadPeerDetection();
+ NeutronVpnDeadPeerDetection dummyObject = new NeutronVpnDeadPeerDetection();
- NeutronVPNDeadPeerDetection testObject = (NeutronVPNDeadPeerDetection) JaxbTestHelper
+ NeutronVpnDeadPeerDetection testObject = (NeutronVpnDeadPeerDetection) JaxbTestHelper
.jaxbUnmarshall(dummyObject, NEUTRON_VPN_DEAD_PEER_DETECTION_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNDeadPeerDetection JAXB Test 1: Testing action failed", "hold",
+ Assert.assertEquals("NeutronVpnDeadPeerDetection JAXB Test 1: Testing action failed", "hold",
testObject.getAction());
- Assert.assertEquals("NeutronVPNDeadPeerDetection JAXB Test 2: Testing interval failed", new Integer(30),
+ Assert.assertEquals("NeutronVpnDeadPeerDetection JAXB Test 2: Testing interval failed", new Integer(30),
testObject.getInterval());
- Assert.assertEquals("NeutronVPNDeadPeerDetection JAXB Test 3: Testing timeout failed", new Integer(120),
+ Assert.assertEquals("NeutronVpnDeadPeerDetection JAXB Test 3: Testing timeout failed", new Integer(120),
testObject.getTimeout());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNIKEPolicyJAXBTest {
+public class NeutronVpnIkePolicyJAXBTest {
private static final String NEUTRON_VPN_IKE_POLICY_SOURCE_JSON = "{"
+ "\"id\": \"5522aff7-1b3c-48dd-9c3c-b50f016b73db\", "
+ "\"tenant_id\": \"ccb81365fe36411a9011e90491fe1330\", " + "\"name\": \"ikepolicy1\", "
+ "\"value\": 3600 " + "} }";
@Test
- public void test_NeutronVPNIKEPolicy_JAXB() throws JAXBException {
- NeutronVPNIKEPolicy dummyObject = new NeutronVPNIKEPolicy();
+ public void test_NeutronVpnIkePolicy_JAXB() throws JAXBException {
+ NeutronVpnIkePolicy dummyObject = new NeutronVpnIkePolicy();
- NeutronVPNIKEPolicy testObject = (NeutronVPNIKEPolicy) JaxbTestHelper.jaxbUnmarshall(dummyObject,
+ NeutronVpnIkePolicy testObject = (NeutronVpnIkePolicy) JaxbTestHelper.jaxbUnmarshall(dummyObject,
NEUTRON_VPN_IKE_POLICY_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 1: Testing id failed",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 1: Testing id failed",
"5522aff7-1b3c-48dd-9c3c-b50f016b73db", testObject.getID());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 2: Testing tenant id failed",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 2: Testing tenant id failed",
"ccb81365fe36411a9011e90491fe1330", testObject.getTenantID());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 3: Testing name failed", "ikepolicy1",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 3: Testing name failed", "ikepolicy1",
testObject.getName());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 5: Testing auth algorithm failed", "sha1",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 5: Testing auth algorithm failed", "sha1",
testObject.getAuthAlgorithm());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 6: Testing Encryption algorithm failed", "aes-256",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 6: Testing Encryption algorithm failed", "aes-256",
testObject.getEncryptionAlgorithm());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 7: Testing phase1 negotiation mode failed", "main",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 7: Testing phase1 negotiation mode failed", "main",
testObject.getPhase1NegotiationMode());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 8: Testing ike version failed", "v1",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 8: Testing ike version failed", "v1",
testObject.getIkeVersion());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 9: Testing pfs failed", "group5",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 9: Testing pfs failed", "group5",
testObject.getPerfectForwardSecrecy());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 10.1: Testing lifetime units value failed", "seconds",
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 10.1: Testing lifetime units value failed", "seconds",
testObject.getLifetime().getUnits());
- Assert.assertEquals("NeutronVPNIKEPolicy JAXB Test 10.2: Testing lifetime values failed", new Integer(3600),
+ Assert.assertEquals("NeutronVpnIkePolicy JAXB Test 10.2: Testing lifetime values failed", new Integer(3600),
testObject.getLifetime().getValue());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNIPSECPolicyJAXBTest {
+public class NeutronVpnIpSecPolicyJAXBTest {
private static final String NEUTRON_VPN_IPSEC_POLICY_SINGLE_PROVIDER_SOURCE_JSON = "{"
+ "\"id\": \"5291b189-fd84-46e5-84bd-78f40c05d69c\", "
+ "\"units\": \"seconds\", " + "\"value\": 3600 " + "} }";
@Test
- public void test_NeutronVPNIPSECPolicy_JAXB() throws JAXBException {
- NeutronVPNIPSECPolicy dummyObject = new NeutronVPNIPSECPolicy();
+ public void test_NeutronVpnIPSecPolicy_JAXB() throws JAXBException {
+ NeutronVpnIpSecPolicy dummyObject = new NeutronVpnIpSecPolicy();
- NeutronVPNIPSECPolicy testObject = (NeutronVPNIPSECPolicy) JaxbTestHelper.jaxbUnmarshall(dummyObject,
+ NeutronVpnIpSecPolicy testObject = (NeutronVpnIpSecPolicy) JaxbTestHelper.jaxbUnmarshall(dummyObject,
NEUTRON_VPN_IPSEC_POLICY_SINGLE_PROVIDER_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 1: Testing id failed",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 1: Testing id failed",
"5291b189-fd84-46e5-84bd-78f40c05d69c", testObject.getID());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 2: Testing tenant id failed",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 2: Testing tenant id failed",
"ccb81365fe36411a9011e90491fe1330", testObject.getTenantID());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 3: Testing name failed", "ipsecpolicy1",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 3: Testing name failed", "ipsecpolicy1",
testObject.getName());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 5: Testing transform protocol failed", "esp",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 5: Testing transform protocol failed", "esp",
testObject.getTransformProtocol());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 6: Testing encapsulation mode failed", "tunnel",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 6: Testing encapsulation mode failed", "tunnel",
testObject.getEncapsulationMode());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 7: Testing authorization algorithm failed", "sha1",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 7: Testing authorization algorithm failed", "sha1",
testObject.getAuthAlgorithm());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 8: Testing encryption algorithm failed", "aes-128",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 8: Testing encryption algorithm failed", "aes-128",
testObject.getEncryptionAlgorithm());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 9: Testing PerfectForwardSecrecy failed", "group5",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 9: Testing PerfectForwardSecrecy failed", "group5",
testObject.getPerfectForwardSecrecy());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 10: Testing Lifetime unit value failed", "seconds",
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 10: Testing Lifetime unit value failed", "seconds",
testObject.getLifetime().getUnits());
- Assert.assertEquals("NeutronVPNIPSECPolicy JAXB Test 11: Testing Lifetime value failed", new Integer(3600),
+ Assert.assertEquals("NeutronVpnIpSecPolicy JAXB Test 11: Testing Lifetime value failed", new Integer(3600),
testObject.getLifetime().getValue());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNIPSECSiteConnectionJAXBTest {
+public class NeutronVpnIpSecSiteConnectionJAXBTest {
private static final String NEUTRON_VPN_IPSEC_SITE_CONNECTION_SOURCE_JSON = "{"
+ "\"id\": \"cbc152a0-7e93-4f98-9f04-b085a4bf2511\", "
+ "\"interval\": 30 ," + "\"timeout\": 120 " + "} }";
@Test
- public void test_NeutronVPNIPSECSiteConnection_JAXB() throws JAXBException {
- NeutronVPNIPSECSiteConnection dummyObject = new NeutronVPNIPSECSiteConnection();
+ public void test_NeutronVpnIPSecSiteConnection_JAXB() throws JAXBException {
+ NeutronVpnIpSecSiteConnection dummyObject = new NeutronVpnIpSecSiteConnection();
- NeutronVPNIPSECSiteConnection testObject = (NeutronVPNIPSECSiteConnection) JaxbTestHelper
+ NeutronVpnIpSecSiteConnection testObject = (NeutronVpnIpSecSiteConnection) JaxbTestHelper
.jaxbUnmarshall(dummyObject, NEUTRON_VPN_IPSEC_SITE_CONNECTION_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 1: Testing id failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 1: Testing id failed",
"cbc152a0-7e93-4f98-9f04-b085a4bf2511", testObject.getID());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 2: Testing tenant id failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 2: Testing tenant id failed",
"ccb81365fe36411a9011e90491fe1330", testObject.getTenantID());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 3: Testing name failed", "myvpn",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 3: Testing name failed", "myvpn",
testObject.getName());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 5: Testing peer address failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 5: Testing peer address failed",
"172.24.4.226", testObject.getPeerAddress());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 6: Testing peer id failed", "172.24.4.226",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 6: Testing peer id failed", "172.24.4.226",
testObject.getPeerID());
List<String> peerCidrs = testObject.getPeerCidrs();
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 7: Testing peerCidrs size failed", 1,
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 7: Testing peerCidrs size failed", 1,
peerCidrs.size());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection Test 8.1: Testing peerCidrs value failed", "10.1.0.0/24",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection Test 8.1: Testing peerCidrs value failed", "10.1.0.0/24",
peerCidrs.get(0));
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 8.2: Testing list value failed", "static",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 8.2: Testing list value failed", "static",
testObject.getRouteMode());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 9: Testing mtu failed", 1500,
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 9: Testing mtu failed", 1500,
(long) testObject.getMtu());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 10: Testing authmode failed", "psk",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 10: Testing authmode failed", "psk",
testObject.getAuthMode());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 11: Testing presharedkey failed", "secret",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 11: Testing presharedkey failed", "secret",
testObject.getPreSharedKey());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 12: Testing initiator failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 12: Testing initiator failed",
"bi-directional", testObject.getInitiator());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 13: Testing Admin state failed", true,
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 13: Testing Admin state failed", true,
testObject.getAdminStateUp());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 14: Testing status failed", "PENDING_CREATE",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 14: Testing status failed", "PENDING_CREATE",
testObject.getStatus());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 15: Testing IkePolicyID failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 15: Testing IkePolicyID failed",
"bf5612ac-15fb-460c-9b3d-6453da2fafa2", testObject.getIkePolicyID());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 16: Testing IpsecPolicyID failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 16: Testing IpsecPolicyID failed",
"8ba867b2-67eb-4835-bb61-c226804a1584", testObject.getIpsecPolicyID());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 17: Testing VpnServiceID failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 17: Testing VpnServiceID failed",
"c2f3178d-5530-4c4a-89fc-050ecd552636", testObject.getVpnServiceID());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 18.1: Testing DeadPeerDetection failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 18.1: Testing DeadPeerDetection failed",
"hold", testObject.getDeadPeerDetection().getAction());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 18.2: Testing DeadPeerDetection failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 18.2: Testing DeadPeerDetection failed",
new Integer(30), testObject.getDeadPeerDetection().getInterval());
- Assert.assertEquals("NeutronVPNIPSECSiteConnection JAXB Test 18.3: Testing DeadPeerDetection failed",
+ Assert.assertEquals("NeutronVpnIpSecSiteConnection JAXB Test 18.3: Testing DeadPeerDetection failed",
new Integer(120), testObject.getDeadPeerDetection().getTimeout());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNLifetimeJAXBTest {
+public class NeutronVpnLifetimeJAXBTest {
private static final String NEUTRON_VPN_LIFETIME_TEST_SOURCE_JSON = "{" + "\"units\": \"seconds\", "
+ "\"value\": 3600 }";
@Test
public void test_NeutronVPNLifetime_JAXB() throws JAXBException {
- NeutronVPNLifetime dummyObject = new NeutronVPNLifetime();
+ NeutronVpnLifetime dummyObject = new NeutronVpnLifetime();
- NeutronVPNLifetime testObject = (NeutronVPNLifetime) JaxbTestHelper.jaxbUnmarshall(dummyObject,
+ NeutronVpnLifetime testObject = (NeutronVpnLifetime) JaxbTestHelper.jaxbUnmarshall(dummyObject,
NEUTRON_VPN_LIFETIME_TEST_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNLifetime JAXB Test 1: Testing units failed", "seconds",
+ Assert.assertEquals("NeutronVpnLifetime JAXB Test 1: Testing units failed", "seconds",
testObject.getUnits());
- Assert.assertEquals("NeutronVPNLifetime JAXB Test 2: Testing value failed", new Integer(3600),
+ Assert.assertEquals("NeutronVpnLifetime JAXB Test 2: Testing value failed", new Integer(3600),
testObject.getValue());
}
}
import org.junit.Assert;
import org.junit.Test;
-public class NeutronVPNServiceJAXBTest {
+public class NeutronVpnServiceJAXBTest {
private static final String NEUTRON_VPN_SERVICE_SOURCE_JSON = "{"
+ "\"router_id\": \"ec8619be-0ba8-4955-8835-3b49ddb76f89\", " + "\"status\": \"PENDING_CREATE\", "
@Test
public void test_NeutronVPNService_JAXB() throws JAXBException {
- NeutronVPNService dummyObject = new NeutronVPNService();
+ NeutronVpnService dummyObject = new NeutronVpnService();
- NeutronVPNService testObject = (NeutronVPNService) JaxbTestHelper.jaxbUnmarshall(dummyObject,
+ NeutronVpnService testObject = (NeutronVpnService) JaxbTestHelper.jaxbUnmarshall(dummyObject,
NEUTRON_VPN_SERVICE_SOURCE_JSON);
- Assert.assertEquals("NeutronVPNService JAXB Test 1: Testing router id failed",
+ Assert.assertEquals("NeutronVpnService JAXB Test 1: Testing router id failed",
"ec8619be-0ba8-4955-8835-3b49ddb76f89", testObject.getRouterUUID());
- Assert.assertEquals("NeutronVPNService JAXB Test 2: Testing status failed", "PENDING_CREATE",
+ Assert.assertEquals("NeutronVpnService JAXB Test 2: Testing status failed", "PENDING_CREATE",
testObject.getStatus());
- Assert.assertEquals("NeutronVPNService JAXB Test 3: Testing name failed", "myservice",
+ Assert.assertEquals("NeutronVpnService JAXB Test 3: Testing name failed", "myservice",
testObject.getName());
- Assert.assertEquals("NeutronVPNService JAXB Test 4: Testing admin state up failed", true,
+ Assert.assertEquals("NeutronVpnService JAXB Test 4: Testing admin state up failed", true,
testObject.getAdminStateUp());
- Assert.assertEquals("NeutronVPNService JAXB Test 5: Testing Subnet UUID failed",
+ Assert.assertEquals("NeutronVpnService JAXB Test 5: Testing Subnet UUID failed",
"f4fb4528-ed93-467c-a57b-11c7ea9f963e", testObject.getSubnetUUID());
- Assert.assertEquals("NeutronVPNService JAXB Test 6: Testing Tenant Id failed",
+ Assert.assertEquals("NeutronVpnService JAXB Test 6: Testing Tenant Id failed",
"ccb81365fe36411a9011e90491fe1330", testObject.getTenantID());
- Assert.assertEquals("NeutronVPNService JAXB Test 7: Testing id failed",
+ Assert.assertEquals("NeutronVpnService JAXB Test 7: Testing id failed",
"9faaf49f-dd89-4e39-a8c6-101839aa49bc", testObject.getID());
}
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.opendaylight.neutron.spi.NeutronFloatingIP;
+import org.opendaylight.neutron.spi.NeutronFloatingIp;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronFloatingIPRequest implements INeutronRequest<NeutronFloatingIP> {
+public final class NeutronFloatingIpRequest implements INeutronRequest<NeutronFloatingIp> {
// See OpenStack Network API v2.0 Reference for description of
// annotated attributes
@XmlElement(name = "floatingip")
- NeutronFloatingIP singleton;
+ NeutronFloatingIp singleton;
@XmlElement(name = "floatingips")
- List<NeutronFloatingIP> bulkRequest;
+ List<NeutronFloatingIp> bulkRequest;
- NeutronFloatingIPRequest() {
+ NeutronFloatingIpRequest() {
}
- NeutronFloatingIPRequest(List<NeutronFloatingIP> bulk) {
+ NeutronFloatingIpRequest(List<NeutronFloatingIp> bulk) {
bulkRequest = bulk;
}
- NeutronFloatingIPRequest(NeutronFloatingIP singleton) {
+ NeutronFloatingIpRequest(NeutronFloatingIp singleton) {
this.singleton = singleton;
}
}
import javax.ws.rs.core.Response;
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
-import org.opendaylight.neutron.spi.INeutronFloatingIPCRUD;
-import org.opendaylight.neutron.spi.NeutronFloatingIP;
+import org.opendaylight.neutron.spi.INeutronFloatingIpCRUD;
+import org.opendaylight.neutron.spi.NeutronFloatingIp;
/**
* Neutron Northbound REST APIs.<br>
*/
@Path("/floatingips")
-public final class NeutronFloatingIPsNorthbound
- extends AbstractNeutronNorthbound<NeutronFloatingIP, NeutronFloatingIPRequest, INeutronFloatingIPCRUD> {
+public final class NeutronFloatingIpsNorthbound
+ extends AbstractNeutronNorthbound<NeutronFloatingIp, NeutronFloatingIpRequest, INeutronFloatingIpCRUD> {
private static final String RESOURCE_NAME = "Floating IP";
@Override
}
/**
- * Returns a list of all FloatingIPs.
+ * Returns a list of all FloatingIps.
*/
@GET
@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 listFloatingIPs(
+ public Response listFloatingIps(
// return fields
@QueryParam("fields") List<String> fields,
// note: openstack isn't clear about filtering on lists, so we aren't handling them
@QueryParam("id") String queryID,
@QueryParam("floating_network_id") String queryFloatingNetworkId,
@QueryParam("port_id") String queryPortId,
- @QueryParam("fixed_ip_address") String queryFixedIPAddress,
- @QueryParam("floating_ip_address") String queryFloatingIPAddress,
+ @QueryParam("fixed_ip_address") String queryFixedIpAddress,
+ @QueryParam("floating_ip_address") String queryFloatingIpAddress,
@QueryParam("tenant_id") String queryTenantID,
@QueryParam("router_id") String queryRouterID,
@QueryParam("status") String queryStatus,
@QueryParam("page_reverse") String pageReverse
// sorting not supported
) {
- INeutronFloatingIPCRUD floatingIPInterface = getNeutronCRUD();
- List<NeutronFloatingIP> allFloatingIPs = floatingIPInterface.getAll();
- List<NeutronFloatingIP> ans = new ArrayList<>();
- for (NeutronFloatingIP floatingIp : allFloatingIPs) {
+ INeutronFloatingIpCRUD floatingIpInterface = getNeutronCRUD();
+ List<NeutronFloatingIp> allFloatingIps = floatingIpInterface.getAll();
+ List<NeutronFloatingIp> ans = new ArrayList<>();
+ for (NeutronFloatingIp floatingIp : allFloatingIps) {
//match filters: TODO provider extension and router extension
if ((queryID == null || queryID.equals(floatingIp.getID()))
&& (queryFloatingNetworkId == null
|| queryFloatingNetworkId.equals(floatingIp.getFloatingNetworkUUID()))
&& (queryPortId == null || queryPortId.equals(floatingIp.getPortUUID()))
- && (queryFixedIPAddress == null || queryFixedIPAddress.equals(floatingIp.getFixedIPAddress()))
- && (queryFloatingIPAddress == null
- || queryFloatingIPAddress.equals(floatingIp.getFloatingIPAddress()))
+ && (queryFixedIpAddress == null || queryFixedIpAddress.equals(floatingIp.getFixedIpAddress()))
+ && (queryFloatingIpAddress == null
+ || queryFloatingIpAddress.equals(floatingIp.getFloatingIpAddress()))
&& (queryStatus == null || queryStatus.equals(floatingIp.getStatus()))
&& (queryRouterID == null || queryRouterID.equals(floatingIp.getRouterUUID()))
&& (queryTenantID == null || queryTenantID.equals(floatingIp.getTenantID()))) {
}
}
//TODO: apply pagination to results
- return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronFloatingIPRequest(ans)).build();
+ return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronFloatingIpRequest(ans)).build();
}
/**
- * Returns a specific FloatingIP.
+ * Returns a specific FloatingIp.
*/
@Path("{floatingipUUID}")
@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 showFloatingIP(@PathParam("floatingipUUID") String floatingipUUID,
+ public Response showFloatingIp(@PathParam("floatingipUUID") String floatingipUUID,
// return fields
@QueryParam("fields") List<String> fields) {
return show(floatingipUUID, fields);
}
/**
- * Creates new FloatingIPs.
+ * Creates new FloatingIps.
*/
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response createFloatingIPs(final NeutronFloatingIPRequest input) {
+ public Response createFloatingIps(final NeutronFloatingIpRequest input) {
return create(input);
}
/**
- * Updates a FloatingIP.
+ * Updates a FloatingIp.
*/
@Path("{floatingipUUID}")
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response updateFloatingIP(@PathParam("floatingipUUID") String floatingipUUID,
- NeutronFloatingIPRequest input) {
+ public Response updateFloatingIp(@PathParam("floatingipUUID") String floatingipUUID,
+ NeutronFloatingIpRequest input) {
return update(floatingipUUID, input);
}
/**
- * Deletes a FloatingIP.
+ * Deletes a FloatingIp.
*/
@Path("{floatingipUUID}")
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response deleteFloatingIP(@PathParam("floatingipUUID") String floatingipUUID) {
+ public Response deleteFloatingIp(@PathParam("floatingipUUID") String floatingipUUID) {
return delete(floatingipUUID);
}
}
// filter fields
@QueryParam("id") String queryID,
@QueryParam("direction") String queryDirection,
- @QueryParam("remote_ip_prefix") String queryRemoteIPPrefix,
+ @QueryParam("remote_ip_prefix") String queryRemoteIpPrefix,
@QueryParam("metering_label_id") String queryLabelID
// pagination and sorting are TODO
) {
for (NeutronMeteringLabelRule rule : allNeutronMeteringLabelRule) {
if ((queryID == null || queryID.equals(rule.getID()))
&& (queryDirection == null || queryDirection.equals(rule.getMeteringLabelRuleDirection()))
- && (queryRemoteIPPrefix == null
- || queryRemoteIPPrefix.equals(rule.getMeteringLabelRuleRemoteIPPrefix()))
+ && (queryRemoteIpPrefix == null
+ || queryRemoteIpPrefix.equals(rule.getMeteringLabelRuleRemoteIpPrefix()))
&& (queryLabelID == null || queryLabelID.equals(rule.getMeteringLabelRuleLabelID()))) {
if (fields.size() > 0) {
ans.add(rule.extractFields(fields));
classes.add(NeutronSubnetsNorthbound.class);
classes.add(NeutronPortsNorthbound.class);
classes.add(NeutronRoutersNorthbound.class);
- classes.add(NeutronFloatingIPsNorthbound.class);
+ classes.add(NeutronFloatingIpsNorthbound.class);
classes.add(NeutronSecurityGroupsNorthbound.class);
classes.add(NeutronSecurityRulesNorthbound.class);
classes.add(NeutronFirewallNorthbound.class);
classes.add(NeutronLoadBalancerHealthMonitorNorthbound.class);
classes.add(NeutronMeteringLabelsNorthbound.class);
classes.add(NeutronMeteringLabelRulesNorthbound.class);
- classes.add(NeutronVPNServicesNorthbound.class);
- classes.add(NeutronVPNIKEPoliciesNorthbound.class);
- classes.add(NeutronVPNIPSECPoliciesNorthbound.class);
- classes.add(NeutronVPNIPSECSiteConnectionsNorthbound.class);
+ classes.add(NeutronVpnServicesNorthbound.class);
+ classes.add(NeutronVpnIkePoliciesNorthbound.class);
+ classes.add(NeutronVpnIpSecPoliciesNorthbound.class);
+ classes.add(NeutronVpnIpSecSiteConnectionsNorthbound.class);
classes.add(NeutronBgpvpnsNorthbound.class);
classes.add(NeutronL2gatewayNorthbound.class);
classes.add(NeutronL2gatewayConnectionNorthbound.class);
if (delta.getMacAddress() == null) {
delta.setMacAddress(original.getMacAddress());
}
- if (delta.getFixedIPs() == null) {
- delta.setFixedIPs(original.getFixedIPs());
+ if (delta.getFixedIps() == null) {
+ delta.setFixedIps(original.getFixedIps());
}
}
@QueryParam("name") String queryName,
@QueryParam("ip_version") Integer queryIPVersion,
@QueryParam("cidr") String queryCIDR,
- @QueryParam("gateway_ip") String queryGatewayIP,
+ @QueryParam("gateway_ip") String queryGatewayIp,
@QueryParam("enable_dhcp") Boolean queryEnableDHCP,
@QueryParam("tenant_id") String queryTenantID,
@QueryParam("ipv6_address_mode") String queryIpV6AddressMode,
&& (queryName == null || queryName.equals(subnet.getName()))
&& (queryIPVersion == null || queryIPVersion.equals(subnet.getIpVersion()))
&& (queryCIDR == null || queryCIDR.equals(subnet.getCidr()))
- && (queryGatewayIP == null || queryGatewayIP.equals(subnet.getGatewayIP()))
+ && (queryGatewayIp == null || queryGatewayIp.equals(subnet.getGatewayIp()))
&& (queryEnableDHCP == null || queryEnableDHCP.equals(subnet.getEnableDHCP()))
&& (queryTenantID == null || queryTenantID.equals(subnet.getTenantID()))
&& (queryIpV6AddressMode == null || queryIpV6AddressMode.equals(subnet.getIpV6AddressMode()))
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNIKEPolicyCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNIKEPolicy;
+import org.opendaylight.neutron.spi.INeutronVpnIkePolicyCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnIkePolicy;
/**
* Neutron Northbound REST APIs for VPN IKE Policy.<br>
*/
@Path("/vpn/ikepolicies")
-public final class NeutronVPNIKEPoliciesNorthbound
- extends AbstractNeutronNorthbound<NeutronVPNIKEPolicy, NeutronVPNIKEPolicyRequest, INeutronVPNIKEPolicyCRUD> {
+public final class NeutronVpnIkePoliciesNorthbound
+ extends AbstractNeutronNorthbound<NeutronVpnIkePolicy, NeutronVpnIkePolicyRequest, INeutronVpnIkePolicyCRUD> {
private static final String RESOURCE_NAME = "VPNIKEPolicy";
@Override
@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 listVPNIKEPolicies(
+ public Response listVpnIkePolicies(
// return fields
@QueryParam("fields") List<String> fields,
// filter fields
@QueryParam("ike_version") String queryIKEVersion
// pagination and sorting are TODO
) {
- INeutronVPNIKEPolicyCRUD labelInterface = getNeutronCRUD();
- List<NeutronVPNIKEPolicy> allNeutronVPNIKEPolicy = labelInterface.getAll();
- List<NeutronVPNIKEPolicy> ans = new ArrayList<>();
- for (NeutronVPNIKEPolicy policy : allNeutronVPNIKEPolicy) {
+ INeutronVpnIkePolicyCRUD labelInterface = getNeutronCRUD();
+ List<NeutronVpnIkePolicy> allNeutronVpnIkePolicy = labelInterface.getAll();
+ List<NeutronVpnIkePolicy> ans = new ArrayList<>();
+ for (NeutronVpnIkePolicy policy : allNeutronVpnIkePolicy) {
if ((queryID == null || queryID.equals(policy.getID()))
&& (queryName == null || queryName.equals(policy.getName()))
&& (queryAuthAlgorithm == null || queryAuthAlgorithm.equals(policy.getAuthAlgorithm()))
}
}
//TODO: apply pagination to results
- return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVPNIKEPolicyRequest(ans)).build();
+ return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVpnIkePolicyRequest(ans)).build();
}
/**
@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 showVPNIKEPolicy(@PathParam("policyID") String policyUUID,
- // return fields
- @QueryParam("fields") List<String> fields) {
+ public Response showVpnIkePolicy(@PathParam("policyID") String policyUUID,
+ // return fields
+ @QueryParam("fields") List<String> fields) {
return show(policyUUID, fields);
}
@POST
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
- @TypeHint(NeutronVPNIKEPolicy.class)
+ @TypeHint(NeutronVpnIkePolicy.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response createVPNIKEPolicy(final NeutronVPNIKEPolicyRequest input) {
+ public Response createVpnIkePolicy(final NeutronVpnIkePolicyRequest input) {
return create(input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response updateVPNIKEPolicy(@PathParam("policyID") String policyUUID,
- final NeutronVPNIKEPolicyRequest input) {
+ public Response updateVpnIkePolicy(@PathParam("policyID") String policyUUID,
+ final NeutronVpnIkePolicyRequest input) {
return update(policyUUID, input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response deleteVPNIKEPolicy(@PathParam("policyID") String policyUUID) {
+ public Response deleteVpnIkePolicy(@PathParam("policyID") String policyUUID) {
return delete(policyUUID);
}
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.opendaylight.neutron.spi.NeutronVPNIKEPolicy;
+import org.opendaylight.neutron.spi.NeutronVpnIkePolicy;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIKEPolicyRequest implements INeutronRequest<NeutronVPNIKEPolicy> {
+public final class NeutronVpnIkePolicyRequest implements INeutronRequest<NeutronVpnIkePolicy> {
@XmlElement(name = "ikepolicy")
- NeutronVPNIKEPolicy singleton;
+ NeutronVpnIkePolicy singleton;
@XmlElement(name = "ikepolicies")
- List<NeutronVPNIKEPolicy> bulkRequest;
+ List<NeutronVpnIkePolicy> bulkRequest;
- NeutronVPNIKEPolicyRequest() {
+ NeutronVpnIkePolicyRequest() {
}
- NeutronVPNIKEPolicyRequest(NeutronVPNIKEPolicy policy) {
+ NeutronVpnIkePolicyRequest(NeutronVpnIkePolicy policy) {
singleton = policy;
}
- NeutronVPNIKEPolicyRequest(List<NeutronVPNIKEPolicy> policies) {
+ NeutronVpnIkePolicyRequest(List<NeutronVpnIkePolicy> policies) {
bulkRequest = policies;
}
}
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecPolicyCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecPolicy;
/**
* Neutron Northbound REST APIs for VPN IPSEC Policy.<br>
*/
@Path("/vpn/ipsecpolicies")
-public final class NeutronVPNIPSECPoliciesNorthbound extends
- AbstractNeutronNorthbound<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD> {
+public final class NeutronVpnIpSecPoliciesNorthbound extends
+ AbstractNeutronNorthbound<NeutronVpnIpSecPolicy, NeutronVpnIpSecPolicyRequest, INeutronVpnIpSecPolicyCRUD> {
private static final String RESOURCE_NAME = "VPNIPSECPolicy";
@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 listVPNIPSECPolicies(
+ public Response listVpnIPSecPolicies(
// return fields
@QueryParam("fields") List<String> fields,
// filter fields
@QueryParam("pfs") String queryPFS
// pagination and sorting are TODO
) {
- INeutronVPNIPSECPolicyCRUD policyInterface = getNeutronCRUD();
- List<NeutronVPNIPSECPolicy> allNeutronVPNIPSECPolicies = policyInterface.getAll();
- List<NeutronVPNIPSECPolicy> ans = new ArrayList<>();
- for (NeutronVPNIPSECPolicy policy : allNeutronVPNIPSECPolicies) {
+ INeutronVpnIpSecPolicyCRUD policyInterface = getNeutronCRUD();
+ List<NeutronVpnIpSecPolicy> allNeutronVpnIPSecPolicies = policyInterface.getAll();
+ List<NeutronVpnIpSecPolicy> ans = new ArrayList<>();
+ for (NeutronVpnIpSecPolicy policy : allNeutronVpnIPSecPolicies) {
if ((queryID == null || queryID.equals(policy.getID()))
&& (queryName == null || queryName.equals(policy.getName()))
&& (queryAuthAlgorithm == null || queryAuthAlgorithm.equals(policy.getAuthAlgorithm()))
}
}
//TODO: apply pagination to results
- return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVPNIPSECPolicyRequest(ans)).build();
+ return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVpnIpSecPolicyRequest(ans)).build();
}
/**
@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 showVPNIPSECPolicy(@PathParam("policyID") String policyUUID,
- // return fields
- @QueryParam("fields") List<String> fields) {
+ public Response showVpnIPSecPolicy(@PathParam("policyID") String policyUUID,
+ // return fields
+ @QueryParam("fields") List<String> fields) {
return show(policyUUID, fields);
}
@POST
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
- @TypeHint(NeutronVPNIPSECPolicy.class)
+ @TypeHint(NeutronVpnIpSecPolicy.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response createVPNIPSECPolicy(final NeutronVPNIPSECPolicyRequest input) {
+ public Response createVpnIPSecPolicy(final NeutronVpnIpSecPolicyRequest input) {
return create(input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response updateVPNIPSECPolicy(@PathParam("policyID") String policyUUID,
- final NeutronVPNIPSECPolicyRequest input) {
+ public Response updateVpnIPSecPolicy(@PathParam("policyID") String policyUUID,
+ final NeutronVpnIpSecPolicyRequest input) {
return update(policyUUID, input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response deleteVPNIPSECPolicy(@PathParam("policyID") String policyUUID) {
+ public Response deleteVpnIPSecPolicy(@PathParam("policyID") String policyUUID) {
return delete(policyUUID);
}
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecPolicy;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIPSECPolicyRequest implements INeutronRequest<NeutronVPNIPSECPolicy> {
+public final class NeutronVpnIpSecPolicyRequest implements INeutronRequest<NeutronVpnIpSecPolicy> {
@XmlElement(name = "ipsecpolicy")
- NeutronVPNIPSECPolicy singleton;
+ NeutronVpnIpSecPolicy singleton;
@XmlElement(name = "ipsecpolicies")
- List<NeutronVPNIPSECPolicy> bulkRequest;
+ List<NeutronVpnIpSecPolicy> bulkRequest;
- NeutronVPNIPSECPolicyRequest() {
+ NeutronVpnIpSecPolicyRequest() {
}
- NeutronVPNIPSECPolicyRequest(NeutronVPNIPSECPolicy policy) {
+ NeutronVpnIpSecPolicyRequest(NeutronVpnIpSecPolicy policy) {
singleton = policy;
}
- NeutronVPNIPSECPolicyRequest(List<NeutronVPNIPSECPolicy> policies) {
+ NeutronVpnIpSecPolicyRequest(List<NeutronVpnIpSecPolicy> policies) {
bulkRequest = policies;
}
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECSiteConnection;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecSiteConnection;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNIPSECSiteConnectionRequest implements INeutronRequest<NeutronVPNIPSECSiteConnection> {
+public final class NeutronVpnIpSecSiteConnectionRequest implements INeutronRequest<NeutronVpnIpSecSiteConnection> {
@XmlElement(name = "ipsec_site_connection")
- NeutronVPNIPSECSiteConnection singleton;
+ NeutronVpnIpSecSiteConnection singleton;
@XmlElement(name = "ipsec_site_connections")
- List<NeutronVPNIPSECSiteConnection> bulkRequest;
+ List<NeutronVpnIpSecSiteConnection> bulkRequest;
- NeutronVPNIPSECSiteConnectionRequest() {
+ NeutronVpnIpSecSiteConnectionRequest() {
}
- NeutronVPNIPSECSiteConnectionRequest(NeutronVPNIPSECSiteConnection connection) {
+ NeutronVpnIpSecSiteConnectionRequest(NeutronVpnIpSecSiteConnection connection) {
singleton = connection;
}
- NeutronVPNIPSECSiteConnectionRequest(List<NeutronVPNIPSECSiteConnection> connections) {
+ NeutronVpnIpSecSiteConnectionRequest(List<NeutronVpnIpSecSiteConnection> connections) {
bulkRequest = connections;
}
}
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECSiteConnectionsCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECSiteConnection;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecSiteConnectionsCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecSiteConnection;
/**
* Neutron Northbound REST APIs for VPN IPSEC SiteConnection.<br>
*/
@Path("/vpn/ipsecsiteconnections")
-public final class NeutronVPNIPSECSiteConnectionsNorthbound
- extends AbstractNeutronNorthbound<NeutronVPNIPSECSiteConnection,
- NeutronVPNIPSECSiteConnectionRequest, INeutronVPNIPSECSiteConnectionsCRUD> {
+public final class NeutronVpnIpSecSiteConnectionsNorthbound
+ extends AbstractNeutronNorthbound<NeutronVpnIpSecSiteConnection,
+ NeutronVpnIpSecSiteConnectionRequest, INeutronVpnIpSecSiteConnectionsCRUD> {
private static final String RESOURCE_NAME = "VPNIPSECSiteConnections";
@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 listVPNIPSECSiteConnections(
+ public Response listVpnIPSecSiteConnections(
// return fields
@QueryParam("fields") List<String> fields,
// filter fields
@QueryParam("vpnservice_id") String queryVpnServiceID
// pagination and sorting are TODO
) {
- INeutronVPNIPSECSiteConnectionsCRUD labelInterface = getNeutronCRUD();
- List<NeutronVPNIPSECSiteConnection> allNeutronVPNIPSECSiteConnection = labelInterface.getAll();
- List<NeutronVPNIPSECSiteConnection> ans = new ArrayList<>();
- for (NeutronVPNIPSECSiteConnection siteConnection : allNeutronVPNIPSECSiteConnection) {
+ INeutronVpnIpSecSiteConnectionsCRUD labelInterface = getNeutronCRUD();
+ List<NeutronVpnIpSecSiteConnection> allNeutronVpnIPSecSiteConnection = labelInterface.getAll();
+ List<NeutronVpnIpSecSiteConnection> ans = new ArrayList<>();
+ for (NeutronVpnIpSecSiteConnection siteConnection : allNeutronVpnIPSecSiteConnection) {
if ((queryID == null || queryID.equals(siteConnection.getID()))
&& (queryTenantID == null || queryTenantID.equals(siteConnection.getTenantID()))
&& (queryName == null || queryName.equals(siteConnection.getName()))
}
// TODO: apply pagination to results
- return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVPNIPSECSiteConnectionRequest(ans)).build();
+ return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVpnIpSecSiteConnectionRequest(ans)).build();
}
/**
@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 showVPNIPSECSiteConnection(@PathParam("connectionID") String connectionID,
- // return fields
- @QueryParam("fields") List<String> fields) {
+ public Response showVpnIPSecSiteConnection(@PathParam("connectionID") String connectionID,
+ // return fields
+ @QueryParam("fields") List<String> fields) {
return show(connectionID, fields);
}
@POST
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
- @TypeHint(NeutronVPNIPSECSiteConnection.class)
+ @TypeHint(NeutronVpnIpSecSiteConnection.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response createVPNIPSECSiteConnection(final NeutronVPNIPSECSiteConnectionRequest input) {
+ public Response createVpnIPSecSiteConnection(final NeutronVpnIpSecSiteConnectionRequest input) {
return create(input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response updateVPNIPSECSiteConnection(@PathParam("connectionID") String connectionID,
- final NeutronVPNIPSECSiteConnectionRequest input) {
+ public Response updateVpnIPSecSiteConnection(@PathParam("connectionID") String connectionID,
+ final NeutronVpnIpSecSiteConnectionRequest input) {
return update(connectionID, input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response deleteVPNIPSECSiteConnection(@PathParam("connectionID") String connectionID) {
+ public Response deleteVpnIPSecSiteConnection(@PathParam("connectionID") String connectionID) {
return delete(connectionID);
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.opendaylight.neutron.spi.NeutronVPNService;
+import org.opendaylight.neutron.spi.NeutronVpnService;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public final class NeutronVPNServiceRequest implements INeutronRequest<NeutronVPNService> {
+public final class NeutronVpnServiceRequest implements INeutronRequest<NeutronVpnService> {
@XmlElement(name = "vpnservice")
- NeutronVPNService singleton;
+ NeutronVpnService singleton;
@XmlElement(name = "vpnservices")
- List<NeutronVPNService> bulkRequest;
+ List<NeutronVpnService> bulkRequest;
- NeutronVPNServiceRequest() {
+ NeutronVpnServiceRequest() {
}
- NeutronVPNServiceRequest(NeutronVPNService service) {
+ NeutronVpnServiceRequest(NeutronVpnService service) {
singleton = service;
}
- NeutronVPNServiceRequest(List<NeutronVPNService> services) {
+ NeutronVpnServiceRequest(List<NeutronVpnService> services) {
bulkRequest = services;
}
}
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNServiceCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNService;
+import org.opendaylight.neutron.spi.INeutronVpnServiceCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnService;
/**
* Neutron Northbound REST APIs for VPN Service.<br>
*/
@Path("/vpn/vpnservices")
-public final class NeutronVPNServicesNorthbound
- extends AbstractNeutronNorthbound<NeutronVPNService, NeutronVPNServiceRequest, INeutronVPNServiceCRUD> {
+public final class NeutronVpnServicesNorthbound
+ extends AbstractNeutronNorthbound<NeutronVpnService, NeutronVpnServiceRequest, INeutronVpnServiceCRUD> {
- private static final String RESOURCE_NAME = "VPNService";
+ private static final String RESOURCE_NAME = "VpnService";
@Override
protected String getResourceName() {
@QueryParam("page_reverse") String pageReverse
// sorting not supported
) {
- INeutronVPNServiceCRUD vpnServiceInterface = getNeutronCRUD();
- List<NeutronVPNService> allVPNService = vpnServiceInterface.getAll();
- List<NeutronVPNService> ans = new ArrayList<>();
- for (NeutronVPNService vpnService : allVPNService) {
+ INeutronVpnServiceCRUD vpnServiceInterface = getNeutronCRUD();
+ List<NeutronVpnService> allVPNService = vpnServiceInterface.getAll();
+ List<NeutronVpnService> ans = new ArrayList<>();
+ for (NeutronVpnService vpnService : allVPNService) {
if ((queryID == null || queryID.equals(vpnService.getID()))
&& (queryName == null || queryName.equals(vpnService.getName()))
&& (queryAdminStateUp == null || queryAdminStateUp.equals(vpnService.getAdminStateUp()))
}
}
- return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVPNServiceRequest(ans)).build();
+ return Response.status(HttpURLConnection.HTTP_OK).entity(new NeutronVpnServiceRequest(ans)).build();
}
/**
@POST
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
- @TypeHint(NeutronVPNService.class)
+ @TypeHint(NeutronVpnService.class)
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response createVPNService(final NeutronVPNServiceRequest input) {
+ public Response createVPNService(final NeutronVpnServiceRequest input) {
return create(input);
}
@StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
@ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
- public Response updateVPNService(@PathParam("serviceID") String serviceID, final NeutronVPNServiceRequest input) {
+ public Response updateVPNService(@PathParam("serviceID") String serviceID, final NeutronVpnServiceRequest input) {
return update(serviceID, input);
}
<suppressions>
<suppress files="[/\\]target[/\\]" checks=".*"/>
- <suppress checks="AbbreviationAsWordInName"
- files="."
- />
</suppressions>
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.neutron.spi.INeutronFloatingIPCRUD;
-import org.opendaylight.neutron.spi.NeutronFloatingIP;
+import org.opendaylight.neutron.spi.INeutronFloatingIpCRUD;
+import org.opendaylight.neutron.spi.NeutronFloatingIp;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l3.rev150712.floatingips.attributes.Floatingips;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l3.rev150712.floatingips.attributes.floatingips.Floatingip;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class NeutronFloatingIPInterface
- extends AbstractNeutronInterface<Floatingip, Floatingips, FloatingipKey, NeutronFloatingIP>
- implements INeutronFloatingIPCRUD {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFloatingIPInterface.class);
+public final class NeutronFloatingIpInterface
+ extends AbstractNeutronInterface<Floatingip, Floatingips, FloatingipKey, NeutronFloatingIp>
+ implements INeutronFloatingIpCRUD {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFloatingIpInterface.class);
- NeutronFloatingIPInterface(DataBroker db) {
+ NeutronFloatingIpInterface(DataBroker db) {
super(FloatingipBuilder.class, db);
}
- // IfNBFloatingIPCRUD interface methods
+ // IfNBFloatingIpCRUD interface methods
@Override
protected List<Floatingip> getDataObjectList(Floatingips fips) {
}
@Override
- protected Floatingip toMd(NeutronFloatingIP floatingIp) {
+ protected Floatingip toMd(NeutronFloatingIp floatingIp) {
final FloatingipBuilder floatingipBuilder = new FloatingipBuilder();
- if (floatingIp.getFixedIPAddress() != null) {
- floatingipBuilder.setFixedIpAddress(new IpAddress(floatingIp.getFixedIPAddress().toCharArray()));
+ if (floatingIp.getFixedIpAddress() != null) {
+ floatingipBuilder.setFixedIpAddress(new IpAddress(floatingIp.getFixedIpAddress().toCharArray()));
}
- if (floatingIp.getFloatingIPAddress() != null) {
- floatingipBuilder.setFloatingIpAddress(new IpAddress(floatingIp.getFloatingIPAddress().toCharArray()));
+ if (floatingIp.getFloatingIpAddress() != null) {
+ floatingipBuilder.setFloatingIpAddress(new IpAddress(floatingIp.getFloatingIpAddress().toCharArray()));
}
if (floatingIp.getFloatingNetworkUUID() != null) {
floatingipBuilder.setFloatingNetworkId(toUuid(floatingIp.getFloatingNetworkUUID()));
return floatingipBuilder.build();
}
- protected NeutronFloatingIP fromMd(Floatingip fip) {
- final NeutronFloatingIP result = new NeutronFloatingIP();
+ protected NeutronFloatingIp fromMd(Floatingip fip) {
+ final NeutronFloatingIp result = new NeutronFloatingIp();
result.setID(fip.getUuid().getValue());
if (fip.getFloatingNetworkId() != null) {
result.setFloatingNetworkUUID(String.valueOf(fip.getFloatingNetworkId().getValue()));
result.setPortUUID(String.valueOf(fip.getPortId().getValue()));
}
if (fip.getFixedIpAddress() != null) {
- result.setFixedIPAddress(String.valueOf(fip.getFixedIpAddress().getValue()));
+ result.setFixedIpAddress(String.valueOf(fip.getFixedIpAddress().getValue()));
}
if (fip.getFloatingIpAddress() != null) {
- result.setFloatingIPAddress(String.valueOf(fip.getFloatingIpAddress().getValue()));
+ result.setFloatingIpAddress(String.valueOf(fip.getFloatingIpAddress().getValue()));
}
if (fip.getTenantId() != null) {
result.setTenantID(fip.getTenantId());
meteringRuleBuilder.setDirection(
(Class<? extends DirectionBase>) mapper.get(meteringLabelRule.getMeteringLabelRuleDirection()));
}
- if (meteringLabelRule.getMeteringLabelRuleRemoteIPPrefix() != null) {
+ if (meteringLabelRule.getMeteringLabelRuleRemoteIpPrefix() != null) {
final IpPrefix ipPrefix = new IpPrefix(
- meteringLabelRule.getMeteringLabelRuleRemoteIPPrefix().toCharArray());
+ meteringLabelRule.getMeteringLabelRuleRemoteIpPrefix().toCharArray());
meteringRuleBuilder.setRemoteIpPrefix(ipPrefix);
}
meteringRuleBuilder.setExcluded(meteringLabelRule.getMeteringLabelRuleExcluded());
answer.setMeteringLabelRuleDirection(DIRECTION_MAP.get(rule.getDirection()));
}
if (rule.getRemoteIpPrefix() != null) {
- answer.setMeteringLabelRuleRemoteIPPrefix(new String(rule.getRemoteIpPrefix().getValue()));
+ answer.setMeteringLabelRuleRemoteIpPrefix(new String(rule.getRemoteIpPrefix().getValue()));
}
answer.setMeteringLabelRuleExcluded(rule.isExcluded());
return answer;
import java.util.Set;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.neutron.spi.INeutronPortCRUD;
-import org.opendaylight.neutron.spi.NeutronIPs;
+import org.opendaylight.neutron.spi.NeutronIps;
import org.opendaylight.neutron.spi.NeutronPort;
import org.opendaylight.neutron.spi.NeutronPortAllowedAddressPairs;
import org.opendaylight.neutron.spi.NeutronPortExtraDHCPOption;
result.setExtraDHCPOptions(options);
}
if (port.getFixedIps() != null) {
- final List<NeutronIPs> ips = new ArrayList<NeutronIPs>();
- for (final FixedIps mdIP : port.getFixedIps()) {
- final NeutronIPs ip = new NeutronIPs();
- ip.setIpAddress(String.valueOf(mdIP.getIpAddress().getValue()));
- ip.setSubnetUUID(mdIP.getSubnetId().getValue());
+ final List<NeutronIps> ips = new ArrayList<NeutronIps>();
+ for (final FixedIps mdIp : port.getFixedIps()) {
+ final NeutronIps ip = new NeutronIps();
+ ip.setIpAddress(String.valueOf(mdIp.getIpAddress().getValue()));
+ ip.setSubnetUUID(mdIp.getSubnetId().getValue());
ips.add(ip);
}
- result.setFixedIPs(ips);
+ result.setFixedIps(ips);
}
result.setMacAddress(port.getMacAddress().getValue());
result.setNetworkUUID(String.valueOf(port.getNetworkId().getValue()));
}
portBuilder.setExtraDhcpOpts(listExtraDHCPOptions);
}
- if (neutronPort.getFixedIPs() != null) {
- final List<FixedIps> listNeutronIPs = new ArrayList<FixedIps>();
- for (final NeutronIPs neutronIPs : neutronPort.getFixedIPs()) {
+ if (neutronPort.getFixedIps() != null) {
+ final List<FixedIps> listNeutronIps = new ArrayList<FixedIps>();
+ for (final NeutronIps neutronIPs : neutronPort.getFixedIps()) {
final FixedIpsBuilder fixedIpsBuilder = new FixedIpsBuilder();
fixedIpsBuilder.setIpAddress(new IpAddress(neutronIPs.getIpAddress().toCharArray()));
fixedIpsBuilder.setSubnetId(toUuid(neutronIPs.getSubnetUUID()));
- listNeutronIPs.add(fixedIpsBuilder.build());
+ listNeutronIps.add(fixedIpsBuilder.build());
}
- portBuilder.setFixedIps(listNeutronIPs);
+ portBuilder.setFixedIps(listNeutronIps);
}
if (neutronPort.getMacAddress() != null) {
portBuilder.setMacAddress(new MacAddress(neutronPort.getMacAddress()));
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.neutron.spi.INeutronRouterCRUD;
-import org.opendaylight.neutron.spi.NeutronIPs;
+import org.opendaylight.neutron.spi.NeutronIps;
import org.opendaylight.neutron.spi.NeutronRoute;
import org.opendaylight.neutron.spi.NeutronRouter;
import org.opendaylight.neutron.spi.NeutronRouterNetworkReference;
final ExternalGatewayInfoBuilder builder = new ExternalGatewayInfoBuilder();
builder.setEnableSnat(externalGatewayInfos.getEnableSNAT());
builder.setExternalNetworkId(toUuid(externalGatewayInfos.getNetworkID()));
- if (externalGatewayInfos.getExternalFixedIPs() != null) {
+ if (externalGatewayInfos.getExternalFixedIps() != null) {
final List<ExternalFixedIps> externalFixedIps = new ArrayList<ExternalFixedIps>();
- for (final NeutronIPs externalIp : externalGatewayInfos.getExternalFixedIPs()) {
+ for (final NeutronIps externalIp : externalGatewayInfos.getExternalFixedIps()) {
final ExternalFixedIpsBuilder eFixedIpBuilder = new ExternalFixedIpsBuilder();
eFixedIpBuilder.setIpAddress(new IpAddress(externalIp.getIpAddress().toCharArray()));
eFixedIpBuilder.setSubnetId(toUuid(externalIp.getSubnetUUID()));
extGwInfo.setNetworkID(String.valueOf(router.getExternalGatewayInfo().getExternalNetworkId().getValue()));
extGwInfo.setEnableSNAT(router.getExternalGatewayInfo().isEnableSnat());
if (router.getExternalGatewayInfo().getExternalFixedIps() != null) {
- final List<NeutronIPs> fixedIPs = new ArrayList<NeutronIPs>();
- for (final ExternalFixedIps mdFixedIP : router.getExternalGatewayInfo().getExternalFixedIps()) {
- final NeutronIPs fixedIP = new NeutronIPs();
- fixedIP.setSubnetUUID(String.valueOf(mdFixedIP.getSubnetId().getValue()));
- fixedIP.setIpAddress(String.valueOf(mdFixedIP.getIpAddress().getValue()));
- fixedIPs.add(fixedIP);
+ final List<NeutronIps> fixedIps = new ArrayList<NeutronIps>();
+ for (final ExternalFixedIps mdFixedIp : router.getExternalGatewayInfo().getExternalFixedIps()) {
+ final NeutronIps fixedIp = new NeutronIps();
+ fixedIp.setSubnetUUID(String.valueOf(mdFixedIp.getSubnetId().getValue()));
+ fixedIp.setIpAddress(String.valueOf(mdFixedIp.getIpAddress().getValue()));
+ fixedIps.add(fixedIp);
}
- extGwInfo.setExternalFixedIPs(fixedIPs);
+ extGwInfo.setExternalFixedIps(fixedIps);
}
result.setExternalGatewayInfo(extGwInfo);
}
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
import org.opendaylight.neutron.spi.NeutronRoute;
import org.opendaylight.neutron.spi.NeutronSubnet;
-import org.opendaylight.neutron.spi.NeutronSubnetIPAllocationPool;
+import org.opendaylight.neutron.spi.NeutronSubnetIpAllocationPool;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefixBuilder;
result.setIpVersion(IPV_MAP.get(subnet.getIpVersion()));
result.setCidr(String.valueOf(subnet.getCidr().getValue()));
if (subnet.getGatewayIp() != null) {
- result.setGatewayIP(String.valueOf(subnet.getGatewayIp().getValue()));
+ result.setGatewayIp(String.valueOf(subnet.getGatewayIp().getValue()));
}
if (subnet.getIpv6RaMode() != null) {
result.setIpV6RaMode(DHCPV6_MAP.get(subnet.getIpv6RaMode()));
}
result.setEnableDHCP(subnet.isEnableDhcp());
if (subnet.getAllocationPools() != null) {
- final List<NeutronSubnetIPAllocationPool> allocationPools = new ArrayList<NeutronSubnetIPAllocationPool>();
+ final List<NeutronSubnetIpAllocationPool> allocationPools = new ArrayList<NeutronSubnetIpAllocationPool>();
for (final AllocationPools allocationPool : subnet.getAllocationPools()) {
- final NeutronSubnetIPAllocationPool pool = new NeutronSubnetIPAllocationPool();
+ final NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
pool.setPoolStart(String.valueOf(allocationPool.getStart().getValue()));
pool.setPoolEnd(String.valueOf(allocationPool.getEnd().getValue()));
allocationPools.add(pool);
final IpPrefix ipPrefix = IpPrefixBuilder.getDefaultInstance(subnet.getCidr());
subnetBuilder.setCidr(ipPrefix);
}
- if (subnet.getGatewayIP() != null) {
- final IpAddress ipAddress = new IpAddress(subnet.getGatewayIP().toCharArray());
+ if (subnet.getGatewayIp() != null) {
+ final IpAddress ipAddress = new IpAddress(subnet.getGatewayIp().toCharArray());
subnetBuilder.setGatewayIp(ipAddress);
}
if (subnet.getIpV6RaMode() != null) {
subnetBuilder.setEnableDhcp(subnet.getEnableDHCP());
if (subnet.getAllocationPools() != null) {
final List<AllocationPools> allocationPools = new ArrayList<AllocationPools>();
- for (final NeutronSubnetIPAllocationPool allocationPool : subnet.getAllocationPools()) {
+ for (final NeutronSubnetIpAllocationPool allocationPool : subnet.getAllocationPools()) {
final AllocationPoolsBuilder builder = new AllocationPoolsBuilder();
builder.setStart(new IpAddress(allocationPool.getPoolStart().toCharArray()));
builder.setEnd(new IpAddress(allocationPool.getPoolEnd().toCharArray()));
import org.opendaylight.neutron.spi.INeutronFirewallCRUD;
import org.opendaylight.neutron.spi.INeutronFirewallPolicyCRUD;
import org.opendaylight.neutron.spi.INeutronFirewallRuleCRUD;
-import org.opendaylight.neutron.spi.INeutronFloatingIPCRUD;
+import org.opendaylight.neutron.spi.INeutronFloatingIpCRUD;
import org.opendaylight.neutron.spi.INeutronL2gatewayCRUD;
import org.opendaylight.neutron.spi.INeutronL2gatewayConnectionCRUD;
import org.opendaylight.neutron.spi.INeutronLoadBalancerCRUD;
import org.opendaylight.neutron.spi.INeutronSecurityGroupCRUD;
import org.opendaylight.neutron.spi.INeutronSecurityRuleCRUD;
import org.opendaylight.neutron.spi.INeutronSubnetCRUD;
-import org.opendaylight.neutron.spi.INeutronVPNIKEPolicyCRUD;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyCRUD;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECSiteConnectionsCRUD;
-import org.opendaylight.neutron.spi.INeutronVPNServiceCRUD;
+import org.opendaylight.neutron.spi.INeutronVpnIkePolicyCRUD;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecPolicyCRUD;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecSiteConnectionsCRUD;
+import org.opendaylight.neutron.spi.INeutronVpnServiceCRUD;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.slf4j.Logger;
registerCRUDInterface(INeutronFirewallCRUD.class, new NeutronFirewallInterface(db));
registerCRUDInterface(INeutronFirewallPolicyCRUD.class, new NeutronFirewallPolicyInterface(db));
registerCRUDInterface(INeutronFirewallRuleCRUD.class, new NeutronFirewallRuleInterface(db));
- registerCRUDInterface(INeutronFloatingIPCRUD.class, new NeutronFloatingIPInterface(db));
+ registerCRUDInterface(INeutronFloatingIpCRUD.class, new NeutronFloatingIpInterface(db));
registerCRUDInterface(INeutronL2gatewayConnectionCRUD.class, new NeutronL2gatewayConnectionInterface(db));
registerCRUDInterface(INeutronL2gatewayCRUD.class, new NeutronL2gatewayInterface(db));
registerCRUDInterface(INeutronLoadBalancerHealthMonitorCRUD.class,
registerCRUDInterface(INeutronSecurityGroupCRUD.class, new NeutronSecurityGroupInterface(db));
registerCRUDInterface(INeutronSecurityRuleCRUD.class, new NeutronSecurityRuleInterface(db));
registerCRUDInterface(INeutronSubnetCRUD.class, new NeutronSubnetInterface(db));
- registerCRUDInterface(INeutronVPNIKEPolicyCRUD.class, new NeutronVPNIKEPolicyInterface(db));
- registerCRUDInterface(INeutronVPNIPSECPolicyCRUD.class, new NeutronVPNIPSECPolicyInterface(db));
- registerCRUDInterface(INeutronVPNIPSECSiteConnectionsCRUD.class,
- new NeutronVPNIPSECSiteConnectionsInterface(db));
- registerCRUDInterface(INeutronVPNServiceCRUD.class, new NeutronVPNServiceInterface(db));
+ registerCRUDInterface(INeutronVpnIkePolicyCRUD.class, new NeutronVpnIkePolicyInterface(db));
+ registerCRUDInterface(INeutronVpnIpSecPolicyCRUD.class, new NeutronVpnIpSecPolicyInterface(db));
+ registerCRUDInterface(INeutronVpnIpSecSiteConnectionsCRUD.class,
+ new NeutronVpnIpSecSiteConnectionsInterface(db));
+ registerCRUDInterface(INeutronVpnServiceCRUD.class, new NeutronVpnServiceInterface(db));
// We don't need context any more
this.context = null;
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.neutron.spi.INeutronVPNIKEPolicyCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNIKEPolicy;
-import org.opendaylight.neutron.spi.NeutronVPNLifetime;
+import org.opendaylight.neutron.spi.INeutronVpnIkePolicyCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnIkePolicy;
+import org.opendaylight.neutron.spi.NeutronVpnLifetime;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ikepolicies.attributes.IkePolicies;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ikepolicies.attributes.ike.policies.Ikepolicy;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ikepolicies.attributes.ike.policies.IkepolicyBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class NeutronVPNIKEPolicyInterface
- extends AbstractNeutronInterface<Ikepolicy, IkePolicies, IkepolicyKey, NeutronVPNIKEPolicy>
- implements INeutronVPNIKEPolicyCRUD {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVPNIKEPolicyInterface.class);
+public final class NeutronVpnIkePolicyInterface
+ extends AbstractNeutronInterface<Ikepolicy, IkePolicies, IkepolicyKey, NeutronVpnIkePolicy>
+ implements INeutronVpnIkePolicyCRUD {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIkePolicyInterface.class);
- NeutronVPNIKEPolicyInterface(DataBroker db) {
+ NeutronVpnIkePolicyInterface(DataBroker db) {
super(IkepolicyBuilder.class, db);
}
return policies.getIkepolicy();
}
- protected NeutronVPNIKEPolicy fromMd(Ikepolicy ikePolicy) {
- final NeutronVPNIKEPolicy answer = new NeutronVPNIKEPolicy();
+ protected NeutronVpnIkePolicy fromMd(Ikepolicy ikePolicy) {
+ final NeutronVpnIkePolicy answer = new NeutronVpnIkePolicy();
fromMdBaseAttributes(ikePolicy, answer);
if (ikePolicy.getAuthAlgorithm() != null) {
answer.setAuthAlgorithm(ikePolicy.getAuthAlgorithm());
answer.setIkeVersion(ikePolicy.getIkeVersion());
}
if (ikePolicy.getLifetime() != null) {
- final NeutronVPNLifetime vpnLifetime = new NeutronVPNLifetime();
+ final NeutronVpnLifetime vpnLifetime = new NeutronVpnLifetime();
ikePolicy.getLifetime();
vpnLifetime.setUnits(ikePolicy.getLifetime().getUnits());
vpnLifetime.setValue(ikePolicy.getLifetime().getValue());
}
@Override
- protected Ikepolicy toMd(NeutronVPNIKEPolicy ikePolicy) {
+ protected Ikepolicy toMd(NeutronVpnIkePolicy ikePolicy) {
final IkepolicyBuilder ikePolicyBuilder = new IkepolicyBuilder();
toMdBaseAttributes(ikePolicy, ikePolicyBuilder);
if (ikePolicy.getAuthAlgorithm() != null) {
ikePolicyBuilder.setIkeVersion(ikePolicy.getIkeVersion());
}
if (ikePolicy.getLifetime() != null) {
- final NeutronVPNLifetime vpnLifetime = ikePolicy.getLifetime();
+ final NeutronVpnLifetime vpnLifetime = ikePolicy.getLifetime();
final LifetimeBuilder lifetimeBuilder = new LifetimeBuilder();
lifetimeBuilder.setUnits(vpnLifetime.getUnits());
lifetimeBuilder.setValue(vpnLifetime.getValue());
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
-import org.opendaylight.neutron.spi.NeutronVPNLifetime;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecPolicyCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecPolicy;
+import org.opendaylight.neutron.spi.NeutronVpnLifetime;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecpolicies.attributes.IpsecPolicies;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecpolicies.attributes.ipsec.policies.Ipsecpolicy;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecpolicies.attributes.ipsec.policies.IpsecpolicyBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class NeutronVPNIPSECPolicyInterface
- extends AbstractNeutronInterface<Ipsecpolicy, IpsecPolicies, IpsecpolicyKey, NeutronVPNIPSECPolicy>
- implements INeutronVPNIPSECPolicyCRUD {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVPNIPSECPolicyInterface.class);
+public final class NeutronVpnIpSecPolicyInterface
+ extends AbstractNeutronInterface<Ipsecpolicy, IpsecPolicies, IpsecpolicyKey, NeutronVpnIpSecPolicy>
+ implements INeutronVpnIpSecPolicyCRUD {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIpSecPolicyInterface.class);
- NeutronVPNIPSECPolicyInterface(DataBroker db) {
+ NeutronVpnIpSecPolicyInterface(DataBroker db) {
super(IpsecpolicyBuilder.class, db);
}
return policies.getIpsecpolicy();
}
- protected NeutronVPNIPSECPolicy fromMd(Ipsecpolicy ipsecPolicy) {
- final NeutronVPNIPSECPolicy answer = new NeutronVPNIPSECPolicy();
+ protected NeutronVpnIpSecPolicy fromMd(Ipsecpolicy ipsecPolicy) {
+ final NeutronVpnIpSecPolicy answer = new NeutronVpnIpSecPolicy();
fromMdBaseAttributes(ipsecPolicy, answer);
if (ipsecPolicy.getAuthAlgorithm() != null) {
answer.setAuthAlgorithm(ipsecPolicy.getAuthAlgorithm());
answer.setPerfectForwardSecrecy(ipsecPolicy.getPfs());
}
if (ipsecPolicy.getLifetime() != null) {
- final NeutronVPNLifetime vpnLifetime = new NeutronVPNLifetime();
+ final NeutronVpnLifetime vpnLifetime = new NeutronVpnLifetime();
vpnLifetime.setUnits(ipsecPolicy.getLifetime().getUnits());
vpnLifetime.setValue(ipsecPolicy.getLifetime().getValue());
answer.setLifetime(vpnLifetime);
}
@Override
- protected Ipsecpolicy toMd(NeutronVPNIPSECPolicy ipsecPolicy) {
+ protected Ipsecpolicy toMd(NeutronVpnIpSecPolicy ipsecPolicy) {
final IpsecpolicyBuilder ipsecPolicyBuilder = new IpsecpolicyBuilder();
toMdBaseAttributes(ipsecPolicy, ipsecPolicyBuilder);
if (ipsecPolicy.getAuthAlgorithm() != null) {
ipsecPolicyBuilder.setPfs(ipsecPolicy.getPerfectForwardSecrecy());
}
if (ipsecPolicy.getLifetime() != null) {
- final NeutronVPNLifetime vpnLifetime = ipsecPolicy.getLifetime();
+ final NeutronVpnLifetime vpnLifetime = ipsecPolicy.getLifetime();
final LifetimeBuilder lifetimeBuilder = new LifetimeBuilder();
lifetimeBuilder.setUnits(vpnLifetime.getUnits());
lifetimeBuilder.setValue(vpnLifetime.getValue());
import java.util.ArrayList;
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECSiteConnectionsCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNDeadPeerDetection;
-import org.opendaylight.neutron.spi.NeutronVPNIPSECSiteConnection;
+import org.opendaylight.neutron.spi.INeutronVpnIpSecSiteConnectionsCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnDeadPeerDetection;
+import org.opendaylight.neutron.spi.NeutronVpnIpSecSiteConnection;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecconnection.attributes.DpdBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecconnections.attributes.IpsecSiteConnections;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.ipsecconnections.attributes.ipsec.site.connections.Ipsecsiteconnection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class NeutronVPNIPSECSiteConnectionsInterface
+public final class NeutronVpnIpSecSiteConnectionsInterface
extends AbstractNeutronInterface<Ipsecsiteconnection, IpsecSiteConnections, IpsecsiteconnectionKey,
- NeutronVPNIPSECSiteConnection>
- implements INeutronVPNIPSECSiteConnectionsCRUD {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVPNIKEPolicyInterface.class);
+ NeutronVpnIpSecSiteConnection>
+ implements INeutronVpnIpSecSiteConnectionsCRUD {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIkePolicyInterface.class);
- NeutronVPNIPSECSiteConnectionsInterface(DataBroker db) {
+ NeutronVpnIpSecSiteConnectionsInterface(DataBroker db) {
super(IpsecsiteconnectionBuilder.class, db);
}
- // INeutronVPNIPSECSiteConnectionsCRUD methods
+ // INeutronVpnIpSecSiteConnectionsCRUD methods
@Override
protected List<Ipsecsiteconnection> getDataObjectList(IpsecSiteConnections connections) {
return connections.getIpsecsiteconnection();
}
- protected NeutronVPNIPSECSiteConnection fromMd(Ipsecsiteconnection ipsecSiteConnection) {
- final NeutronVPNIPSECSiteConnection answer = new NeutronVPNIPSECSiteConnection();
+ protected NeutronVpnIpSecSiteConnection fromMd(Ipsecsiteconnection ipsecSiteConnection) {
+ final NeutronVpnIpSecSiteConnection answer = new NeutronVpnIpSecSiteConnection();
fromMdAdminAttributes(ipsecSiteConnection, answer);
if (ipsecSiteConnection.getPeerAddress() != null) {
answer.setPeerAddress(ipsecSiteConnection.getPeerAddress());
answer.setVpnServiceID(ipsecSiteConnection.getVpnserviceId().getValue());
}
if (ipsecSiteConnection.getDpd() != null) {
- final NeutronVPNDeadPeerDetection deadPeerDetection = new NeutronVPNDeadPeerDetection();
+ final NeutronVpnDeadPeerDetection deadPeerDetection = new NeutronVpnDeadPeerDetection();
deadPeerDetection.setAction(ipsecSiteConnection.getDpd().getAction());
deadPeerDetection.setInterval(ipsecSiteConnection.getDpd().getInterval());
deadPeerDetection.setTimeout(ipsecSiteConnection.getDpd().getTimeout());
}
@Override
- protected Ipsecsiteconnection toMd(NeutronVPNIPSECSiteConnection ipsecSiteConnection) {
+ protected Ipsecsiteconnection toMd(NeutronVpnIpSecSiteConnection ipsecSiteConnection) {
final IpsecsiteconnectionBuilder ipsecSiteConnectionBuilder = new IpsecsiteconnectionBuilder();
toMdAdminAttributes(ipsecSiteConnection, ipsecSiteConnectionBuilder);
if (ipsecSiteConnection.getPeerAddress() != null) {
ipsecSiteConnectionBuilder.setVpnserviceId(toUuid(ipsecSiteConnection.getVpnServiceID()));
}
if (ipsecSiteConnection.getDeadPeerDetection() != null) {
- final NeutronVPNDeadPeerDetection deadPeerDetection = ipsecSiteConnection.getDeadPeerDetection();
+ final NeutronVpnDeadPeerDetection deadPeerDetection = ipsecSiteConnection.getDeadPeerDetection();
final DpdBuilder dpdBuilder = new DpdBuilder();
dpdBuilder.setAction(deadPeerDetection.getAction());
dpdBuilder.setInterval(deadPeerDetection.getInterval());
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.neutron.spi.INeutronVPNServiceCRUD;
-import org.opendaylight.neutron.spi.NeutronVPNService;
+import org.opendaylight.neutron.spi.INeutronVpnServiceCRUD;
+import org.opendaylight.neutron.spi.NeutronVpnService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.vpnservices.attributes.VpnServices;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.vpnservices.attributes.vpn.services.Vpnservice;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.vpnaas.rev150712.vpnservices.attributes.vpn.services.VpnserviceBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class NeutronVPNServiceInterface
- extends AbstractNeutronInterface<Vpnservice, VpnServices, VpnserviceKey, NeutronVPNService>
- implements INeutronVPNServiceCRUD {
- private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVPNServiceInterface.class);
+public final class NeutronVpnServiceInterface
+ extends AbstractNeutronInterface<Vpnservice, VpnServices, VpnserviceKey, NeutronVpnService>
+ implements INeutronVpnServiceCRUD {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnServiceInterface.class);
- NeutronVPNServiceInterface(DataBroker db) {
+ NeutronVpnServiceInterface(DataBroker db) {
super(VpnserviceBuilder.class, db);
}
return services.getVpnservice();
}
- protected NeutronVPNService fromMd(Vpnservice vpnService) {
- final NeutronVPNService answer = new NeutronVPNService();
+ protected NeutronVpnService fromMd(Vpnservice vpnService) {
+ final NeutronVpnService answer = new NeutronVpnService();
fromMdAdminAttributes(vpnService, answer);
if (vpnService.getSubnetId() != null) {
answer.setSubnetUUID(vpnService.getSubnetId().getValue());
}
@Override
- protected Vpnservice toMd(NeutronVPNService vpnService) {
+ protected Vpnservice toMd(NeutronVpnService vpnService) {
final VpnserviceBuilder vpnServiceBuilder = new VpnserviceBuilder();
toMdAdminAttributes(vpnService, vpnServiceBuilder);
if (vpnService.getSubnetUUID() != null) {