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 javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
17 * OpenStack Neutron v2.0 Load Balancer as a service
18 * (LBaaS) bindings. See OpenStack Network API
19 * v2.0 Reference for description of the fields:
20 * Implemented fields are as follows:
27 * vip_address IP address
29 * http://docs.openstack.org/api/openstack-network/2.0/openstack-network.pdf
33 @XmlAccessorType(XmlAccessType.NONE)
34 public final class NeutronLoadBalancer extends NeutronAdminAttributes<NeutronLoadBalancer> {
35 private static final long serialVersionUID = 1L;
37 @XmlElement(name = "vip_address")
38 String loadBalancerVipAddress;
40 @XmlElement(name = "vip_subnet_id")
41 String loadBalancerVipSubnetID;
43 public String getLoadBalancerVipAddress() {
44 return loadBalancerVipAddress;
47 public void setLoadBalancerVipAddress(String loadBalancerVipAddress) {
48 this.loadBalancerVipAddress = loadBalancerVipAddress;
51 public String getLoadBalancerVipSubnetID() {
52 return loadBalancerVipSubnetID;
55 public void setLoadBalancerVipSubnetID(String loadBalancerVipSubnetID) {
56 this.loadBalancerVipSubnetID = loadBalancerVipSubnetID;
60 protected boolean extractField(String field, NeutronLoadBalancer ans) {
63 ans.setLoadBalancerVipAddress(this.getLoadBalancerVipAddress());
66 ans.setLoadBalancerVipSubnetID(this.getLoadBalancerVipSubnetID());
69 return super.extractField(field, ans);
75 public String toString() {
76 return "NeutronLoadBalancer{" + "loadBalancerID='" + uuid + '\'' + ", loadBalancerTenantID='" + tenantID + '\''
77 + ", loadBalancerName='" + name + '\'' + ", loadBalancerStatus='" + status
78 + '\'' + ", loadBalancerAdminStateUp='" + adminStateUp + '\'' + ", loadBalancerVipAddress='"
79 + loadBalancerVipAddress + '\'' + ", loadBalancerVipSubnetID='" + loadBalancerVipSubnetID + '\'' + '}';