From 1562a37d9b0e5a58cb162c9480f5292ce94f866f Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 9 May 2018 16:27:29 -0400 Subject: 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) --- .../onap/ccsdk/sli/northbound/uebclient/SdncVFCModel.java | 13 ++++++++----- 1 file 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 d7ed19ea..a3345c16 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); -- cgit 1.2.3-korg