diff options
Diffstat (limited to 'bpmn/MSOCoreBPMN')
3 files changed, 68 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/CloudFlavor.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/CloudFlavor.java new file mode 100644 index 0000000000..100d70e1b2 --- /dev/null +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/CloudFlavor.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Intel Corp. Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.core.domain; + +import java.io.Serializable; + +/** + * Stores Cloud Flavor information and is an attribute + * of a <class>HomingSolution</class> + * + */ +public class CloudFlavor extends JsonWrapper implements Serializable { + private String flavorLabel; + private String flavor; + + public CloudFlavor (String flavorLabel, String flavor){ + this.flavorLabel = flavorLabel; + this.flavor = flavor; + } + + public String getFlavorLabel() { + return flavorLabel; + } + + public void setFlavorLabel(String flavorLabel) { + this.flavorLabel = flavorLabel; + } + + public String getFlavor() { + return flavor; + } + + public void setFlavor(String flavor) { + this.flavor = flavor; + } + +} diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/HomingSolution.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/HomingSolution.java index 611c8dfff9..f0193bc1c3 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/HomingSolution.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/HomingSolution.java @@ -45,6 +45,7 @@ public class HomingSolution extends JsonWrapper implements Serializable { private String aicVersion; private String tenant; private VnfResource vnf; + private List<CloudFlavor> flavors; private License license = new License(); @@ -126,6 +127,17 @@ public class HomingSolution extends JsonWrapper implements Serializable { this.vnf = vnf; } + /** + * @return a map<string, string> key is label name, value is any flavor + */ + public List<CloudFlavor> getFlavors() { + return flavors; + } + + public void setFlavors(List<CloudFlavor> flavors) { + this.flavors = flavors; + } + public License getLicense() { return license; } diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java index 79b9239015..1869b930f0 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java @@ -931,7 +931,7 @@ public class JsonUtils { for (int i = 0; i < arr.length(); i++){
JSONObject jo = arr.getJSONObject(i);
String key = jo.getString(keyNode);
- String value =jo.getString(valueNode);
+ String value = jo.getString(valueNode);
map.put(key, value);
}
msoLogger.debug("Outgoing Map is: " + map);
|