-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2018 European Support Limited
+ *
* 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
* 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.sdc.vendorsoftwareproduct.services.impl.composition;
import org.apache.commons.io.FileUtils;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
public class CompositionDataExtractorImplTest {
- private static final Logger log = (Logger) LoggerFactory.getLogger
- (CompositionDataExtractorImplTest.class.getName());
-
@InjectMocks
private static CompositionDataExtractorImpl compositionDataExtractor;
toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
serviceTemplates.put(ToscaUtil.getServiceTemplateFileName(serviceTemplateFromYaml),
serviceTemplateFromYaml);
- try {
- yamlFile.close();
- } catch (IOException ignore) {
- log.debug("", ignore);
- }
- } catch (FileNotFoundException exception) {
- throw exception;
- } catch (IOException exception) {
- throw exception;
}
}
}
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2018 European Support Limited
+ *
* 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.core.nosqldb.impl.cassandra;
private final String keySpace;
private final MappingManager mappingManager;
- private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
+ private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
public CassandraNoSqlDbImpl(Session session) {
.append(") values (")
.append(CommonMethods.duplicateStringWithDelimiter("?", ',', values.length))
.append(")");
- System.out.println(sb.toString());
+ log.info(sb.toString());
PreparedStatement prepared = session.prepare(sb.toString());
BoundStatement bound;
.collect(Collectors.toSet());
return versions.stream().collect(Collectors.joining(","));
} catch (Exception e){
- log.debug("",e);
+ log.error("Failed to retrieve version", e);
return "Failed to retrieve version";
}
}
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2018 European Support Limited
+ *
* 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.sdc.enrichment.impl.tosca;
import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
protected String outputFilesPath;
- private final static Logger log = (Logger) LoggerFactory.getLogger
- (BaseToscaEnrichmentTest.class.getName());
-
public static ToscaServiceModel loadToscaServiceModel(String serviceTemplatesPath,
String globalServiceTemplatesPath,
String entryDefinitionServiceTemplate)
ServiceTemplate serviceTemplateFromYaml =
toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
serviceTemplates.put(ToscaUtil.getServiceTemplateFileName(serviceTemplateFromYaml), serviceTemplateFromYaml);
- try {
- yamlFile.close();
- } catch (IOException ignore) {
- log.debug("",ignore);
- }
- } catch (FileNotFoundException exception) {
- throw exception;
- } catch (IOException exception) {
- throw exception;
}
}
}
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
- */
+*/
package org.openecomp.sdc.validation.impl.validators;
try {
manifestContent = ValidationUtil.validateManifest(globalContext);
} catch (Exception exception) {
- LOGGER.debug("",exception);
+ LOGGER.error("Failed to validate manifest file", exception);
return;
}
Map<String, FileData.Type> fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent);
heatOrchestrationTemplate =
new YamlUtil().yamlToObject(fileContent, HeatOrchestrationTemplate.class);
} catch (Exception ignored) {
- LOGGER.debug("",ignored);
+ LOGGER.error("Invalid file content : " + fileContent, ignored);
// the HeatValidator should handle file that is failing to parse
return Optional.empty();
}