X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2FNeutronFloatingIP.java;h=4d029dccf31c642a7fd8ca790570e8764bcbebb2;hp=906b4d4e76baef1afe79e47ca8ed37fbbd8beecb;hb=dde5cf25470fae922209771b4f0aa71ed872cabe;hpb=9108efddf9a5f3e2c81202a17ccdeca22cb5ca09 diff --git a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronFloatingIP.java b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronFloatingIP.java index 906b4d4e76..4d029dccf3 100644 --- a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronFloatingIP.java +++ b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronFloatingIP.java @@ -1,130 +1,136 @@ -/* - * Copyright IBM Corporation, 2013. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.networkconfig.neutron; - -import java.util.Iterator; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) - -public class NeutronFloatingIP { - // See OpenStack Network API v2.0 Reference for description of - // annotated attributes - - @XmlElement (name="id") - String floatingIPUUID; - - @XmlElement (name="floating_network_id") - String floatingNetworkUUID; - - @XmlElement (name="port_id") - String portUUID; - - @XmlElement (name="fixed_ip_address") - String fixedIPAddress; - - @XmlElement (name="floating_ip_address") - String floatingIPAddress; - - @XmlElement (name="tenant_id") - String tenantUUID; - - public NeutronFloatingIP() { - } - - public String getID() { return floatingIPUUID; } - - public String getFloatingIPUUID() { - return floatingIPUUID; - } - - public void setFloatingIPUUID(String floatingIPUUID) { - this.floatingIPUUID = floatingIPUUID; - } - - public String getFloatingNetworkUUID() { - return floatingNetworkUUID; - } - - public void setFloatingNetworkUUID(String floatingNetworkUUID) { - this.floatingNetworkUUID = floatingNetworkUUID; - } - - public String getPortUUID() { - return portUUID; - } - - public void setPortUUID(String portUUID) { - this.portUUID = portUUID; - } - - public String getFixedIPAddress() { - return fixedIPAddress; - } - - public void setFixedIPAddress(String fixedIPAddress) { - this.fixedIPAddress = fixedIPAddress; - } - - public String getFloatingIPAddress() { - return floatingIPAddress; - } - - public void setFloatingIPAddress(String floatingIPAddress) { - this.floatingIPAddress = floatingIPAddress; - } - - public String getTenantUUID() { - return tenantUUID; - } - - public void setTenantUUID(String tenantUUID) { - this.tenantUUID = tenantUUID; - } - - /** - * This method copies selected fields from the object and returns them - * as a new object, suitable for marshaling. - * - * @param fields - * List of attributes to be extracted - * @return an OpenStackFloatingIPs object with only the selected fields - * populated - */ - - public NeutronFloatingIP extractFields(List fields) { - NeutronFloatingIP ans = new NeutronFloatingIP(); - Iterator i = fields.iterator(); - while (i.hasNext()) { - String s = i.next(); - if (s.equals("id")) - ans.setFloatingIPUUID(this.getFloatingIPUUID()); - if (s.equals("floating_network_id")) - ans.setFloatingNetworkUUID(this.getFloatingNetworkUUID()); - 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("tenant_id")) - ans.setTenantUUID(this.getTenantUUID()); - } - return ans; - } - - public void initDefaults() { - } -} +/* + * Copyright IBM Corporation, 2013. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.networkconfig.neutron; + +import java.util.Iterator; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.NONE) + +public class NeutronFloatingIP { + // See OpenStack Network API v2.0 Reference for description of + // annotated attributes + + @XmlElement (name="id") + String floatingIPUUID; + + @XmlElement (name="floating_network_id") + String floatingNetworkUUID; + + @XmlElement (name="port_id") + String portUUID; + + @XmlElement (name="fixed_ip_address") + String fixedIPAddress; + + @XmlElement (name="floating_ip_address") + String floatingIPAddress; + + @XmlElement (name="tenant_id") + String tenantUUID; + + public NeutronFloatingIP() { + } + + public String getID() { return floatingIPUUID; } + + public String getFloatingIPUUID() { + return floatingIPUUID; + } + + public void setFloatingIPUUID(String floatingIPUUID) { + this.floatingIPUUID = floatingIPUUID; + } + + public String getFloatingNetworkUUID() { + return floatingNetworkUUID; + } + + public void setFloatingNetworkUUID(String floatingNetworkUUID) { + this.floatingNetworkUUID = floatingNetworkUUID; + } + + public String getPortUUID() { + return portUUID; + } + + public void setPortUUID(String portUUID) { + this.portUUID = portUUID; + } + + public String getFixedIPAddress() { + return fixedIPAddress; + } + + public void setFixedIPAddress(String fixedIPAddress) { + this.fixedIPAddress = fixedIPAddress; + } + + public String getFloatingIPAddress() { + return floatingIPAddress; + } + + public void setFloatingIPAddress(String floatingIPAddress) { + this.floatingIPAddress = floatingIPAddress; + } + + public String getTenantUUID() { + return tenantUUID; + } + + public void setTenantUUID(String tenantUUID) { + this.tenantUUID = tenantUUID; + } + + /** + * This method copies selected fields from the object and returns them + * as a new object, suitable for marshaling. + * + * @param fields + * List of attributes to be extracted + * @return an OpenStackFloatingIPs object with only the selected fields + * populated + */ + + public NeutronFloatingIP extractFields(List fields) { + NeutronFloatingIP ans = new NeutronFloatingIP(); + Iterator i = fields.iterator(); + while (i.hasNext()) { + String s = i.next(); + if (s.equals("id")) { + ans.setFloatingIPUUID(this.getFloatingIPUUID()); + } + if (s.equals("floating_network_id")) { + ans.setFloatingNetworkUUID(this.getFloatingNetworkUUID()); + } + 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("tenant_id")) { + ans.setTenantUUID(this.getTenantUUID()); + } + } + return ans; + } + + public void initDefaults() { + } +}