DMAAP-83 Initial code import
[dmaap/dbcapi.git] / src / main / java / org / onap / dmaap / dbcapi / model / DcaeLocation.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * org.onap.dmaap
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.dmaap.dbcapi.model;
22
23 import javax.xml.bind.annotation.XmlRootElement;
24
25 import org.apache.log4j.Logger;
26
27 @XmlRootElement
28 public class DcaeLocation extends DmaapObject {
29         static final Logger logger = Logger.getLogger(MR_Cluster.class);
30         private String clli;
31         private String dcaeLayer;
32         private String dcaeLocationName;
33         private String openStackAvailabilityZone;
34         private String subnet;
35
36         
37
38         public DcaeLocation() {
39
40         }
41
42         public DcaeLocation( String c,
43                                                 String dL,
44                                                 String dLN,
45                                                 String oSAZ,
46                                                 String s ) {
47                 
48                 this.clli = c;
49                 this.dcaeLayer = dL;
50                 this.dcaeLocationName = dLN;
51                 this.openStackAvailabilityZone = oSAZ;
52                 this.subnet = s;
53         }
54
55         public String getClli() {
56                 return clli;
57         }
58
59         public void setClli(String clli) {
60                 this.clli = clli;
61         }
62
63         public String getDcaeLayer() {
64                 return dcaeLayer;
65         }
66
67         public void setDcaeLayer(String dcaeLayer) {
68                 this.dcaeLayer = dcaeLayer;
69         }
70         public boolean isCentral() {
71                 return dcaeLayer != null && dcaeLayer.contains("central");
72         }
73         public boolean isLocal() {
74                 return dcaeLayer != null && dcaeLayer.contains("local");
75         }
76
77         public String getDcaeLocationName() {
78                 return dcaeLocationName;
79         }
80
81         public void setDcaeLocationName(String dcaeLocationName) {
82                 this.dcaeLocationName = dcaeLocationName;
83         }
84         
85
86
87         public String getOpenStackAvailabilityZone() {
88                 return openStackAvailabilityZone;
89         }
90
91         public void setOpenStackAvailabilityZone(String openStackAvailabilityZone) {
92                 this.openStackAvailabilityZone = openStackAvailabilityZone;
93         }
94         
95         public String getSubnet() {
96                 return subnet;
97         }
98
99         public void setSubnet(String subnet) {
100                 this.subnet = subnet;
101         }
102
103 }