}
@Override
- protected void extractField(String field, T ans) {
- super.extractField(field, ans);
- if (field.equals("admin_state_up")) {
- ans.setAdminStateUp(this.getAdminStateUp());
- }
- if (field.equals("status")) {
- ans.setStatus(this.getStatus());
+ protected boolean extractField(String field, T ans) {
+ switch (field) {
+ case "admin_state_up":
+ ans.setAdminStateUp(this.getAdminStateUp());
+ return true;
+ case "status":
+ ans.setStatus(this.getStatus());
+ return true;
+ default:
+ return super.extractField(field, ans);
}
}
}
}
@Override
- protected void extractField(String field, T ans) {
- super.extractField(field, ans);
- if (field.equals("name")) {
- ans.setName(this.getName());
+ protected boolean extractField(String field, T ans) {
+ switch (field) {
+ case "name":
+ ans.setName(this.getName());
+ return true;
+ default:
+ return super.extractField(field, ans);
}
}
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement(name = "bgpvpn")
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronBgpvpn extends NeutronAdminAttributes<NeutronBgpvpn> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronBgpvpn.class);
// See OpenStack Network API v2.0 Reference for description of
// annotated attributes
public NeutronBgpvpn extractFields(List<String> fields) {
NeutronBgpvpn ans = new NeutronBgpvpn();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("type")) {
- ans.setType(this.getType());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("technique")) {
- ans.setTechnique(this.getTechnique());
- }
- if (s.equals("route_targets")) {
- ans.setRouteTargets(this.getRouteTargets());
- }
- if (s.equals("import_targets")) {
- ans.setImportTargets(this.getImportTargets());
- }
- if (s.equals("export_targets")) {
- ans.setExportTargets(this.getExportTargets());
- }
- if (s.equals("route_distinguishers")) {
- ans.setRouteDistinguishers(this.getRouteDistinguishers());
- }
- if (s.equals("routers")) {
- ans.setRouters(this.getRouters());
- }
- if (s.equals("networks")) {
- ans.setNetworks(this.getNetworks());
- }
- if (s.equals("vnid")) {
- ans.setVnid(this.getVnid());
- }
- if (s.equals("auto_aggregate")) {
- ans.setAutoAggregate(this.getAutoAggregate());
+ switch (s) {
+ case "type":
+ ans.setType(this.getType());
+ break;
+ case "technique":
+ ans.setTechnique(this.getTechnique());
+ break;
+ case "route_targets":
+ ans.setRouteTargets(this.getRouteTargets());
+ break;
+ case "import_targets":
+ ans.setImportTargets(this.getImportTargets());
+ break;
+ case "export_targets":
+ ans.setExportTargets(this.getExportTargets());
+ break;
+ case "route_distinguishe":
+ ans.setRouteDistinguishers(this.getRouteDistinguishers());
+ break;
+ case "routers":
+ ans.setRouters(this.getRouters());
+ break;
+ case "networks":
+ ans.setNetworks(this.getNetworks());
+ break;
+ case "vnid":
+ ans.setVnid(this.getVnid());
+ break;
+ case "auto_aggregate":
+ ans.setAutoAggregate(this.getAutoAggregate());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronBgpvpn suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Firewall as a service
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronFirewall extends NeutronBaseAttributes<NeutronFirewall> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFirewall.class);
private static final long serialVersionUID = 1L;
@XmlElement(defaultValue = "true", name = "admin_state_up")
public NeutronFirewall extractFields(List<String> fields) {
NeutronFirewall ans = new NeutronFirewall();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("admin_state_up")) {
- ans.setFirewallAdminStateIsUp(firewallAdminStateIsUp);
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("shared")) {
- ans.setFirewallIsShared(firewallIsShared);
- }
- if (s.equals("firewall_policy_id")) {
- ans.setFirewallPolicyID(this.getFirewallPolicyID());
+ switch (s) {
+ case "admin_state_up":
+ ans.setFirewallAdminStateIsUp(firewallAdminStateIsUp);
+ break;
+ case "shared":
+ ans.setFirewallIsShared(firewallIsShared);
+ break;
+ case "firewall_policy_id":
+ ans.setFirewallPolicyID(this.getFirewallPolicyID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronBgpvpn suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Firewall as a service
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronFirewallPolicy extends NeutronBaseAttributes<NeutronFirewallPolicy> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFirewallPolicy.class);
private static final long serialVersionUID = 1L;
@XmlElement(defaultValue = "false", name = "shared")
public NeutronFirewallPolicy extractFields(List<String> fields) {
NeutronFirewallPolicy ans = new NeutronFirewallPolicy();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("shared")) {
- ans.setFirewallPolicyIsShared(firewallPolicyIsShared);
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("audited")) {
- ans.setFirewallPolicyIsAudited(firewallPolicyIsAudited);
+ switch (s) {
+ case "shared":
+ ans.setFirewallPolicyIsShared(firewallPolicyIsShared);
+ break;
+ case "audited":
+ ans.setFirewallPolicyIsAudited(firewallPolicyIsAudited);
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronFirewallPolicy suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Firewall as a service
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronFirewallRule extends NeutronBaseAttributes<NeutronFirewallRule> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFirewallRule.class);
+
private static final long serialVersionUID = 1L;
@XmlElement(defaultValue = "false", name = "shared")
public NeutronFirewallRule extractFields(List<String> fields) {
NeutronFirewallRule ans = new NeutronFirewallRule();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("shared")) {
- ans.setFirewallRuleIsShared(firewallRuleIsShared);
- }
- if (s.equals("firewall_policy_id")) {
- ans.setFirewallRulePolicyID(this.getFirewallRulePolicyID());
- }
- if (s.equals("protocol")) {
- ans.setFirewallRuleProtocol(this.getFirewallRuleProtocol());
- }
- if (s.equals("source_ip_address")) {
- ans.setFirewallRuleSrcIpAddr(this.getFirewallRuleSrcIpAddr());
- }
- if (s.equals("destination_ip_address")) {
- ans.setFirewallRuleDstIpAddr(this.getFirewallRuleDstIpAddr());
- }
- if (s.equals("source_port_range_min")) {
- ans.setFirewallRuleSrcPortRangeMin(this.getFirewallRuleSrcPortRangeMin());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("source_port_range_max")) {
- ans.setFirewallRuleSrcPortRangeMax(this.getFirewallRuleSrcPortRangeMax());
+ switch (s) {
+ case "shared":
+ ans.setFirewallRuleIsShared(firewallRuleIsShared);
+ break;
+ case "firewall_policy_id":
+ ans.setFirewallRulePolicyID(this.getFirewallRulePolicyID());
+ break;
+ case "protocol":
+ ans.setFirewallRuleProtocol(this.getFirewallRuleProtocol());
+ break;
+ case "source_ip_address":
+ ans.setFirewallRuleSrcIpAddr(this.getFirewallRuleSrcIpAddr());
+ break;
+ case "destination_ip_address":
+ ans.setFirewallRuleDstIpAddr(this.getFirewallRuleDstIpAddr());
+ break;
+ case "source_port_range_min":
+ ans.setFirewallRuleSrcPortRangeMin(this.getFirewallRuleSrcPortRangeMin());
+ break;
+ case "source_port_range_max":
+ ans.setFirewallRuleSrcPortRangeMax(this.getFirewallRuleSrcPortRangeMax());
+ break;
+ case "destination_port_range_min":
+ ans.setFirewallRuleDstPortRangeMin(this.getFirewallRuleDstPortRangeMin());
+ break;
+ case "destination_port_range_max":
+ ans.setFirewallRuleDstPortRangeMax(this.getFirewallRuleDstPortRangeMax());
+ break;
+ case "position":
+ ans.setFirewallRulePosition(this.getFirewallRulePosition());
+ break;
+ case "action":
+ ans.setFirewallRuleAction(this.getFirewallRuleAction());
+ break;
+ case "enabled":
+ ans.setFirewallRuleIsEnabled(firewallRuleIsEnabled);
+ break;
+ default:
+ LOGGER.warn("Unknown firewall rule {}.", s);
+ break;
}
- if (s.equals("destination_port_range_min")) {
- ans.setFirewallRuleDstPortRangeMin(this.getFirewallRuleDstPortRangeMin());
- }
- if (s.equals("destination_port_range_max")) {
- ans.setFirewallRuleDstPortRangeMax(this.getFirewallRuleDstPortRangeMax());
- }
- if (s.equals("position")) {
- ans.setFirewallRulePosition(this.getFirewallRulePosition());
- }
- if (s.equals("action")) {
- ans.setFirewallRuleAction(this.getFirewallRuleAction());
- }
- if (s.equals("enabled")) {
- ans.setFirewallRuleIsEnabled(firewallRuleIsEnabled);
- }
-
}
return ans;
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronFloatingIp
extends NeutronObject<NeutronFloatingIp> implements Serializable, INeutronObject<NeutronFloatingIp> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronFloatingIp.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronFloatingIp extractFields(List<String> fields) {
NeutronFloatingIp ans = new NeutronFloatingIp();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("floating_network_id")) {
- ans.setFloatingNetworkUUID(this.getFloatingNetworkUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("port_id")) {
- ans.setPortUUID(this.getPortUUID());
- }
- if (s.equals("fixed_ip_address")) {
- ans.setFixedIpAddress(this.getFixedIpAddress());
- }
- if (s.equals("floating_ip_address")) {
- ans.setFloatingIpAddress(this.getFloatingIpAddress());
- }
- if (s.equals("router_id")) {
- ans.setRouterUUID(this.getRouterUUID());
- }
- if (s.equals("status")) {
- ans.setStatus(this.getStatus());
+ switch (s) {
+ case "floating_network_id":
+ ans.setFloatingNetworkUUID(this.getFloatingNetworkUUID());
+ break;
+ case "port_id":
+ ans.setPortUUID(this.getPortUUID());
+ break;
+ case "fixed_ip_address":
+ ans.setFixedIpAddress(this.getFixedIpAddress());
+ break;
+ case "floating_ip_address":
+ ans.setFloatingIpAddress(this.getFloatingIpAddress());
+ break;
+ case "router_id":
+ ans.setRouterUUID(this.getRouterUUID());
+ break;
+ case "status":
+ ans.setStatus(this.getStatus());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronFloatingIp suitable field.", s);
+ break;
}
}
return ans;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement(name = "l2gateway")
public final class NeutronL2gateway extends NeutronBaseAttributes<NeutronL2gateway>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronL2gateway.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "devices")
public NeutronL2gateway extractFields(List<String> fields) {
NeutronL2gateway ans = new NeutronL2gateway();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("devices")) {
- List<NeutronL2gatewayDevice> devices = new ArrayList<NeutronL2gatewayDevice>();
- devices.addAll(this.getNeutronL2gatewayDevices());
- ans.setNeutronL2gatewayDevices(devices);
+ if (extractField(s, ans)) {
+ continue;
+ }
+ switch (s) {
+ case "devices":
+ List<NeutronL2gatewayDevice> devices = new ArrayList<NeutronL2gatewayDevice>();
+ devices.addAll(this.getNeutronL2gatewayDevices());
+ ans.setNeutronL2gatewayDevices(devices);
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronL2gateway suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement(name = "l2gatewayConnection")
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronL2gatewayConnection extends NeutronObject<NeutronL2gatewayConnection>
implements Serializable, INeutronObject<NeutronL2gatewayConnection> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronL2gatewayConnection.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "gateway_id")
public NeutronL2gatewayConnection extractFields(List<String> fields) {
NeutronL2gatewayConnection ans = new NeutronL2gatewayConnection();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("connection_id")) {
- ans.setID(this.getID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("gateway_id")) {
- ans.setL2gatewayID(this.getL2gatewayID());
- }
- if (s.equals("network_id")) {
- ans.setNetworkID(this.getNetworkID());
- }
- if (s.equals("segmentation_id")) {
- ans.setSegmentID(this.getSegmentID());
- }
- if (s.equals("port_id")) {
- ans.setPortID(this.getPortID());
+ switch (s) {
+ case "connection_id":
+ ans.setID(this.getID());
+ break;
+ case "gateway_id":
+ ans.setL2gatewayID(this.getL2gatewayID());
+ break;
+ case "network_id":
+ ans.setNetworkID(this.getNetworkID());
+ break;
+ case "segmentation_id":
+ ans.setSegmentID(this.getSegmentID());
+ break;
+ case "port_id":
+ ans.setPortID(this.getPortID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronL2gatewayConnection suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Load Balancer as a service
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronLoadBalancer extends NeutronAdminAttributes<NeutronLoadBalancer> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancer.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "vip_address")
public NeutronLoadBalancer extractFields(List<String> fields) {
NeutronLoadBalancer ans = new NeutronLoadBalancer();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("vip_address")) {
- ans.setLoadBalancerVipAddress(this.getLoadBalancerVipAddress());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("vip_subnet_id")) {
- ans.setLoadBalancerVipSubnetID(this.getLoadBalancerVipSubnetID());
+ switch (s) {
+ case "vip_address":
+ ans.setLoadBalancerVipAddress(this.getLoadBalancerVipAddress());
+ break;
+ case "vip_subnet_id":
+ ans.setLoadBalancerVipSubnetID(this.getLoadBalancerVipSubnetID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronLoadBalancer suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Load Balancer as a service
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronLoadBalancerHealthMonitor extends NeutronObject<NeutronLoadBalancerHealthMonitor>
implements Serializable, INeutronObject<NeutronLoadBalancerHealthMonitor> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancerHealthMonitor.class);
+
private static final long serialVersionUID = 1L;
@XmlElement(name = "type")
public NeutronLoadBalancerHealthMonitor extractFields(List<String> fields) {
NeutronLoadBalancerHealthMonitor ans = new NeutronLoadBalancerHealthMonitor();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("type")) {
- ans.setLoadBalancerHealthMonitorType(this.getLoadBalancerHealthMonitorType());
- }
- if (s.equals("delay")) {
- ans.setLoadBalancerHealthMonitorDelay(this.getLoadBalancerHealthMonitorDelay());
- }
- if (s.equals("timeout")) {
- ans.setLoadBalancerHealthMonitorTimeout(this.getLoadBalancerHealthMonitorTimeout());
- }
- if (s.equals("max_retries")) {
- ans.setLoadBalancerHealthMonitorMaxRetries(this.getLoadBalancerHealthMonitorMaxRetries());
- }
- if (s.equals("http_method")) {
- ans.setLoadBalancerHealthMonitorHttpMethod(this.getLoadBalancerHealthMonitorHttpMethod());
- }
- if (s.equals("url_path")) {
- ans.setLoadBalancerHealthMonitorUrlPath(this.getLoadBalancerHealthMonitorUrlPath());
- }
- if (s.equals("expected_codes")) {
- ans.setLoadBalancerHealthMonitorExpectedCodes(this.getLoadBalancerHealthMonitorExpectedCodes());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("admin_state_up")) {
- ans.setLoadBalancerHealthMonitorAdminStateIsUp(loadBalancerHealthMonitorAdminStateIsUp);
+ switch (s) {
+ case "type":
+ ans.setLoadBalancerHealthMonitorType(this.getLoadBalancerHealthMonitorType());
+ break;
+ case "delay":
+ ans.setLoadBalancerHealthMonitorDelay(this.getLoadBalancerHealthMonitorDelay());
+ break;
+ case "timeout":
+ ans.setLoadBalancerHealthMonitorTimeout(this.getLoadBalancerHealthMonitorTimeout());
+ break;
+ case "max_retries":
+ ans.setLoadBalancerHealthMonitorMaxRetries(this.getLoadBalancerHealthMonitorMaxRetries());
+ break;
+ case "http_method":
+ ans.setLoadBalancerHealthMonitorHttpMethod(this.getLoadBalancerHealthMonitorHttpMethod());
+ break;
+ case "url_path":
+ ans.setLoadBalancerHealthMonitorUrlPath(this.getLoadBalancerHealthMonitorUrlPath());
+ break;
+ case "expected_codes":
+ ans.setLoadBalancerHealthMonitorExpectedCodes(this.getLoadBalancerHealthMonitorExpectedCodes());
+ break;
+ case "admin_state_up":
+ ans.setLoadBalancerHealthMonitorAdminStateIsUp(loadBalancerHealthMonitorAdminStateIsUp);
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronLoadBalancerHealthMonitor suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Load Balancer as a service
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronLoadBalancerListener extends NeutronBaseAttributes<NeutronLoadBalancerListener>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancerListener.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "default_pool_id")
public NeutronLoadBalancerListener extractFields(List<String> fields) {
NeutronLoadBalancerListener ans = new NeutronLoadBalancerListener();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("default_pool_id")) {
- ans.setNeutronLoadBalancerListenerDefaultPoolID(this.getNeutronLoadBalancerListenerDefaultPoolID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("protocol")) {
- ans.setNeutronLoadBalancerListenerProtocol(this.getNeutronLoadBalancerListenerProtocol());
- }
- if (s.equals("protocol_port")) {
- ans.setNeutronLoadBalancerListenerProtocolPort(this.getNeutronLoadBalancerListenerProtocolPort());
- }
- if (s.equals("admin_state_up")) {
- ans.setLoadBalancerListenerAdminStateIsUp(loadBalancerListenerAdminStateIsUp);
+ switch (s) {
+ case "default_pool_id":
+ ans.setNeutronLoadBalancerListenerDefaultPoolID(this.getNeutronLoadBalancerListenerDefaultPoolID());
+ break;
+ case "protocol":
+ ans.setNeutronLoadBalancerListenerProtocol(this.getNeutronLoadBalancerListenerProtocol());
+ break;
+ case "protocol_port":
+ ans.setNeutronLoadBalancerListenerProtocolPort(this.getNeutronLoadBalancerListenerProtocolPort());
+ break;
+ case "admin_state_up":
+ ans.setLoadBalancerListenerAdminStateIsUp(loadBalancerListenerAdminStateIsUp);
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronLoadBalancerListener suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Load Balancer as a service
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronLoadBalancerPool extends NeutronBaseAttributes<NeutronLoadBalancerPool>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancerPool.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "protocol")
public NeutronLoadBalancerPool extractFields(List<String> fields) {
NeutronLoadBalancerPool ans = new NeutronLoadBalancerPool();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("protocol")) {
- ans.setLoadBalancerPoolProtocol(this.getLoadBalancerPoolProtocol());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("lb_algorithm")) {
- ans.setLoadBalancerPoolLbAlgorithm(this.getLoadBalancerPoolLbAlgorithm());
- }
- if (s.equals("healthmonitor_id")) {
- ans.setLoadBalancerPoolHealthMonitorID(this.getLoadBalancerPoolHealthMonitorID());
- }
- if (s.equals("admin_state_up")) {
- ans.setLoadBalancerPoolAdminStateIsUp(loadBalancerPoolAdminStateIsUp);
- }
- if (s.equals("members")) {
- ans.setLoadBalancerPoolMembers(getLoadBalancerPoolMembers());
+ switch (s) {
+ case "protocol":
+ ans.setLoadBalancerPoolProtocol(this.getLoadBalancerPoolProtocol());
+ break;
+ case "lb_algorithm":
+ ans.setLoadBalancerPoolLbAlgorithm(this.getLoadBalancerPoolLbAlgorithm());
+ break;
+ case "healthmonitor_id":
+ ans.setLoadBalancerPoolHealthMonitorID(this.getLoadBalancerPoolHealthMonitorID());
+ break;
+ case "admin_state_up":
+ ans.setLoadBalancerPoolAdminStateIsUp(loadBalancerPoolAdminStateIsUp);
+ break;
+ case "members":
+ ans.setLoadBalancerPoolMembers(getLoadBalancerPoolMembers());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronLoadBalancerPool suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronLoadBalancerPoolMember extends NeutronObject<NeutronLoadBalancerPoolMember>
implements Serializable, INeutronObject<NeutronLoadBalancerPoolMember> {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancerPoolMember.class);
private static final long serialVersionUID = 1L;
/**
public NeutronLoadBalancerPoolMember extractFields(List<String> fields) {
NeutronLoadBalancerPoolMember ans = new NeutronLoadBalancerPoolMember();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("pool_id")) {
- ans.setPoolID(this.getPoolID());
- }
- if (s.equals("address")) {
- ans.setPoolMemberAddress(this.getPoolMemberAddress());
- }
- if (s.equals("protocol_port")) {
- ans.setPoolMemberProtoPort(this.getPoolMemberProtoPort());
- }
- if (s.equals("admin_state_up")) {
- ans.setPoolMemberAdminStateIsUp(poolMemberAdminStateIsUp);
- }
- if (s.equals("weight")) {
- ans.setPoolMemberWeight(this.getPoolMemberWeight());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("subnet_id")) {
- ans.setPoolMemberSubnetID(this.getPoolMemberSubnetID());
+ switch (s) {
+ case "pool_id":
+ ans.setPoolID(this.getPoolID());
+ break;
+ case "address":
+ ans.setPoolMemberAddress(this.getPoolMemberAddress());
+ break;
+ case "protocol_port":
+ ans.setPoolMemberProtoPort(this.getPoolMemberProtoPort());
+ break;
+ case "admin_state_up":
+ ans.setPoolMemberAdminStateIsUp(poolMemberAdminStateIsUp);
+ break;
+ case "weight":
+ ans.setPoolMemberWeight(this.getPoolMemberWeight());
+ break;
+ case "subnet_id":
+ ans.setPoolMemberSubnetID(this.getPoolMemberSubnetID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronLoadBalancerPoolMember suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronMeteringLabel extends NeutronBaseAttributes<NeutronMeteringLabel> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronLoadBalancerPoolMember.class);
private static final long serialVersionUID = 1L;
@XmlElement(defaultValue = "false", name = "shared")
public NeutronMeteringLabel extractFields(List<String> fields) {
NeutronMeteringLabel ans = new NeutronMeteringLabel();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("shared")) {
- ans.setMeteringLabelShared(this.getMeteringLabelShared());
+ if (extractField(s, ans)) {
+ continue;
+ }
+ switch (s) {
+ case "shared":
+ ans.setMeteringLabelShared(this.getMeteringLabelShared());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronMeteringLabel suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronMeteringLabelRule extends NeutronObject<NeutronMeteringLabelRule>
implements Serializable, INeutronObject<NeutronMeteringLabelRule> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronMeteringLabelRule.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "direction")
public NeutronMeteringLabelRule extractFields(List<String> fields) {
NeutronMeteringLabelRule ans = new NeutronMeteringLabelRule();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("direction")) {
- ans.setMeteringLabelRuleDirection(this.getMeteringLabelRuleDirection());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("excluded")) {
- ans.setMeteringLabelRuleExcluded(this.getMeteringLabelRuleExcluded());
- }
- if (s.equals("remote_ip_prefix")) {
- ans.setMeteringLabelRuleRemoteIpPrefix(this.getMeteringLabelRuleRemoteIpPrefix());
- }
- if (s.equals("metering_label_id")) {
- ans.setMeteringLabelRuleLabelID(this.getMeteringLabelRuleLabelID());
+ switch (s) {
+ case "direction":
+ ans.setMeteringLabelRuleDirection(this.getMeteringLabelRuleDirection());
+ break;
+ case "excluded":
+ ans.setMeteringLabelRuleExcluded(this.getMeteringLabelRuleExcluded());
+ break;
+ case "remote_ip_prefix":
+ ans.setMeteringLabelRuleRemoteIpPrefix(this.getMeteringLabelRuleRemoteIpPrefix());
+ break;
+ case "metering_label_id":
+ ans.setMeteringLabelRuleLabelID(this.getMeteringLabelRuleLabelID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronMeteringLabelRule suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement(name = "network")
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronNetwork extends NeutronAdminAttributes<NeutronNetwork> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronNetwork.class);
// See OpenStack Network API v2.0 Reference for description of
// annotated attributes
public NeutronNetwork extractFields(List<String> fields) {
NeutronNetwork ans = new NeutronNetwork();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("shared")) {
- ans.setShared(shared);
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("external")) {
- ans.setRouterExternal(this.getRouterExternal());
+ switch (s) {
+ case "shared":
+ ans.setShared(shared);
+ break;
+ case "external":
+ ans.setRouterExternal(this.getRouterExternal());
+ break;
+ case "segmentation_id":
+ ans.setProviderSegmentationID(this.getProviderSegmentationID());
+ break;
+ case "physical_network":
+ ans.setProviderPhysicalNetwork(this.getProviderPhysicalNetwork());
+ break;
+ case "network_type":
+ ans.setProviderNetworkType(this.getProviderNetworkType());
+ break;
+ case "qos_policy_id":
+ ans.setQosPolicyId(this.getQosPolicyId());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronNetwork suitable field.", s);
+ break;
}
- if (s.equals("segmentation_id")) {
- ans.setProviderSegmentationID(this.getProviderSegmentationID());
- }
- if (s.equals("physical_network")) {
- ans.setProviderPhysicalNetwork(this.getProviderPhysicalNetwork());
- }
- if (s.equals("network_type")) {
- ans.setProviderNetworkType(this.getProviderNetworkType());
- }
- if (s.equals("qos_policy_id")) {
- ans.setQosPolicyId(this.getQosPolicyId());
- }
-
}
return ans;
}
@Override
public abstract T extractFields(List<String> fields);
- protected void extractField(String field, T ans) {
- if (field.equals("id")) {
- ans.setID(this.getID());
- }
- if (field.equals("tenant_id")) {
- ans.setTenantID(this.getTenantID());
- }
- if (field.equals("project_id")) {
- ans.setProjectID(this.getProjectID());
- }
- if (field.equals("revision_number")) {
- ans.setRevisionNumber(this.getRevisionNumber());
+ protected boolean extractField(String field, T ans) {
+ switch (field) {
+ case "id":
+ ans.setID(this.getID());
+ return true;
+ case "tenant_id":
+ ans.setTenantID(this.getTenantID());
+ return true;
+ case "project_id":
+ ans.setProjectID(this.getProjectID());
+ return true;
+ case "revision_number":
+ ans.setRevisionNumber(this.getRevisionNumber());
+ return true;
+ default:
+ return false;
}
}
}
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronPort extends NeutronAdminAttributes<NeutronPort> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronPort.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronPort extractFields(List<String> fields) {
NeutronPort ans = new NeutronPort();
- for (String field : fields) {
- extractField(field, ans);
- if ("network_id".equals(field)) {
- ans.setNetworkUUID(this.getNetworkUUID());
+ for (String s : fields) {
+ if (extractField(s, ans)) {
+ continue;
}
- if ("mac_address".equals(field)) {
- ans.setMacAddress(this.getMacAddress());
- }
- if ("fixed_ips".equals(field)) {
- ans.setFixedIps(new ArrayList<NeutronIps>(this.getFixedIps()));
- }
- if ("device_id".equals(field)) {
- ans.setDeviceID(this.getDeviceID());
- }
- if ("device_owner".equals(field)) {
- ans.setDeviceOwner(this.getDeviceOwner());
- }
- if ("security_groups".equals(field)) {
- ans.setSecurityGroups(new ArrayList<NeutronSecurityGroup>(this.getSecurityGroups()));
- }
- if ("allowed_address_pairs".equals(field)) {
- ans.setAllowedAddressPairs(
- new ArrayList<NeutronPortAllowedAddressPairs>(this.getAllowedAddressPairs()));
- }
- if ("binding:host_id".equals(field)) {
- ans.setBindinghostID(this.getBindinghostID());
- }
- if ("binding:vnic_type".equals(field)) {
- ans.setBindingvnicType(this.getBindingvnicType());
- }
- if ("binding:vif_type".equals(field)) {
- ans.setBindingvifType(this.getBindingvifType());
- }
- if ("binding:vif_details".equals(field)) {
- ans.setVIFDetails(new HashMap<String, String>(this.getVIFDetails()));
- }
- if ("extra_dhcp_opts".equals(field)) {
- ans.setExtraDHCPOptions(new ArrayList<NeutronPortExtraDHCPOption>(this.getExtraDHCPOptions()));
- }
- if ("port_security_enabled".equals(field)) {
- ans.setPortSecurityEnabled(this.getPortSecurityEnabled());
- }
- if ("qos_policy_id".equals(field)) {
- ans.setQosPolicyId(this.getQosPolicyId());
+ switch (s) {
+ case "network_id":
+ ans.setNetworkUUID(this.getNetworkUUID());
+ break;
+ case "mac_address":
+ ans.setMacAddress(this.getMacAddress());
+ break;
+ case "fixed_ips":
+ ans.setFixedIps(new ArrayList<NeutronIps>(this.getFixedIps()));
+ break;
+ case "device_id":
+ ans.setDeviceID(this.getDeviceID());
+ break;
+ case "device_owner":
+ ans.setDeviceOwner(this.getDeviceOwner());
+ break;
+ case "security_groups":
+ ans.setSecurityGroups(new ArrayList<NeutronSecurityGroup>(this.getSecurityGroups()));
+ break;
+ case "allowed_address_pairs":
+ ans.setAllowedAddressPairs(
+ new ArrayList<NeutronPortAllowedAddressPairs>(this.getAllowedAddressPairs()));
+ break;
+ case "binding:host_id":
+ ans.setBindinghostID(this.getBindinghostID());
+ break;
+ case "binding:vnic_type":
+ ans.setBindingvnicType(this.getBindingvnicType());
+ break;
+ case "binding:vif_type":
+ ans.setBindingvifType(this.getBindingvifType());
+ break;
+ case "binding:vif_details":
+ ans.setVIFDetails(new HashMap<String, String>(this.getVIFDetails()));
+ break;
+ case "extra_dhcp_opts":
+ ans.setExtraDHCPOptions(new ArrayList<NeutronPortExtraDHCPOption>(this.getExtraDHCPOptions()));
+ break;
+ case "port_security_enabled":
+ ans.setPortSecurityEnabled(this.getPortSecurityEnabled());
+ break;
+ case "qos_policy_id":
+ ans.setQosPolicyId(this.getQosPolicyId());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronPort suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronQosBandwidthRule extends NeutronObject<NeutronQosBandwidthRule>
implements Serializable, INeutronObject<NeutronQosBandwidthRule> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronQosBandwidthRule.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "max_kbps")
public NeutronQosBandwidthRule extractFields(List<String> fields) {
NeutronQosBandwidthRule ans = new NeutronQosBandwidthRule();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("max_kbps")) {
- ans.setMaxKbps(this.getMaxKbps());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("max_burst_kbps")) {
- ans.setMaxBurstKbps(this.getMaxBurstKbps());
+ switch (s) {
+ case "max_kbps":
+ ans.setMaxKbps(this.getMaxKbps());
+ break;
+ case "max_burst_kbps":
+ ans.setMaxBurstKbps(this.getMaxBurstKbps());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronQosBandwidthRule suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronQosDscpMarkingRule extends NeutronObject<NeutronQosDscpMarkingRule>
implements Serializable, INeutronObject<NeutronQosDscpMarkingRule> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronQosDscpMarkingRule.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "dscp_mark")
public NeutronQosDscpMarkingRule extractFields(List<String> fields) {
NeutronQosDscpMarkingRule ans = new NeutronQosDscpMarkingRule();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("dscp_mark")) {
- ans.setDscpMark(this.getDscpMark());
+ if (extractField(s, ans)) {
+ continue;
+ }
+ switch (s) {
+ case "dscp_mark":
+ ans.setDscpMark(this.getDscpMark());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronQosDscpMarkingRule suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronQosPolicy extends NeutronBaseAttributes<NeutronQosPolicy> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronQosPolicy.class);
private static final long serialVersionUID = 1L;
@XmlElement(defaultValue = "false", name = "shared")
public NeutronQosPolicy extractFields(List<String> fields) {
NeutronQosPolicy ans = new NeutronQosPolicy();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("shared")) {
- ans.setPolicyIsShared(this.getPolicyIsShared());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("bandwidth_limit_rules")) {
- List<NeutronQosBandwidthRule> qosBwRuleList = new ArrayList<>();
- qosBwRuleList.addAll(this.getBwLimitRules());
- ans.setQosBwLimitRules(qosBwRuleList);
- }
- if (s.equals("dscp_marking_rules")) {
- List<NeutronQosDscpMarkingRule> qosDscpRuleList = new ArrayList<>();
- qosDscpRuleList.addAll(this.getDscpRules());
- ans.setDscpRules(qosDscpRuleList);
+ switch (s) {
+ case "shared":
+ ans.setPolicyIsShared(this.getPolicyIsShared());
+ break;
+ case "bandwidth_limit_rules":
+ List<NeutronQosBandwidthRule> qosBwRuleList = new ArrayList<>();
+ qosBwRuleList.addAll(this.getBwLimitRules());
+ ans.setQosBwLimitRules(qosBwRuleList);
+ break;
+ case "dscp_marking_rules":
+ List<NeutronQosDscpMarkingRule> qosDscpRuleList = new ArrayList<>();
+ qosDscpRuleList.addAll(this.getDscpRules());
+ ans.setDscpRules(qosDscpRuleList);
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronQosPolicy suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronRouter extends NeutronAdminAttributes<NeutronRouter>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronRouter.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronRouter extractFields(List<String> fields) {
NeutronRouter ans = new NeutronRouter();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("external_gateway_info")) {
- ans.setExternalGatewayInfo(this.getExternalGatewayInfo());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("distributed")) {
- ans.setDistributed(this.getDistributed());
- }
- if (s.equals("gw_port_id")) {
- ans.setGatewayPortId(this.getGatewayPortId());
- }
- if (s.equals("routes")) {
- ans.setRoutes(this.getRoutes());
+ switch (s) {
+ case "external_gateway_info":
+ ans.setExternalGatewayInfo(this.getExternalGatewayInfo());
+ break;
+ case "distributed":
+ ans.setDistributed(this.getDistributed());
+ break;
+ case "gw_port_id":
+ ans.setGatewayPortId(this.getGatewayPortId());
+ break;
+ case "routes":
+ ans.setRoutes(this.getRoutes());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronRouter suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronRouterInterface extends NeutronObject<NeutronRouterInterface>
implements Serializable, INeutronObject<NeutronRouterInterface> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronRouterInterface.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronRouterInterface extractFields(List<String> fields) {
NeutronRouterInterface ans = new NeutronRouterInterface();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("subnet_id")) {
- ans.setSubnetUUID(this.getSubnetUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("port_id")) {
- ans.setPortUUID(this.getPortUUID());
+ switch (s) {
+ case "subnet_id":
+ ans.setSubnetUUID(this.getSubnetUUID());
+ break;
+ case "port_id":
+ ans.setPortUUID(this.getPortUUID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronRouterInterface suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSFCFlowClassifier extends NeutronBaseAttributes<NeutronSFCFlowClassifier>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSFCFlowClassifier.class);
private static final long serialVersionUID = 1L;
// See OpenStack Networking SFC (networking-sfc) API v1.0 Reference for description of
public NeutronSFCFlowClassifier extractFields(List<String> fields) {
NeutronSFCFlowClassifier ans = new NeutronSFCFlowClassifier();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("ethertype")) {
- ans.setEthertype(this.getEthertype());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("source_port_range_min")) {
- ans.setSourcePortRangeMin(this.getSourcePortRangeMin());
- }
- if (s.equals("source_port_range_max")) {
- ans.setSourcePortRangeMax(this.getSourcePortRangeMax());
- }
- if (s.equals("destination_port_range_min")) {
- ans.setDestinationPortRangeMin(this.getDestinationPortRangeMin());
- }
- if (s.equals("destination_port_range_max")) {
- ans.setDestinationPortRangeMax(this.getDestinationPortRangeMax());
- }
- if (s.equals("source_ip_prefix")) {
- ans.setSourceIpPrefix(this.getSourceIpPrefix());
- }
- if (s.equals("destination_ip_prefix")) {
- ans.setDestinationIpPrefix(this.getDestinationIpPrefix());
- }
- if (s.equals("logical_source_port")) {
- ans.setLogicalDestinationPortUUID(this.getLogicalDestinationPortUUID());
- }
- if (s.equals("logical_destination_port")) {
- ans.setLogicalDestinationPortUUID(this.getLogicalDestinationPortUUID());
- }
- if (s.equals("l7_parameters")) {
- ans.setL7Parameters(new HashMap<String, String>(this.getL7Parameters()));
+ switch (s) {
+ case "ethertype":
+ ans.setEthertype(this.getEthertype());
+ break;
+ case "source_port_range_min":
+ ans.setSourcePortRangeMin(this.getSourcePortRangeMin());
+ break;
+ case "source_port_range_max":
+ ans.setSourcePortRangeMax(this.getSourcePortRangeMax());
+ break;
+ case "destination_port_range_min":
+ ans.setDestinationPortRangeMin(this.getDestinationPortRangeMin());
+ break;
+ case "destination_port_range_max":
+ ans.setDestinationPortRangeMax(this.getDestinationPortRangeMax());
+ break;
+ case "source_ip_prefix":
+ ans.setSourceIpPrefix(this.getSourceIpPrefix());
+ break;
+ case "destination_ip_prefix":
+ ans.setDestinationIpPrefix(this.getDestinationIpPrefix());
+ break;
+ case "logical_source_port":
+ ans.setLogicalDestinationPortUUID(this.getLogicalDestinationPortUUID());
+ break;
+ case "logical_destination_port":
+ ans.setLogicalDestinationPortUUID(this.getLogicalDestinationPortUUID());
+ break;
+ case "l7_parameters":
+ ans.setL7Parameters(new HashMap<String, String>(this.getL7Parameters()));
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronSFCFlowClassifier suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSFCPortChain extends NeutronBaseAttributes<NeutronSFCPortChain> implements Serializable {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSFCPortChain.class);
private static final long serialVersionUID = 1L;
// See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference
public NeutronSFCPortChain extractFields(List<String> fields) {
NeutronSFCPortChain ans = new NeutronSFCPortChain();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("port_pair_groups")) {
- ans.setPortPairGroupsUUID(this.getPortPairGroupsUUID());
- }
- if (s.equals("flow_classifiers")) {
- ans.setFlowClassifiersUUID(this.getFlowClassifiersUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("chain_parameters")) {
- ans.setChainParameters(this.getChainParameters());
+ switch (s) {
+ case "port_pair_groups":
+ ans.setPortPairGroupsUUID(this.getPortPairGroupsUUID());
+ break;
+ case "flow_classifiers":
+ ans.setFlowClassifiersUUID(this.getFlowClassifiersUUID());
+ break;
+ case "chain_parameters":
+ ans.setChainParameters(this.getChainParameters());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronSFCPortChain suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSFCPortPair extends NeutronBaseAttributes<NeutronSFCPortPair> implements Serializable {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSFCPortPair.class);
private static final long serialVersionUID = 1L;
// See OpenStack Networking SFC (networking-sfc) Port Pair API v1.0 Reference
public NeutronSFCPortPair extractFields(List<String> fields) {
NeutronSFCPortPair ans = new NeutronSFCPortPair();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("ingress")) {
- ans.setIngressPortUUID(this.getIngressPortUUID());
- }
- if (s.equals("egress")) {
- ans.setEgressPortUUID(this.getEgressPortUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("service_function_parameters")) {
- ans.setServiceFunctionParameters(new HashMap<String, String>(this.getServiceFunctionParameters()));
+ switch (s) {
+ case "ingress":
+ ans.setIngressPortUUID(this.getIngressPortUUID());
+ break;
+ case "egress":
+ ans.setEgressPortUUID(this.getEgressPortUUID());
+ break;
+ case "service_function_parameters":
+ ans.setServiceFunctionParameters(new HashMap<String, String>(this.getServiceFunctionParameters()));
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronSFCPortPair suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSFCPortPairGroup extends NeutronBaseAttributes<NeutronSFCPortPairGroup>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSFCPortPairGroup.class);
private static final long serialVersionUID = 1L;
// See OpenStack Networking SFC (networking-sfc) Port Pair Group API v1.0
public NeutronSFCPortPairGroup extractFields(List<String> fields) {
NeutronSFCPortPairGroup ans = new NeutronSFCPortPairGroup();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("port_pairs")) {
- ans.setPortPairs(this.getPortPairs());
+ if (extractField(s, ans)) {
+ continue;
+ }
+ switch (s) {
+ case "port_pairs":
+ ans.setPortPairs(this.getPortPairs());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronSFCPortPairGroup suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* OpenStack Neutron v2.0 Security Group bindings.
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSecurityGroup extends NeutronBaseAttributes<NeutronSecurityGroup> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSecurityGroup.class);
private static final long serialVersionUID = 1L;
public NeutronSecurityGroup() {
public NeutronSecurityGroup extractFields(List<String> fields) {
NeutronSecurityGroup ans = new NeutronSecurityGroup();
for (String s : fields) {
- extractField(s, ans);
+ if (extractField(s, ans)) {
+ continue;
+ }
+ LOGGER.warn("{} is not a NeutronSecurityGroup suitable field.", s);
}
return ans;
}
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* See OpenStack Network API v2.0 Reference for description of
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSecurityRule extends NeutronObject<NeutronSecurityRule>
implements Serializable, INeutronObject<NeutronSecurityRule> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronSecurityRule.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "direction")
public NeutronSecurityRule extractFields(List<String> fields) {
NeutronSecurityRule ans = new NeutronSecurityRule();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("direction")) {
- ans.setSecurityRuleDirection(this.getSecurityRuleDirection());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("protocol")) {
- ans.setSecurityRuleProtocol(this.getSecurityRuleProtocol());
- }
- if (s.equals("port_range_min")) {
- ans.setSecurityRulePortMin(this.getSecurityRulePortMin());
- }
- if (s.equals("port_range_max")) {
- ans.setSecurityRulePortMax(this.getSecurityRulePortMax());
- }
- if (s.equals("ethertype")) {
- ans.setSecurityRuleEthertype(this.getSecurityRuleEthertype());
- }
- if (s.equals("remote_ip_prefix")) {
- ans.setSecurityRuleRemoteIpPrefix(this.getSecurityRuleRemoteIpPrefix());
- }
- if (s.equals("remote_group_id")) {
- ans.setSecurityRemoteGroupID(this.getSecurityRemoteGroupID());
- }
- if (s.equals("security_group_id")) {
- ans.setSecurityRuleGroupID(this.getSecurityRuleGroupID());
+ switch (s) {
+ case "direction":
+ ans.setSecurityRuleDirection(this.getSecurityRuleDirection());
+ break;
+ case "protocol":
+ ans.setSecurityRuleProtocol(this.getSecurityRuleProtocol());
+ break;
+ case "port_range_min":
+ ans.setSecurityRulePortMin(this.getSecurityRulePortMin());
+ break;
+ case "port_range_max":
+ ans.setSecurityRulePortMax(this.getSecurityRulePortMax());
+ break;
+ case "ethertype":
+ ans.setSecurityRuleEthertype(this.getSecurityRuleEthertype());
+ break;
+ case "remote_ip_prefix":
+ ans.setSecurityRuleRemoteIpPrefix(this.getSecurityRuleRemoteIpPrefix());
+ break;
+ case "remote_group_id":
+ ans.setSecurityRemoteGroupID(this.getSecurityRemoteGroupID());
+ break;
+ case "security_group_id":
+ ans.setSecurityRuleGroupID(this.getSecurityRuleGroupID());
+ break;
+ default:
+ LOGGER.warn("{} is not a NeutronSecurityRule suitable field.", s);
+ break;
}
}
return ans;
public NeutronSubnet extractFields(List<String> fields) {
NeutronSubnet ans = new NeutronSubnet();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("network_id")) {
- ans.setNetworkUUID(this.getNetworkUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("ip_version")) {
- ans.setIpVersion(this.getIpVersion());
- }
- if (s.equals("cidr")) {
- ans.setCidr(this.getCidr());
- }
- if (s.equals("gateway_ip")) {
- ans.setGatewayIp(this.getGatewayIp());
- }
- if (s.equals("dns_nameservers")) {
- List<String> nsList = new ArrayList<String>();
- nsList.addAll(this.getDnsNameservers());
- ans.setDnsNameservers(nsList);
- }
- if (s.equals("allocation_pools")) {
- List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
- pools.addAll(this.getAllocationPools());
- ans.setAllocationPools(pools);
- }
- if (s.equals("host_routes")) {
- List<NeutronRoute> hostRoutes = new ArrayList<NeutronRoute>();
- hostRoutes.addAll(this.getHostRoutes());
- ans.setHostRoutes(hostRoutes);
- }
- if (s.equals("enable_dhcp")) {
- ans.setEnableDHCP(this.getEnableDHCP());
- }
- if (s.equals("ipv6_address_mode")) {
- ans.setIpV6AddressMode(this.getIpV6AddressMode());
- }
- if (s.equals("ipv6_ra_mode")) {
- ans.setIpV6RaMode(this.getIpV6RaMode());
+ switch (s) {
+ case "network_id":
+ ans.setNetworkUUID(this.getNetworkUUID());
+ break;
+ case "ip_version":
+ ans.setIpVersion(this.getIpVersion());
+ break;
+ case "cidr":
+ ans.setCidr(this.getCidr());
+ break;
+ case "gateway_ip":
+ ans.setGatewayIp(this.getGatewayIp());
+ break;
+ case "dns_nameservers":
+ List<String> nsList = new ArrayList<String>();
+ nsList.addAll(this.getDnsNameservers());
+ ans.setDnsNameservers(nsList);
+ break;
+ case "allocation_pools":
+ List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+ pools.addAll(this.getAllocationPools());
+ ans.setAllocationPools(pools);
+ break;
+ case "host_routes":
+ List<NeutronRoute> hostRoutes = new ArrayList<NeutronRoute>();
+ hostRoutes.addAll(this.getHostRoutes());
+ ans.setHostRoutes(hostRoutes);
+ break;
+ case "enable_dhcp":
+ ans.setEnableDHCP(this.getEnableDHCP());
+ break;
+ case "ipv6_address_mode":
+ ans.setIpV6AddressMode(this.getIpV6AddressMode());
+ break;
+ case "ipv6_ra_mode":
+ ans.setIpV6RaMode(this.getIpV6RaMode());
+ break;
+ default:
+ LOGGER.warn("{} is not an OpenStackSubnet suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement(name = "trunk")
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronTrunk extends NeutronAdminAttributes<NeutronTrunk> implements Serializable {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronTrunk.class);
private static final long serialVersionUID = 1L;
@XmlElement(name = "port_id")
public NeutronTrunk extractFields(List<String> fields) {
NeutronTrunk ans = new NeutronTrunk();
for (String s : fields) {
- extractField(s, ans);
- if ("port_id".equals(s)) {
- ans.setPortId(this.getPortId());
+ if (extractField(s, ans)) {
+ continue;
}
- if ("sub_ports".equals(s)) {
- List<NeutronTrunkSubPort> subPortList = new ArrayList<>();
- subPortList.addAll(this.getSubPorts());
- ans.setSubPorts(subPortList);
+ switch (s) {
+ case "port_id":
+ ans.setPortId(this.getPortId());
+ break;
+ case "sub_ports":
+ List<NeutronTrunkSubPort> subPortList = new ArrayList<>();
+ subPortList.addAll(this.getSubPorts());
+ ans.setSubPorts(subPortList);
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronTrunk suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronVpnIkePolicy extends NeutronBaseAttributes<NeutronVpnIkePolicy> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIkePolicy.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronVpnIkePolicy extractFields(List<String> fields) {
NeutronVpnIkePolicy ans = new NeutronVpnIkePolicy();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("auth_algorithm")) {
- ans.setAuthAlgorithm(this.getAuthAlgorithm());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("encryption_algorithm")) {
- ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
- }
- if (s.equals("phase1_negotiation_mode")) {
- ans.setPhase1NegotiationMode(this.getPhase1NegotiationMode());
- }
- if (s.equals("pfs")) {
- ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
- }
- if (s.equals("ike_version")) {
- ans.setIkeVersion(this.getIkeVersion());
+ switch (s) {
+ case "auth_algorithm":
+ ans.setAuthAlgorithm(this.getAuthAlgorithm());
+ break;
+ case "encryption_algorithm":
+ ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
+ break;
+ case "phase1_negotiation_mode":
+ ans.setPhase1NegotiationMode(this.getPhase1NegotiationMode());
+ break;
+ case "pfs":
+ ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
+ break;
+ case "ike_version":
+ ans.setIkeVersion(this.getIkeVersion());
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronVpnIkePolicy suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronVpnIpSecPolicy extends NeutronBaseAttributes<NeutronVpnIpSecPolicy> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIpSecPolicy.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronVpnIpSecPolicy extractFields(List<String> fields) {
NeutronVpnIpSecPolicy ans = new NeutronVpnIpSecPolicy();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("transform_protocol")) {
- ans.setTransformProtocol(this.getTransformProtocol());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("encapsulation_mode")) {
- ans.setEncapsulationMode(this.getEncapsulationMode());
- }
- if (s.equals("auth_algorithm")) {
- ans.setAuthAlgorithm(this.getAuthAlgorithm());
- }
- if (s.equals("encryption_algorithm")) {
- ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
- }
- if (s.equals("pfs")) {
- ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
+ switch (s) {
+ case "transform_protocol":
+ ans.setTransformProtocol(this.getTransformProtocol());
+ break;
+ case "encapsulation_mode":
+ ans.setEncapsulationMode(this.getEncapsulationMode());
+ break;
+ case "auth_algorithm":
+ ans.setAuthAlgorithm(this.getAuthAlgorithm());
+ break;
+ case "encryption_algorithm":
+ ans.setEncryptionAlgorithm(this.getEncryptionAlgorithm());
+ break;
+ case "pfs":
+ ans.setPerfectForwardSecrecy(this.getPerfectForwardSecrecy());
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronVpnIpSecPolicy suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronVpnIpSecSiteConnection extends NeutronAdminAttributes<NeutronVpnIpSecSiteConnection>
implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnIpSecSiteConnection.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronVpnIpSecSiteConnection extractFields(List<String> fields) {
NeutronVpnIpSecSiteConnection ans = new NeutronVpnIpSecSiteConnection();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("peer_address")) {
- ans.setPeerAddress(this.getPeerAddress());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("peer_id")) {
- ans.setPeerID(this.getPeerID());
- }
- if (s.equals("route_mode")) {
- ans.setRouteMode(this.getRouteMode());
- }
- if (s.equals("mtu")) {
- ans.setMtu(this.getMtu());
- }
- if (s.equals("auth_mode")) {
- ans.setAuthMode(this.getAuthMode());
- }
- if (s.equals("psk")) {
- ans.setPreSharedKey(this.getPreSharedKey());
- }
- if (s.equals("initiator")) {
- ans.setInitiator(this.getInitiator());
- }
- if (s.equals("ikepolicy_id")) {
- ans.setIkePolicyID(this.getIkePolicyID());
- }
- if (s.equals("ipsecpolicy_id")) {
- ans.setIpsecPolicyID(this.getIpsecPolicyID());
- }
- if (s.equals("vpnservice_id")) {
- ans.setVpnServiceID(this.getVpnServiceID());
+ switch (s) {
+ case "peer_address":
+ ans.setPeerAddress(this.getPeerAddress());
+ break;
+ case "peer_id":
+ ans.setPeerID(this.getPeerID());
+ break;
+ case "route_mode":
+ ans.setRouteMode(this.getRouteMode());
+ break;
+ case "mtu":
+ ans.setMtu(this.getMtu());
+ break;
+ case "auth_mode":
+ ans.setAuthMode(this.getAuthMode());
+ break;
+ case "psk":
+ ans.setPreSharedKey(this.getPreSharedKey());
+ break;
+ case "initiator":
+ ans.setInitiator(this.getInitiator());
+ break;
+ case "ikepolicy_id":
+ ans.setIkePolicyID(this.getIkePolicyID());
+ break;
+ case "ipsecpolicy_id":
+ ans.setIpsecPolicyID(this.getIpsecPolicyID());
+ break;
+ case "vpnservice_id":
+ ans.setVpnServiceID(this.getVpnServiceID());
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronVpnIpSecSiteConnection suitable field.", s);
+ break;
}
}
return ans;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronVpnService extends NeutronAdminAttributes<NeutronVpnService> implements Serializable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NeutronVpnService.class);
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
public NeutronVpnService extractFields(List<String> fields) {
NeutronVpnService ans = new NeutronVpnService();
for (String s : fields) {
- extractField(s, ans);
- if (s.equals("router_id")) {
- ans.setRouterUUID(this.getRouterUUID());
+ if (extractField(s, ans)) {
+ continue;
}
- if (s.equals("subnet_id")) {
- ans.setSubnetUUID(this.getSubnetUUID());
+ switch (s) {
+ case "router_id":
+ ans.setRouterUUID(this.getRouterUUID());
+ break;
+ case "subnet_id":
+ ans.setSubnetUUID(this.getSubnetUUID());
+ break;
+ default:
+ LOGGER.warn("{} is not an NeutronVpnService suitable field.", s);
+ break;
}
}
return ans;