2 * Copyright (C) 2014 Red Hat, Inc. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.neutron.spi;
11 import java.io.Serializable;
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
18 * OpenStack Neutron v2.0 Load Balancer as a service
19 * (LBaaS) bindings. See OpenStack Network API
20 * v2.0 Reference for description of the fields:
21 * Implemented fields are as follows:
28 * vip_address IP address
30 * http://docs.openstack.org/api/openstack-network/2.0/openstack-network.pdf
34 @XmlAccessorType(XmlAccessType.NONE)
35 public final class NeutronLoadBalancer extends NeutronAdminAttributes<NeutronLoadBalancer> implements Serializable {
36 private static final long serialVersionUID = 1L;
38 @XmlElement(name = "vip_address")
39 String loadBalancerVipAddress;
41 @XmlElement(name = "vip_subnet_id")
42 String loadBalancerVipSubnetID;
44 public String getLoadBalancerVipAddress() {
45 return loadBalancerVipAddress;
48 public void setLoadBalancerVipAddress(String loadBalancerVipAddress) {
49 this.loadBalancerVipAddress = loadBalancerVipAddress;
52 public String getLoadBalancerVipSubnetID() {
53 return loadBalancerVipSubnetID;
56 public void setLoadBalancerVipSubnetID(String loadBalancerVipSubnetID) {
57 this.loadBalancerVipSubnetID = loadBalancerVipSubnetID;
61 protected boolean extractField(String field, NeutronLoadBalancer ans) {
64 ans.setLoadBalancerVipAddress(this.getLoadBalancerVipAddress());
67 ans.setLoadBalancerVipSubnetID(this.getLoadBalancerVipSubnetID());
70 return super.extractField(field, ans);
76 public String toString() {
77 return "NeutronLoadBalancer{" + "loadBalancerID='" + uuid + '\'' + ", loadBalancerTenantID='" + tenantID + '\''
78 + ", loadBalancerName='" + name + '\'' + ", loadBalancerStatus='" + status
79 + '\'' + ", loadBalancerAdminStateUp='" + adminStateUp + '\'' + ", loadBalancerVipAddress='"
80 + loadBalancerVipAddress + '\'' + ", loadBalancerVipSubnetID='" + loadBalancerVipSubnetID + '\'' + '}';