aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorburdziak <olaf.burdziakowski@nokia.com>2019-09-19 10:45:11 +0200
committerburdziak <olaf.burdziakowski@nokia.com>2019-09-19 15:16:34 +0200
commita1a04e46cfb32bab73d797ce0aa50dbbe0fce027 (patch)
treedae33c26b8b6de6f2065dc7454184bed75171fdd
parent2ff048ebcc30ce2b2f4f74418af4f47fd686a141 (diff)
Personalized client certificate authentication via FTPes in 5G Bulk PM usecase doesn't work
Change-Id: Idcf5aed5517d2a64c8f58c37a1f96e4261251e42 Issue-ID: DCAEGEN2-1754 Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
-rw-r--r--datafile-app-server/pom.xml3
-rw-r--r--datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java6
-rw-r--r--datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/model/FileDataTest.java27
-rw-r--r--pom.xml2
-rw-r--r--version.properties2
5 files changed, 36 insertions, 4 deletions
diff --git a/datafile-app-server/pom.xml b/datafile-app-server/pom.xml
index 6a919c13..4a8fb182 100644
--- a/datafile-app-server/pom.xml
+++ b/datafile-app-server/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.dcaegen2.collectors</groupId>
<artifactId>datafile</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.collectors.datafile</groupId>
@@ -199,7 +199,6 @@
<imageTags>
<imageTag>${project.version}-${maven.build.timestamp}Z</imageTag>
<imageTag>${project.version}</imageTag>
- <imageTag>1.2.2</imageTag>
</imageTags>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<resources>
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java
index 8cafd0c4..4805cb47 100644
--- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java
+++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/model/FileData.java
@@ -130,6 +130,12 @@ public abstract class FileData {
String[] userAndPassword = userInfoString.split(":");
if (userAndPassword.length == 2) {
return Optional.of(userAndPassword);
+ }else if(userAndPassword.length == 1)//if just user
+ {
+ String[] tab = new String[2];
+ tab[0] = userAndPassword[0];
+ tab[1] = "";//add empty password
+ return Optional.of(tab);
}
}
return Optional.empty();
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/model/FileDataTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/model/FileDataTest.java
index 35894f9c..10a84e76 100644
--- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/model/FileDataTest.java
+++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/model/FileDataTest.java
@@ -37,6 +37,8 @@ public class FileDataTest {
private static final int PORT_22 = 22;
private static final String LOCATION_WITH_USER =
FTPES_SCHEME + USER + ":" + PWD + "@" + SERVER_ADDRESS + ":" + PORT_22 + REMOTE_FILE_LOCATION;
+ private static final String LOCATION_WITH_USER_NO_PASSWORD =
+ FTPES_SCHEME + USER + "@" + SERVER_ADDRESS + ":" + PORT_22 + REMOTE_FILE_LOCATION;
private static final String LOCATION_WITHOUT_USER =
FTPES_SCHEME + SERVER_ADDRESS + ":" + PORT_22 + REMOTE_FILE_LOCATION;
@@ -65,6 +67,18 @@ public class FileDataTest {
.build();
}
+ private FileData properFileDataWithUserNoPassword() {
+ return ImmutableFileData.builder() //
+ .name("name") //
+ .location(LOCATION_WITH_USER_NO_PASSWORD) //
+ .compression("comp") //
+ .fileFormatType("type") //
+ .fileFormatVersion("version") //
+ .scheme(Scheme.FTPS) //
+ .messageMetaData(messageMetaData()) //
+ .build();
+ }
+
private FileData properFileDataWithoutUser() {
return ImmutableFileData.builder() //
.name("name") //
@@ -91,6 +105,19 @@ public class FileDataTest {
}
@Test
+ public void fileServerData_properLocationWithUserNoPassword() {
+ ImmutableFileServerData expectedFileServerData = ImmutableFileServerData.builder() //
+ .serverAddress(SERVER_ADDRESS) //
+ .port(PORT_22) //
+ .userId(USER) //
+ .password("") //
+ .build();
+
+ FileServerData actualFileServerData = properFileDataWithUserNoPassword().fileServerData();
+ assertEquals(expectedFileServerData, actualFileServerData);
+ }
+
+ @Test
public void fileServerData_properLocationWithoutUser() {
ImmutableFileServerData expectedFileServerData = ImmutableFileServerData.builder() //
.serverAddress(SERVER_ADDRESS) //
diff --git a/pom.xml b/pom.xml
index 31d2df39..5a173ceb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
<groupId>org.onap.dcaegen2.collectors</groupId>
<artifactId>datafile</artifactId>
- <version>1.2.2-SNAPSHOT</version>
+ <version>1.2.3-SNAPSHOT</version>
<name>dcaegen2-collectors.datafile</name>
<description>datafile collector</description>
diff --git a/version.properties b/version.properties
index e562846c..dd25c5ba 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=1
minor=2
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT