aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-10-18 19:42:17 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-10-18 19:43:10 +0300
commitd55b10fd9b98f0b4b53c9cff8b1a6539ca573d6a (patch)
tree387010a50c87188c7e2dc78cf1f1d217541b6280
parent8c4c1dd56dedace1c59d32f5c51c285da05301bf (diff)
Sanity docker build
Sanity docker build & vLB + vCSCF_aligned VNF addition Change-Id: I518c4013d2da033d9bc4c98900d9c347b6056e2b Issue-ID: SDC-478 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
-rw-r--r--.gitignore2
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java3
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java8
-rw-r--r--sdc-os-chef/pom.xml16
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh2
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/base_vlb.zipbin5621 -> 0 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_aligned.csarbin0 -> 6511 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vLB.zipbin0 -> 6789 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb10
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb16
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb14
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnboardingDataProviders.java (renamed from test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnbordingDataProviders.java)2
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java4
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileHandling.java44
15 files changed, 57 insertions, 72 deletions
diff --git a/.gitignore b/.gitignore
index 639faecf3c..305018a168 100644
--- a/.gitignore
+++ b/.gitignore
@@ -170,3 +170,5 @@ sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites/*
/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools/*
/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/attributes/default.rb
+
+/catalog-be/.pydevproject
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java
index 394683bbc5..0e545f2afd 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java
@@ -22,13 +22,10 @@ package org.openecomp.sdc.asdctool.main;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileFilter;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
-import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Paths;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java
index 4fd4610ef9..5b8a10a03e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogic.java
@@ -83,7 +83,7 @@ public class AttributeBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> status = toscaOperationFacade.getToscaElement(resourceId);
if (status.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = status.left().value();
@@ -151,7 +151,7 @@ public class AttributeBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> status = toscaOperationFacade.getToscaElement(resourceId);
if (status.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = status.left().value();
@@ -195,7 +195,7 @@ public class AttributeBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> eitherResource = toscaOperationFacade.getToscaElement(resourceId);
if (eitherResource.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = eitherResource.left().value();
@@ -273,7 +273,7 @@ public class AttributeBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> eitherResource = toscaOperationFacade.getToscaElement(resourceId);
if (eitherResource.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = eitherResource.left().value();
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java
index 833e6c0b9e..e16b34f389 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/PropertyBusinessLogic.java
@@ -121,7 +121,7 @@ public class PropertyBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> status = toscaOperationFacade.getToscaElement(resourceId);
if (status.isRight()) {
- result = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ result = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
return result;
}
Resource resource = status.left().value();
@@ -219,7 +219,7 @@ public class PropertyBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> status = toscaOperationFacade.getToscaElement(resourceId);
if (status.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = status.left().value();
@@ -271,7 +271,7 @@ public class PropertyBusinessLogic extends BaseBusinessLogic {
// Get the resource from DB
Either<Resource, StorageOperationStatus> getResourceRes = toscaOperationFacade.getToscaElement(resourceId);
if (getResourceRes.isRight()) {
- result = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ result = Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
return result;
}
Resource resource = getResourceRes.left().value();
@@ -321,7 +321,7 @@ public class PropertyBusinessLogic extends BaseBusinessLogic {
Either<Resource, StorageOperationStatus> status = toscaOperationFacade.getToscaElement(resourceId);
if (status.isRight()) {
- return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, ""));
+ return Either.right(componentsUtils.getResponseFormat(ActionStatus.RESOURCE_NOT_FOUND, resourceId));
}
Resource resource = status.left().value();
diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml
index eb01a97916..5416939dac 100644
--- a/sdc-os-chef/pom.xml
+++ b/sdc-os-chef/pom.xml
@@ -78,7 +78,19 @@
<directory>${project.basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools</directory>
<followSymlinks>false</followSymlinks>
</fileset>
-
+ <!-- Sanity jar -->
+ <fileset>
+ <directory>${project.basedir}/sdc-sanity</directory>
+ <followSymlinks>false</followSymlinks>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileset>
+ <!-- Sanity test suites -->
+ <fileset>
+ <directory>${project.basedir}/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
</filesets>
</configuration>
</execution>
@@ -410,7 +422,7 @@
<tags>
<tag>${docker.tag}</tag>
<tag>${docker.latest.tag}</tag>
- <tag>1.1-STAGING-latest</tag>
+ <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
</tags>
</build>
</image>
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index 63f89d1f96..20cde17f57 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -212,5 +212,5 @@ echo "Triger sanity docker, please wait..."
if [ ${LOCAL} = false ]; then
docker pull ${PREFIX}/sdc-sanity:${RELEASE}
fi
- docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 512m --memory-swap=512m --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/sdc-sanity/target:/var/lib/tests/target --volume /data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume /data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
+ docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 1g --memory-swap=1g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/logs/sdc-sanity/target:/var/lib/tests/target --volume /data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume /data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
fi \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/base_vlb.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/base_vlb.zip
deleted file mode 100644
index 19c8a7d599..0000000000
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/base_vlb.zip
+++ /dev/null
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_aligned.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_aligned.csar
new file mode 100644
index 0000000000..ea977bea80
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_aligned.csar
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vLB.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vLB.zip
new file mode 100644
index 0000000000..b61ca1b83b
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vLB.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb
deleted file mode 100644
index 0d9282b28a..0000000000
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-jetty_base="/var/lib/jetty"
-
-
-cookbook_file "logback.xml" do
- path "#{jetty_base}/config/sdc-simulator/logback.xml"
- source "logback.xml"
- owner "jetty"
- group "jetty"
- mode "0755"
-end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb
deleted file mode 100644
index 3bb482d89a..0000000000
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-jetty_base="/var/lib/jetty"
-
-directory "Jetty_etcdir_creation" do
- path "/#{jetty_base}/etc"
- owner 'jetty'
- group 'jetty'
- mode '0755'
- action :create
-end
-
-cookbook_file "/#{jetty_base}/etc/keystore" do
- source "keystore"
- owner "jetty"
- group "jetty"
- mode 0755
-end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb
deleted file mode 100644
index 38b87fa65d..0000000000
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-jetty_base="/var/lib/jetty"
-jetty_home="/usr/local/jetty"
-
-###### create Jetty modules
-bash "create-jetty-modules" do
-cwd "#{jetty_base}"
-code <<-EOH
- cd "#{jetty_base}"
- java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
- java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
-EOH
-not_if "ls /#{jetty_base}/start.d/https.ini"
-end
-
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnbordingDataProviders.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnboardingDataProviders.java
index 8b58ca9993..cf94c79462 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnbordingDataProviders.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/dataProviders/OnboardingDataProviders.java
@@ -9,7 +9,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-public class OnbordingDataProviders {
+public class OnboardingDataProviders {
protected static String filepath = FileHandling.getVnfRepositoryPath();
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
index ec83b05be9..44e386ada6 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
@@ -32,7 +32,7 @@ import org.openecomp.sdc.be.model.Service;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
import org.openecomp.sdc.ci.tests.api.ExtentTestActions;
-import org.openecomp.sdc.ci.tests.dataProviders.OnbordingDataProviders;
+import org.openecomp.sdc.ci.tests.dataProviders.OnboardingDataProviders;
import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.VendorSoftwareProductObject;
@@ -78,7 +78,7 @@ public class Onboard extends ComponentBaseTest {
}
- @Test(dataProviderClass = OnbordingDataProviders.class, dataProvider = "VNF_List")
+ @Test(dataProviderClass = OnboardingDataProviders.class, dataProvider = "VNF_List")
public void onboardVNFShotFlow(String filepath, String vnfFile) throws Exception, Throwable {
setLog(vnfFile);
System.out.println("print - >" + makeDistributionValue);
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileHandling.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileHandling.java
index b82e6a0f52..c8f9ee4139 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileHandling.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileHandling.java
@@ -20,25 +20,37 @@
package org.openecomp.sdc.ci.tests.utils.general;
-import com.aventstack.extentreports.Status;
-import com.clearspring.analytics.util.Pair;
-import org.apache.commons.io.FileUtils;
-import org.openecomp.sdc.be.model.DataTypeDefinition;
-import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
-import org.openecomp.sdc.ci.tests.config.Config;
-
-import org.openecomp.sdc.common.util.GeneralUtility;
-import org.yaml.snakeyaml.Yaml;
+import static org.testng.AssertJUnit.assertTrue;
-import java.io.*;
+import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
import java.nio.file.Paths;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
-import static org.testng.AssertJUnit.assertTrue;
+import org.apache.commons.io.FileUtils;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
+import org.openecomp.sdc.ci.tests.config.Config;
+import org.openecomp.sdc.common.util.GeneralUtility;
+import org.yaml.snakeyaml.Yaml;
+
+import com.aventstack.extentreports.Status;
public class FileHandling {
@@ -173,9 +185,9 @@ public class FileHandling {
}
public static List<String> filterFileNamesListFromFolder(String filepath, String extension) {
+ List<String> filenames = new ArrayList<String>();
try {
File dir = new File(filepath);
- List<String> filenames = new ArrayList<String>();
FilenameFilter extensionFilter = new FilenameFilter() {
public boolean accept(File dir, String name) {
@@ -193,7 +205,7 @@ public class FileHandling {
} catch (Exception e) {
e.printStackTrace();
}
- return null;
+ return filenames;
}
public static String[] getArtifactsFromZip(String filepath, String zipFilename){
@@ -233,7 +245,9 @@ public class FileHandling {
// }
public static List<String> getZipFileNamesFromFolder(String filepath) {
- return filterFileNamesListFromFolder(filepath, ".zip");
+ List<String> fileNamesListFromFolder = filterFileNamesListFromFolder(filepath, ".zip");
+ fileNamesListFromFolder.addAll(filterFileNamesListFromFolder(filepath, ".csar"));
+ return fileNamesListFromFolder;
}
public static int countFilesInZipFile(String[] artifactsArr, String reqExtension){