-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
package org.onap.optf.cmso.optimizer.filters;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
+
import java.io.IOException;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
}
/** The Constant supportedMajorVersions. */
- public static final Map<String, String> supportedMajorVersions = new HashMap<String, String>();
+ private static final Map<String, String> supportedMajorVersions = new HashMap<String, String>();
static {
supportedMajorVersions.put("v1", "0");
}
/** The Constant supportedMajorMinorVersions. */
- public static final Set<String> supportedMajorMinorVersions = new HashSet<String>();
+ private static final Set<String> supportedMajorMinorVersions = new HashSet<String>();
static {
supportedMajorMinorVersions.add("v1.0");
}
/** The Constant latestVersion. */
- public static final String latestVersion = "2.0.0";
+ private static final String latestVersion = "2.0.0";
/** The Constant patchVersion. */
- public static final String patchVersion = "0";
+ private static final String patchVersion = "0";
/**
* From string.
package org.onap.optf.cmso.optimizer.service.rs;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
@Api("Optimizer Interface")
@Path("/{apiVersion}")
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
* Copyright 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
-/*******************************************************************************\r
+/*\r
* ============LICENSE_START=======================================================================================\r
* Copyright (c) 2019 AT&T Intellectual Property.\r
* ===================================================================\r
-/*******************************************************************************\r
+/*\r
* ============LICENSE_START=======================================================================================\r
* Copyright (c) 2019 AT&T Intellectual Property.\r
* ===================================================================\r
-/*******************************************************************************\r
+/*\r
* ============LICENSE_START=======================================================================================\r
* Copyright (c) 2019 AT&T Intellectual Property.\r
* ===================================================================\r
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
-/*******************************************************************************\r
+/*\r
* ============LICENSE_START=======================================================================================\r
* Copyright (c) 2019 AT&T Intellectual Property.\r
* ===================================================================\r
/**
* Health check.
*
- * @return
+ * @return - health check component status
*/
public HealthCheckComponent healthCheck() {
Map<String, String> mdcSave = Mdc.save();
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/**
+/*
* *****************************************************************************
*
* <p>
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
<version>1.0.1-SNAPSHOT</version>\r
</parent>\r
\r
- <groupId>org.onap.optf.cmso</groupId>\r
+ <groupId>org.onap.optf.cmso.sonar</groupId>\r
<artifactId>cmso-sonar</artifactId>\r
\r
<name>cmso-sonar</name>\r
<groupId>org.apache.maven.plugins</groupId>\r
<artifactId>maven-failsafe-plugin</artifactId>\r
<configuration>\r
+ <testSourceDirectory>${project.basedir}/src/it/java</testSourceDirectory>\r
<skipITs>${skipIntegrationTests}</skipITs>\r
</configuration>\r
</plugin>\r
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.Properties;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
-public class IT_FullIntegrationTest {
+public class ItFullIntegrationTest {
private Properties env = new Properties();
@Test
public void runTest() throws IOException {
- InputStream is = new FileInputStream(new File("src/test/resources/integration.properties"));
+ InputStream is = new FileInputStream(new File("src/it/resources/integration.properties"));
env.load(is);
Process process = null;
try {
try {
Files.walk(src).forEach(s -> {
try {
- Path d = dest.resolve(src.relativize(s));
+ Path dpath = dest.resolve(src.relativize(s));
if (Files.isDirectory(s)) {
- if (!Files.exists(d))
- Files.createDirectory(d);
+ if (!Files.exists(dpath)) {
+ Files.createDirectory(dpath);
+ }
return;
}
- Files.copy(s, d);
+ Files.copy(s, dpath);
} catch (Exception e) {
e.printStackTrace();
}
}
private ProcessBuilder buildCommand() {
- ProcessBuilder processBuilder = new ProcessBuilder();
List<String> command = new ArrayList<>();
String basepath = env.getProperty("base.path", "./");
- File workdir = new File(env.getProperty("workdir", "./docker/integration"));
command.add("/bin/bash");
command.add("-x");
command.add(basepath + "ete_test.sh");
- Map<String, String> environment = processBuilder.environment();
+ File workdir = new File(env.getProperty("workdir", "./docker/integration"));
+ ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.directory(workdir);
processBuilder.command(command);
return processBuilder;
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.optf.cmso
* ================================================================================
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
* Copyright © 2019 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
-/*******************************************************************************
+/*
*
* Copyright © 2019 AT&T Intellectual Property.
*
<parent>\r
<groupId>org.onap.oparent</groupId>\r
<artifactId>oparent</artifactId>\r
- <version>1.2.1</version>\r
+ <version>1.2.3</version>\r
</parent>\r
\r
<groupId>org.onap.optf.cmso</groupId>\r