* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.common.scripts;
+package org.onap.so.bpmn.common.scripts
+
+import org.onap.so.logger.ErrorCode;
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
import org.w3c.dom.NodeList
import org.xml.sax.InputSource
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VfModuleBase.class);
+ private static final Logger logger = LoggerFactory.getLogger( VfModuleBase.class);
+
-
protected XmlParser xmlParser = new XmlParser()
-
+
/**
* Get the XmlParser.
- *
+ *
* @return the XmlParser.
*/
protected XmlParser getXmlParser() {
}
}
} catch (Exception e) {
- msoLogger.warn(MessageEnum.BPMN_GENERAL_WARNING, 'Exception transforming network params to vnfNetworks', "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, 'Exception is: \n' + e);
+ logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
+ 'Exception transforming network params to vnfNetworks', "BPMN",
+ ErrorCode.UnknownError.getValue(), 'Exception is: \n' + e);
}
return vnfNetworks
}
-
+
/**
* Transform the parameter specifications from the incoming '*-params' root element to
* a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
entries = entries + entry
}
} catch (Exception e) {
- msoLogger.warn(MessageEnum.BPMN_GENERAL_WARNING, 'Exception transforming params to entries', "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, 'Exception transforming params to entries', e);
+ logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
+ 'Exception transforming params to entries', "BPMN",
+ ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
}
return entries
}
}
}
} catch (Exception e) {
- msoLogger.warn(MessageEnum.BPMN_GENERAL_WARNING, 'Exception transforming params to entries', "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, 'Exception transforming params to entries', e);
+ logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
+ 'Exception transforming params to entries', "BPMN",
+ ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
}
return entries
}
<key>vf_module_name</key>
<value>${MsoUtils.xmlEscape(vfModuleName)}</value>
</entry>"""
-
- msoLogger.debug("vnfInfo: " + vnfInfo)
+
+ logger.debug("vnfInfo: " + vnfInfo)
InputSource source = new InputSource(new StringReader(data));
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
docFactory.setNamespaceAware(true)
DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
Document responseXml = docBuilder.parse(source)
-
-
+
+
// Availability Zones Data
String aZones = ""
StringBuilder sbAZone = new StringBuilder()
${interfaceRoutePrefixes}
${vnfParams}
${sdncResponseParams}"""
-
+
return vfModuleParams
-
+
}
-
-}
\ No newline at end of file
+
+}