2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
24 package org.onap.clamp.clds.model.properties;
26 import com.att.eelf.configuration.EELFLogger;
27 import com.att.eelf.configuration.EELFManager;
28 import com.fasterxml.jackson.databind.JsonNode;
30 import java.util.List;
33 * Parse global json properties.
36 * "global":[{"name":"service","value":["vUSP"]},{"name":"vnf","value":["vCTS",
37 * "v3CDB"]},{"name":"location","value":["san_diego","san_antonio","kansas_city"
38 * ,"kings_mountain","Secaucus","lisle","concord","houston","akron"]}]
42 protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Global.class);
43 protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
44 private String service;
45 private String actionSet;
46 private List<String> resourceVf;
47 private List<String> resourceVfc;
48 private JsonNode deployParameters;
49 private List<String> location;
52 * Parse global given json node.
56 public Global(JsonNode modelJson) {
57 JsonNode globalNode = modelJson.get("global");
58 service = AbstractModelElement.getValueByName(globalNode, "service");
59 actionSet = AbstractModelElement.getValueByName(globalNode, "actionSet");
60 resourceVf = AbstractModelElement.getValuesByName(globalNode, "vf");
61 resourceVfc = AbstractModelElement.getValuesByName(globalNode, "vfc");
62 deployParameters = AbstractModelElement.getJsonNodeByName(globalNode, "deployParameters");
63 location = AbstractModelElement.getValuesByName(globalNode, "location");
69 public String getService() {
77 public void setService(String service) {
78 this.service = service;
82 * @return the actionSet
84 public String getActionSet() {
88 public void setActionSet(String actionSet) {
89 this.actionSet = actionSet;
93 * @return the resourceVf
95 public List<String> getResourceVf() {
101 * the resourceVf to set
103 public void setResourceVf(List<String> resourceVf) {
104 this.resourceVf = resourceVf;
108 * @return the resourceVfc
110 public List<String> getResourceVfc() {
116 * the resourceVfc to set
118 public void setResourceVfc(List<String> resourceVfc) {
119 this.resourceVfc = resourceVfc;
123 * @return the location
125 public List<String> getLocation() {
131 * the location to set
133 public void setLocation(List<String> location) {
134 this.location = location;
137 public JsonNode getDeployParameters() {
138 return deployParameters;
141 public void setDeployParameters(JsonNode deployParameters) {
142 this.deployParameters = deployParameters;