2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.dmaap.dbcapi.model;
23 import javax.xml.bind.annotation.XmlRootElement;
25 import java.util.Objects;
28 public class DcaeLocation extends DmaapObject {
30 private String dcaeLayer;
31 private String dcaeLocationName;
32 private String openStackAvailabilityZone;
33 private String subnet;
37 public DcaeLocation() {
41 public DcaeLocation( String c,
49 this.dcaeLocationName = dLN;
50 this.openStackAvailabilityZone = oSAZ;
54 public String getClli() {
58 public void setClli(String clli) {
62 public String getDcaeLayer() {
66 public void setDcaeLayer(String dcaeLayer) {
67 this.dcaeLayer = dcaeLayer;
69 public boolean isCentral() {
70 return dcaeLayer != null && dcaeLayer.contains("central");
72 public boolean isLocal() {
73 return dcaeLayer != null && dcaeLayer.contains("local");
76 public String getDcaeLocationName() {
77 return dcaeLocationName;
80 public void setDcaeLocationName(String dcaeLocationName) {
81 this.dcaeLocationName = dcaeLocationName;
86 public String getOpenStackAvailabilityZone() {
87 return openStackAvailabilityZone;
90 public void setOpenStackAvailabilityZone(String openStackAvailabilityZone) {
91 this.openStackAvailabilityZone = openStackAvailabilityZone;
94 public String getSubnet() {
98 public void setSubnet(String subnet) {
103 public boolean equals(Object o) {
104 if (this == o) return true;
105 if (o == null || getClass() != o.getClass()) return false;
106 DcaeLocation that = (DcaeLocation) o;
107 return Objects.equals(clli, that.clli) &&
108 Objects.equals(dcaeLayer, that.dcaeLayer) &&
109 Objects.equals(dcaeLocationName, that.dcaeLocationName) &&
110 Objects.equals(openStackAvailabilityZone, that.openStackAvailabilityZone) &&
111 Objects.equals(subnet, that.subnet);
115 public int hashCode() {
117 return Objects.hash(clli, dcaeLayer, dcaeLocationName, openStackAvailabilityZone, subnet);