diff options
author | 2018-05-09 16:27:29 -0400 | |
---|---|---|
committer | 2018-05-09 16:27:29 -0400 | |
commit | 1562a37d9b0e5a58cb162c9480f5292ce94f866f (patch) | |
tree | 3251b82b5b5b0785802389d35b637db5567c1ae0 /ueb-listener | |
parent | c0299b921494a59940ab8575a00f1fc11503f1e6 (diff) |
Add mapping for vm_type_tag
If vm_type is not found in CSAR, use vm_type_tag value instead.
Change-Id: Ifd73029446d465aad2d9d995559be837f29b97a4
Issue-ID: SDNC-305
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'ueb-listener')
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java index d7ed19ea6..a3345c168 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java @@ -8,9 +8,9 @@ * 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. @@ -28,19 +28,22 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SdncVFCModel extends SdncBaseModel { - + private static final Logger LOG = LoggerFactory .getLogger(SdncVFCModel.class); - + private String vmType = null; private String vmCount = null; public SdncVFCModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) { super(sdcCsarHelper, nodeTemplate); - + // extract properties vmType = extractValue (nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPE); + if ((vmType == null) || (vmType.length() == 0)) { + vmType = extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMTYPETAG); + } //vmCount = extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VMCOUNT); - need path to vm_count vmCount = "1"; addParameter("vm_type", vmType); |