From f01cd76e0eb8f6a4ea78b26c60e3a37d7d4dd6ae Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Thu, 11 Aug 2022 11:12:33 +0800 Subject: [PATCH 01/16] Released the version to 1.4.3 Issue-ID: HOLMES-511 Signed-off-by: Guangrong Fu Change-Id: I5d86b2bb20e17bc8788e359190e571cbf40cc7d5 --- releases/maven-1.4.3.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 releases/maven-1.4.3.yaml diff --git a/releases/maven-1.4.3.yaml b/releases/maven-1.4.3.yaml new file mode 100644 index 0000000..a2e5297 --- /dev/null +++ b/releases/maven-1.4.3.yaml @@ -0,0 +1,5 @@ +--- +distribution_type: 'maven' +version: '1.4.3' +project: 'holmes-common' +log_dir: 'holmes-common-maven-stage-master/1221/' \ No newline at end of file -- 2.16.6 From f00f74740e42d08cc6823d094b78aedf87e4cff8 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Wed, 17 Aug 2022 08:41:44 +0800 Subject: [PATCH 02/16] bugfix - username capitalization problem Issue-ID: HOLMES-564 Signed-off-by: Guangrong Fu Change-Id: Ifa350d406f5fc7549c88bf5b50a8bc111d76fd8c --- holmes-actions/pom.xml | 2 +- .../org/onap/holmes/common/database/DbDaoUtil.java | 2 +- .../dmaap/store/ClosedLoopControlNameCache.java | 2 +- .../common/dmaap/store/UniqueRequestIdCache.java | 2 +- .../common/engine/dao/EngineEntityMapper.java | 2 +- .../onap/holmes/common/utils/AlarmInfoMapper.java | 2 +- .../holmes/common/utils/CorrelationRuleMapper.java | 2 +- .../org/onap/holmes/common/utils/GsonUtil.java | 2 +- .../org/onap/holmes/common/utils/UserUtil.java | 13 +++++------ .../org/onap/holmes/common/utils/UserUtilTest.java | 25 ++++++++++------------ pom.xml | 2 +- version.properties | 2 +- 12 files changed, 26 insertions(+), 32 deletions(-) diff --git a/holmes-actions/pom.xml b/holmes-actions/pom.xml index 8c74bca..5687d18 100644 --- a/holmes-actions/pom.xml +++ b/holmes-actions/pom.xml @@ -12,7 +12,7 @@ org.onap.holmes.common holmes-common-parent - 1.4.3-SNAPSHOT + 1.4.4-SNAPSHOT holmes-common-service diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/database/DbDaoUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/database/DbDaoUtil.java index 2cbb538..15f49e4 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/database/DbDaoUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/database/DbDaoUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2017-2021 ZTE Corporation. + * Copyright 2017-2022 ZTE Corporation. *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/ClosedLoopControlNameCache.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/ClosedLoopControlNameCache.java index 89514dc..cd47431 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/ClosedLoopControlNameCache.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/ClosedLoopControlNameCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 ZTE Corporation. + * Copyright 2020-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java index 8c68776..6a65b0c 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 ZTE Corporation. + * Copyright 2020-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/engine/dao/EngineEntityMapper.java b/holmes-actions/src/main/java/org/onap/holmes/common/engine/dao/EngineEntityMapper.java index 5432027..3dc652e 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/engine/dao/EngineEntityMapper.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/engine/dao/EngineEntityMapper.java @@ -1,5 +1,5 @@ /** - * Copyright 2020-2021 ZTE Corporation. + * Copyright 2020-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/AlarmInfoMapper.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/AlarmInfoMapper.java index 996df25..e9755e8 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/AlarmInfoMapper.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/AlarmInfoMapper.java @@ -1,5 +1,5 @@ /** - * Copyright 2017-2021 ZTE Corporation. + * Copyright 2017-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/CorrelationRuleMapper.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/CorrelationRuleMapper.java index ed1c581..835d059 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/CorrelationRuleMapper.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/CorrelationRuleMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2021 ZTE Corporation. + * Copyright 2017-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/GsonUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/GsonUtil.java index f5ad56c..e43a68e 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/GsonUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/GsonUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2018-2021 ZTE Corporation. + * Copyright 2018-2022 ZTE Corporation. *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java index f0ff8d9..5400b20 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,10 @@ */ package org.onap.holmes.common.utils; -import javax.servlet.http.HttpServletRequest; import org.onap.holmes.common.constant.AlarmConst; +import javax.servlet.http.HttpServletRequest; + public class UserUtil { private UserUtil() { @@ -25,11 +26,7 @@ public class UserUtil { } public static String getUserName(HttpServletRequest request) { - String userName = AlarmConst.ADMIN; - String sessionName = request.getHeader("username"); - if (sessionName != null) { - userName = sessionName.toLowerCase(); - } - return userName; + return request.getHeader("username") == null ? + AlarmConst.ADMIN : request.getHeader("username"); } } diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java index d88525a..7b452f0 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2022 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,15 +16,16 @@ package org.onap.holmes.common.utils; -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import javax.servlet.http.HttpServletRequest; import org.easymock.EasyMock; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.powermock.api.easymock.PowerMock; + +import javax.servlet.http.HttpServletRequest; + +import static org.hamcrest.core.IsEqual.equalTo; +import static org.junit.Assert.assertThat; public class UserUtilTest { private HttpServletRequest request; @@ -39,29 +40,25 @@ public class UserUtilTest { } @Test - public void getUserName_header_name_empty() throws Exception { + public void getUserName_header_name_empty() { EasyMock.expect(request.getHeader("username")).andReturn(null); PowerMock.replayAll(); - String userName = UserUtil.getUserName(request); + assertThat("admin", equalTo(UserUtil.getUserName(request))); PowerMock.verifyAll(); - - assertThat("admin", equalTo(userName)); } @Test - public void getUserName_normal() throws Exception { - EasyMock.expect(request.getHeader("username")).andReturn("name1"); + public void getUserName_normal() { + EasyMock.expect(request.getHeader("username")).andReturn("Name").times(2); PowerMock.replayAll(); - String userName = UserUtil.getUserName(request); + assertThat("Name", equalTo(UserUtil.getUserName(request))); PowerMock.verifyAll(); - - assertThat("name1", equalTo(userName)); } } diff --git a/pom.xml b/pom.xml index cda749e..19a1f22 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ holmes-common-parent pom - 1.4.3-SNAPSHOT + 1.4.4-SNAPSHOT holmes-common holmes-actions diff --git a/version.properties b/version.properties index 5abc35c..4761c30 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ major=1 minor=4 -patch=3 +patch=4 base_version=${major}.${minor}.${patch} -- 2.16.6 From f40805fd803fe7e6aa8f7bb4c5d41cf85d163738 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Wed, 17 Aug 2022 10:19:33 +0800 Subject: [PATCH 03/16] Releasing 1.4.4 Issue-ID: HOLMES-564 Signed-off-by: Guangrong Fu Change-Id: Ia4fb9859fc669061f3eacf16b9da08482bf31e01 --- releases/maven-1.4.4.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 releases/maven-1.4.4.yaml diff --git a/releases/maven-1.4.4.yaml b/releases/maven-1.4.4.yaml new file mode 100644 index 0000000..50dac16 --- /dev/null +++ b/releases/maven-1.4.4.yaml @@ -0,0 +1,5 @@ +--- +distribution_type: 'maven' +version: '1.4.4' +project: 'holmes-common' +log_dir: 'holmes-common-maven-stage-master/1228/' \ No newline at end of file -- 2.16.6 From 167b3d6d3f85e8d0ff3680a7d85ca1c9cf99b2b1 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 20 Mar 2023 10:30:36 +0800 Subject: [PATCH 04/16] Removed MSB Invocation During AAI Calling Issue-ID: HOLMES-327 Signed-off-by: Guangrong Fu Change-Id: I7e4319c3f6b17db53ffbb57efbe692ed523090e6 --- holmes-actions/pom.xml | 9 +-- .../onap/holmes/common/aai/AaiJsonParserUtil.java | 7 +-- .../org/onap/holmes/common/aai/AaiQuery4Ccvpn.java | 28 ++++----- .../onap/holmes/common/aai/AaiQuery4Ccvpn2.java | 11 ++-- .../org/onap/holmes/common/aai/AaiQueryMdons.java | 8 +-- .../onap/holmes/common/aai/config/AaiConfig.java | 70 ++++++---------------- .../holmes/common/aai/entity/RelationshipList.java | 5 +- .../onap/holmes/common/api/entity/AlarmInfo.java | 3 +- .../common/api/entity/CorrelationResult.java | 5 +- .../holmes/common/api/entity/CorrelationRule.java | 7 +-- .../holmes/common/api/entity/ServiceEntity.java | 7 ++- .../onap/holmes/common/api/entity/ServiceNode.java | 3 +- .../common/api/entity/ServiceNode4Query.java | 7 ++- .../common/api/entity/ServiceRegisterEntity.java | 8 +-- .../common/api/stat/AlarmAdditionalField.java | 5 +- .../org/onap/holmes/common/api/stat/VesAlarm.java | 9 +-- .../holmes/common/config/MicroServiceConfig.java | 25 +++++++- .../common/dcae/entity/DcaeConfigurations.java | 8 +-- .../org/onap/holmes/common/dmaap/Publisher.java | 4 +- .../onap/holmes/common/dmaap/entity/PolicyMsg.java | 7 ++- .../onap/holmes/common/utils/AlarmInfoMapper.java | 3 +- .../org/onap/holmes/common/utils/LanguageUtil.java | 7 ++- .../java/org/onap/holmes/common/utils/Md5Util.java | 3 +- .../org/onap/holmes/common/utils/MsbRegister.java | 6 +- .../holmes/common/utils/RestExceptionHandler.java | 5 +- .../AddHeadersHttpServletRequestWrapper.java | 6 +- .../utils/transactionid/TransactionIdFilter.java | 9 +-- .../onap/holmes/common/aai/AaiQueryMdonsTest.java | 6 +- .../holmes/common/aai/config/AaiConfigTest.java | 4 +- pom.xml | 4 +- 30 files changed, 129 insertions(+), 160 deletions(-) diff --git a/holmes-actions/pom.xml b/holmes-actions/pom.xml index 5687d18..cec3209 100644 --- a/holmes-actions/pom.xml +++ b/holmes-actions/pom.xml @@ -1,5 +1,5 @@ - - - - 4.0.0 - - org.onap.oparent - oparent - 3.0.0 - - - org.onap.holmes.common - holmes-common-parent - pom - - 1.4.6-SNAPSHOT - holmes-common - - holmes-actions - - - - UTF-8 - UTF-8 - false - false - - ${project.artifactId}-${project.version} - ${basedir}/target - ${project.artifactId}-${project.version} - - 2.0.7 - 2.7.2 - 5.3.13 - 3.19.0 - - 2.0.9 - 1.6.4 - 1.18.4 - 3.0.5 - compile - 3.1.0 - 1.7.25 - 0.8.5 - 2.13.3 - - ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml - - - - - - - org.springframework.boot - spring-boot-dependencies - ${springboot.version} - pom - import - - - org.springframework - spring-jdbc - ${spring-framework.version} - - - org.springframework - spring-web - ${spring-framework.version} - - - org.jdbi - jdbi3-postgres - ${jdbi.version} - - - org.jdbi - jdbi3-sqlobject - ${jdbi.version} - - - javax.servlet - javax.servlet-api - 4.0.1 - - - org.onap.msb.java-sdk - msb-java-sdk - 1.2.5 - - - com.fasterxml.jackson.core - jackson-databind - - - - - org.glassfish.jersey.containers - jersey-container-servlet-core - ${jersey.version} - ${jersey.scope} - - - org.glassfish.jersey.core - jersey-common - ${jersey.version} - - - org.glassfish.jersey.core - jersey-client - ${jersey.version} - - - org.projectlombok - lombok - ${lombok.version} - - - junit - junit - 4.8.2 - test - - - org.hamcrest - hamcrest-core - 1.3 - test - - - org.powermock - powermock-module-junit4 - ${powermock.version} - test - - - org.easymock - easymock - 4.2 - test - - - org.powermock - powermock-api-easymock - ${powermock.version} - test - - - com.google.guava - guava - 29.0-jre - - - com.google.code.gson - gson - 2.8.9 - - - jakarta.ws.rs - jakarta.ws.rs-api - ${jakarta.ws.rs.version} - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - prepare-agent - - prepare-agent - - - - report - - report - - - ${project.build.directory}/code-coverage/jacoco.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - - - - - + + + + + 4.0.0 + + org.onap.holmes.common + holmes-common-parent + pom + + 1.4.7-SNAPSHOT + holmes-common + + holmes-actions + + + + UTF-8 + UTF-8 + false + false + + ${project.artifactId}-${project.version} + ${basedir}/target + ${project.artifactId}-${project.version} + + 2.0.7 + 2.7.2 + 5.3.13 + 3.19.0 + + 2.0.9 + 1.6.4 + 1.18.28 + 3.0.5 + compile + 3.1.0 + 1.7.25 + 0.8.5 + 2.13.3 + + 0.8.5 + 3.2 + jacoco + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + ${basedir}/src/main/resources/swagger.properties + ${basedir}/src/main/resources/swagger.json + + + + + + org.springframework.boot + spring-boot-dependencies + ${springboot.version} + pom + import + + + org.springframework + spring-jdbc + ${spring-framework.version} + + + org.springframework + spring-web + ${spring-framework.version} + + + org.jdbi + jdbi3-postgres + ${jdbi.version} + + + org.jdbi + jdbi3-sqlobject + ${jdbi.version} + + + javax.servlet + javax.servlet-api + 4.0.1 + + + org.onap.msb.java-sdk + msb-java-sdk + 1.2.5 + + + com.fasterxml.jackson.core + jackson-databind + + + + + org.glassfish.jersey.containers + jersey-container-servlet-core + ${jersey.version} + ${jersey.scope} + + + org.glassfish.jersey.core + jersey-common + ${jersey.version} + + + org.glassfish.jersey.core + jersey-client + ${jersey.version} + + + org.projectlombok + lombok + ${lombok.version} + + + junit + junit + 4.13.2 + test + + + org.hamcrest + hamcrest-core + 1.3 + test + + + org.powermock + powermock-module-junit4 + ${powermock.version} + test + + + org.easymock + easymock + 4.2 + test + + + org.powermock + powermock-api-easymock + ${powermock.version} + test + + + com.google.guava + guava + 30.0-jre + + + com.google.code.gson + gson + 2.8.9 + + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs.version} + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + prepare-agent + + prepare-agent + + + + report + + report + + + ${project.build.directory}/code-coverage/jacoco.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + + + + + -- 2.16.6 From ade480b317fe7bcf9ce94ef34e6c42b71a0ea1a3 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 4 Sep 2023 19:03:50 +0800 Subject: [PATCH 12/16] Removed MSB Dependencies Issue-ID: HOLMES-629 Signed-off-by: Guangrong Fu Change-Id: Ia74c8456822ba71f465a7142431327a884c50a70 --- holmes-actions/pom.xml | 34 +++--- .../holmes/common/{utils => msb}/MsbRegister.java | 12 +- .../common/msb/entity/CustomDateSerializer.java | 35 ++++++ .../holmes/common/msb/entity/KeyValuePair.java | 49 +++++++++ .../common/msb/entity/MicroServiceFullInfo.java | 71 ++++++++++++ .../holmes/common/msb/entity/MicroServiceInfo.java | 49 +++++++++ .../org/onap/holmes/common/msb/entity/Node.java | 97 +++++++++++++++++ .../onap/holmes/common/msb/entity/NodeInfo.java | 80 ++++++++++++++ .../org/onap/holmes/common/msb/entity/Service.java | 121 +++++++++++++++++++++ .../common/{utils => msb}/MsbRegisterTest.java | 15 +-- .../msb/entity/CustomDateSerializerTest.java | 32 ++++++ .../holmes/common/msb/entity/KeyValuePairTest.java | 43 ++++++++ .../msb/entity/MicroServiceFullInfoTest.java | 114 +++++++++++++++++++ .../common/msb/entity/MicroServiceInfoTest.java | 64 +++++++++++ .../holmes/common/msb/entity/NodeInfoTest.java | 47 ++++++++ .../onap/holmes/common/msb/entity/NodeTest.java | 56 ++++++++++ .../onap/holmes/common/msb/entity/ServiceTest.java | 59 ++++++++++ pom.xml | 28 +++-- 18 files changed, 962 insertions(+), 44 deletions(-) rename holmes-actions/src/main/java/org/onap/holmes/common/{utils => msb}/MsbRegister.java (89%) create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/CustomDateSerializer.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/KeyValuePair.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfo.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceInfo.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Node.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/NodeInfo.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Service.java rename holmes-actions/src/test/java/org/onap/holmes/common/{utils => msb}/MsbRegisterTest.java (96%) create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/CustomDateSerializerTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/KeyValuePairTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfoTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceInfoTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeTest.java create mode 100644 holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/ServiceTest.java diff --git a/holmes-actions/pom.xml b/holmes-actions/pom.xml index f132e80..01c7b8c 100644 --- a/holmes-actions/pom.xml +++ b/holmes-actions/pom.xml @@ -7,7 +7,7 @@ OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.onap.holmes.common @@ -19,25 +19,6 @@ jar holmes-actions - - org.onap.msb.java-sdk - msb-java-sdk - provided - - - com.eclipsesource.jaxrs - jersey-all - - - ch.qos.logback - logback-classic - - - org.slf4j - slf4j-api - - - org.projectlombok lombok @@ -125,6 +106,19 @@ jakarta.ws.rs-api ${jakarta.ws.rs.version} + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + org.apache.commons + commons-lang3 + 3.13.0 + diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/MsbRegister.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/MsbRegister.java similarity index 89% rename from holmes-actions/src/main/java/org/onap/holmes/common/utils/MsbRegister.java rename to holmes-actions/src/main/java/org/onap/holmes/common/msb/MsbRegister.java index 78ac59b..cc83ae5 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/MsbRegister.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/MsbRegister.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.onap.holmes.common.utils; +package org.onap.holmes.common.msb; import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.MediaType; @@ -22,8 +22,10 @@ import lombok.Setter; import org.apache.commons.lang3.StringUtils; import org.onap.holmes.common.config.MicroServiceConfig; import org.onap.holmes.common.exception.CorrelationException; -import org.onap.msb.sdk.discovery.entity.MicroServiceFullInfo; -import org.onap.msb.sdk.discovery.entity.MicroServiceInfo; +import org.onap.holmes.common.msb.entity.MicroServiceFullInfo; +import org.onap.holmes.common.msb.entity.MicroServiceInfo; +import org.onap.holmes.common.utils.GsonUtil; +import org.onap.holmes.common.utils.JerseyClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -60,14 +62,14 @@ public class MsbRegister { MicroServiceFullInfo microServiceFullInfo = null; int retry = 0; while (null == microServiceFullInfo && retry < totalRetryTimes) { - int time = interval * ++retry; + int time = interval * ++retry; try { log.info("Holmes Service Registration. Times: " + retry); microServiceFullInfo = client .header("Accept", MediaType.APPLICATION_JSON) .queryParam("createOrUpdate", true) .post(String.format("%s://%s:%s/api/microservices/v1/services", - isHttpsEnabled ? PROTOCOL_HTTPS : PROTOCOL_HTTP, msbAddrInfo[0], msbAddrInfo[1]), + isHttpsEnabled ? PROTOCOL_HTTPS : PROTOCOL_HTTP, msbAddrInfo[0], msbAddrInfo[1]), Entity.entity(msinfo, MediaType.APPLICATION_JSON), MicroServiceFullInfo.class); diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/CustomDateSerializer.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/CustomDateSerializer.java new file mode 100644 index 0000000..4f6c012 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/CustomDateSerializer.java @@ -0,0 +1,35 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class CustomDateSerializer extends JsonSerializer { + public CustomDateSerializer() { + } + + public void serialize(Date value, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); + jsonGenerator.writeString(sdf.format(value)); + } +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/KeyValuePair.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/KeyValuePair.java new file mode 100644 index 0000000..d35b69e --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/KeyValuePair.java @@ -0,0 +1,49 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import java.io.Serializable; + +public class KeyValuePair implements Serializable { + private static final long serialVersionUID = 1L; + private String key; + private String value; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public KeyValuePair() { + } + + public KeyValuePair(String key, String value) { + this.key = key; + this.value = value; + } +} \ No newline at end of file diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfo.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfo.java new file mode 100644 index 0000000..644f814 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfo.java @@ -0,0 +1,71 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import java.io.Serializable; +import java.util.Iterator; + +public class MicroServiceFullInfo extends Service implements Serializable { + private static final long serialVersionUID = 1L; + private String status = "1"; + + public MicroServiceFullInfo() { + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String toString() { + StringBuffer buf = new StringBuffer(); + buf.append("MicroService List:").append("\r\n"); + buf.append("serviceName:").append(this.getServiceName()).append("\r\n"); + buf.append("version:").append(this.getVersion()).append("\r\n"); + buf.append("url:").append(this.getUrl()).append("\r\n"); + buf.append("protocol:").append(this.getProtocol()).append("\r\n"); + buf.append("visualRange:").append(this.getVisualRange()).append("\r\n"); + buf.append("nodes:").append("\r\n"); + Iterator nodes = this.getNodes().iterator(); + + while (nodes.hasNext()) { + NodeInfo nodeInstace = (NodeInfo) nodes.next(); + buf.append(" nodeId-").append(nodeInstace.getNodeId()).append("\r\n"); + buf.append(" ip-").append(nodeInstace.getIp()).append("\r\n"); + buf.append(" port-").append(nodeInstace.getPort()).append("\r\n"); + buf.append(" ttl-").append(nodeInstace.getTtl()).append("\r\n"); + buf.append(" Created_at-").append(nodeInstace.getCreated_at()).append("\r\n"); + buf.append(" Updated_at-").append(nodeInstace.getUpdated_at()).append("\r\n"); + buf.append(" Expiration-").append(nodeInstace.getExpiration()).append("\r\n"); + } + + buf.append("metadata:").append("\r\n"); + if (this.getMetadata() != null && this.getMetadata().size() > 0) { + nodes = this.getMetadata().iterator(); + while (nodes.hasNext()) { + KeyValuePair keyValuePair = (KeyValuePair) nodes.next(); + buf.append(" key-").append(keyValuePair.getKey()).append("\r\n"); + buf.append(" value-").append(keyValuePair.getValue()).append("\r\n"); + } + } + + return buf.toString(); + } +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceInfo.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceInfo.java new file mode 100644 index 0000000..16fd0b3 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/MicroServiceInfo.java @@ -0,0 +1,49 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import java.io.Serializable; +import java.util.Iterator; + +public class MicroServiceInfo extends Service implements Serializable { + private static final long serialVersionUID = 1L; + + public MicroServiceInfo() { + } + + public String toString() { + StringBuilder buf = new StringBuilder(); + buf.append("MicroService List:").append("\r\n"); + buf.append("serviceName:").append(this.getServiceName()).append("\r\n"); + buf.append("version:").append(this.getVersion()).append("\r\n"); + buf.append("url:").append(this.getUrl()).append("\r\n"); + buf.append("protocol:").append(this.getProtocol()).append("\r\n"); + buf.append("visualRange:").append(this.getVisualRange()).append("\r\n"); + buf.append("enable_ssl:").append(this.isEnable_ssl()).append("\r\n"); + buf.append("nodes:").append("\r\n"); + Iterator nodes = this.getNodes().iterator(); + + while (nodes.hasNext()) { + Node nodeInstace = (Node) nodes.next(); + buf.append(" ip-").append(nodeInstace.getIp()).append("\r\n"); + buf.append(" port-").append(nodeInstace.getPort()).append("\r\n"); + buf.append(" ttl-").append(nodeInstace.getTtl()).append("\r\n"); + } + + return buf.toString(); + } +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Node.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Node.java new file mode 100644 index 0000000..1e17a05 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Node.java @@ -0,0 +1,97 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import java.io.Serializable; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Node implements Serializable { + private static final long serialVersionUID = 1L; + private String ip; + private String port; + private String ttl = ""; + private String checkType = ""; + private String checkUrl = ""; + private String checkInterval; + private String checkTimeOut; + + public Node() { + } + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getPort() { + return this.port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getTtl() { + return this.ttl; + } + + public void setTtl(String ttl) { + this.ttl = ttl; + } + + public String getCheckType() { + return this.checkType; + } + + public void setCheckType(String checkType) { + this.checkType = checkType; + } + + public String getCheckUrl() { + return this.checkUrl; + } + + public void setCheckUrl(String checkUrl) { + this.checkUrl = checkUrl; + } + + public String getCheckInterval() { + return this.checkInterval; + } + + public void setCheckInterval(String checkInterval) { + this.checkInterval = checkInterval; + } + + public String getCheckTimeOut() { + return this.checkTimeOut; + } + + public void setCheckTimeOut(String checkTimeOut) { + this.checkTimeOut = checkTimeOut; + } + + public String toString() { + return this.ip + ":" + this.port + " ttl:" + this.ttl; + } +} + diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/NodeInfo.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/NodeInfo.java new file mode 100644 index 0000000..de2378d --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/NodeInfo.java @@ -0,0 +1,80 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +import java.util.Date; + +@JsonIgnoreProperties( + ignoreUnknown = true +) +public class NodeInfo extends Node { + private static final long serialVersionUID = 8955786461351557306L; + private String nodeId; + private String status; + @JsonSerialize(using = CustomDateSerializer.class) + private Date expiration; + @JsonSerialize(using = CustomDateSerializer.class) + private Date created_at; + @JsonSerialize(using = CustomDateSerializer.class) + private Date updated_at; + + public NodeInfo() { + } + + public Date getExpiration() { + return this.expiration; + } + + public void setExpiration(Date expiration) { + this.expiration = expiration; + } + + public Date getCreated_at() { + return this.created_at; + } + + public void setCreated_at(Date created_at) { + this.created_at = created_at; + } + + public Date getUpdated_at() { + return this.updated_at; + } + + public void setUpdated_at(Date updated_at) { + this.updated_at = updated_at; + } + + public String getNodeId() { + return this.nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Service.java b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Service.java new file mode 100644 index 0000000..a852d24 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/msb/entity/Service.java @@ -0,0 +1,121 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import java.io.Serializable; +import java.util.List; +import java.util.Set; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Service implements Serializable { + private static final long serialVersionUID = 1L; + private String serviceName; + private String version = ""; + private String url = ""; + private String protocol = ""; + private String visualRange = "1"; + private String lb_policy = ""; + private String path = ""; + private Set nodes; + private List metadata; + private boolean enable_ssl = false; + + public Service() { + } + + public boolean isEnable_ssl() { + return this.enable_ssl; + } + + public void setEnable_ssl(boolean enable_ssl) { + this.enable_ssl = enable_ssl; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getLb_policy() { + return this.lb_policy; + } + + public void setLb_policy(String lb_policy) { + this.lb_policy = lb_policy; + } + + public List getMetadata() { + return this.metadata; + } + + public void setMetadata(List metadata) { + this.metadata = metadata; + } + + public Set getNodes() { + return this.nodes; + } + + public void setNodes(Set nodes) { + this.nodes = nodes; + } + + public String getServiceName() { + return this.serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getVersion() { + return this.version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getUrl() { + return this.url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getProtocol() { + return this.protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getVisualRange() { + return this.visualRange; + } + + public void setVisualRange(String visualRange) { + this.visualRange = visualRange; + } +} diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MsbRegisterTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/MsbRegisterTest.java similarity index 96% rename from holmes-actions/src/test/java/org/onap/holmes/common/utils/MsbRegisterTest.java rename to holmes-actions/src/test/java/org/onap/holmes/common/msb/MsbRegisterTest.java index 073fcc7..997d1cc 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MsbRegisterTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/MsbRegisterTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2017-2022 ZTE Corporation. + * Copyright 2017-2023 ZTE Corporation. *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,23 +14,24 @@ * limitations under the License. */ -package org.onap.holmes.common.utils; +package org.onap.holmes.common.msb; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MediaType; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.holmes.common.config.MicroServiceConfig; import org.onap.holmes.common.exception.CorrelationException; -import org.onap.msb.sdk.discovery.entity.MicroServiceFullInfo; -import org.onap.msb.sdk.discovery.entity.MicroServiceInfo; +import org.onap.holmes.common.msb.entity.MicroServiceFullInfo; +import org.onap.holmes.common.msb.entity.MicroServiceInfo; +import org.onap.holmes.common.utils.GsonUtil; +import org.onap.holmes.common.utils.JerseyClient; import org.powermock.api.easymock.PowerMock; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import jakarta.ws.rs.client.Entity; -import jakarta.ws.rs.core.MediaType; - import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.expect; import static org.powermock.api.easymock.PowerMock.createMock; diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/CustomDateSerializerTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/CustomDateSerializerTest.java new file mode 100644 index 0000000..fb105e8 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/CustomDateSerializerTest.java @@ -0,0 +1,32 @@ +package org.onap.holmes.common.msb.entity; + +import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import org.junit.Test; + +import java.io.IOException; +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.junit.Assert.*; + +public class CustomDateSerializerTest { + @Test + public void testSerialize() throws IOException { + Date date = new Date(); + + StringWriter writer = new StringWriter(); + JsonGenerator jsonGenerator = new JsonFactory().createGenerator(writer); + SerializerProvider provider = new ObjectMapper().getSerializerProvider(); + + CustomDateSerializer serializer = new CustomDateSerializer(); + serializer.serialize(date, jsonGenerator, provider); + jsonGenerator.flush(); + + String expectedOutput = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX").format(date); + assertEquals("\"" + expectedOutput + "\"", writer.toString()); + } +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/KeyValuePairTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/KeyValuePairTest.java new file mode 100644 index 0000000..9c1bad2 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/KeyValuePairTest.java @@ -0,0 +1,43 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class KeyValuePairTest { + + @Test + public void testGettersAndSetters() { + KeyValuePair pair = new KeyValuePair(); + pair.setKey("myKey"); + pair.setValue("myValue"); + + assertEquals("myKey", pair.getKey()); + assertEquals("myValue", pair.getValue()); + } + + @Test + public void testConstructor() { + KeyValuePair pair = new KeyValuePair("key1", "value1"); + + assertEquals("key1", pair.getKey()); + assertEquals("value1", pair.getValue()); + } + +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfoTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfoTest.java new file mode 100644 index 0000000..8e63b59 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceFullInfoTest.java @@ -0,0 +1,114 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import java.util.*; + +import static org.junit.Assert.*; + +public class MicroServiceFullInfoTest { + @Test + public void testGettersAndSetters() { + MicroServiceFullInfo microServiceFullInfo = new MicroServiceFullInfo(); + microServiceFullInfo.setServiceName("service-name"); + microServiceFullInfo.setVersion("1.0"); + microServiceFullInfo.setUrl("http://example.com"); + microServiceFullInfo.setProtocol("http"); + microServiceFullInfo.setVisualRange("local"); + microServiceFullInfo.setStatus("active"); + + Set nodes = new HashSet<>(); + NodeInfo nodeInfo = new NodeInfo(); + nodeInfo.setNodeId("node-1"); + nodeInfo.setIp("127.0.0.1"); + nodeInfo.setPort("8080"); + nodeInfo.setTtl("300"); + nodeInfo.setCreated_at(new Date()); + nodeInfo.setUpdated_at(new Date()); + nodeInfo.setExpiration(new Date()); + nodes.add(nodeInfo); + microServiceFullInfo.setNodes(nodes); + + List metadata = new ArrayList<>(); + metadata.add(new KeyValuePair("key1", "value1")); + metadata.add(new KeyValuePair("key2", "value2")); + microServiceFullInfo.setMetadata(metadata); + + assertEquals("service-name", microServiceFullInfo.getServiceName()); + assertEquals("1.0", microServiceFullInfo.getVersion()); + assertEquals("http://example.com", microServiceFullInfo.getUrl()); + assertEquals("http", microServiceFullInfo.getProtocol()); + assertEquals("local", microServiceFullInfo.getVisualRange()); + assertEquals("active", microServiceFullInfo.getStatus()); + assertEquals(nodes, microServiceFullInfo.getNodes()); + assertEquals(metadata, microServiceFullInfo.getMetadata()); + } + + @Test + public void testToString() { + MicroServiceFullInfo microServiceFullInfo = new MicroServiceFullInfo(); + microServiceFullInfo.setServiceName("service-name"); + microServiceFullInfo.setVersion("1.0"); + microServiceFullInfo.setUrl("http://example.com"); + microServiceFullInfo.setProtocol("http"); + microServiceFullInfo.setVisualRange("local"); + microServiceFullInfo.setStatus("active"); + + NodeInfo nodeInfo = new NodeInfo(); + nodeInfo.setNodeId("node-1"); + nodeInfo.setIp("127.0.0.1"); + nodeInfo.setPort("8080"); + nodeInfo.setTtl("300"); + nodeInfo.setCreated_at(new Date()); + nodeInfo.setUpdated_at(new Date()); + nodeInfo.setExpiration(new Date()); + + Set nodes = new HashSet<>(); + nodes.add(nodeInfo); + microServiceFullInfo.setNodes(nodes); + + List metadata = new ArrayList<>(); + metadata.add(new KeyValuePair("key1", "value1")); + metadata.add(new KeyValuePair("key2", "value2")); + microServiceFullInfo.setMetadata(metadata); + + // Test the toString method + String expectedOutput = "MicroService List:\r\n" + + "serviceName:service-name\r\n" + + "version:1.0\r\n" + + "url:http://example.com\r\n" + + "protocol:http\r\n" + + "visualRange:local\r\n" + + "nodes:\r\n" + + " nodeId-node-1\r\n" + + " ip-127.0.0.1\r\n" + + " port-8080\r\n" + + " ttl-300\r\n" + + " Created_at-" + nodeInfo.getCreated_at() + "\r\n" + + " Updated_at-" + nodeInfo.getUpdated_at() + "\r\n" + + " Expiration-" + nodeInfo.getExpiration() + "\r\n" + + "metadata:\r\n" + + " key-key1\r\n" + + " value-value1\r\n" + + " key-key2\r\n" + + " value-value2\r\n"; + + assertEquals(expectedOutput, microServiceFullInfo.toString()); + } +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceInfoTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceInfoTest.java new file mode 100644 index 0000000..aa89f19 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/MicroServiceInfoTest.java @@ -0,0 +1,64 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import java.util.HashSet; +import java.util.Set; + +import static org.junit.Assert.assertEquals; + +public class MicroServiceInfoTest { + @Test + public void testToString() { + MicroServiceInfo microServiceInfo = getMicroServiceInfo(); + + String expectedOutput = "MicroService List:\r\n" + + "serviceName:service-name\r\n" + + "version:1.0\r\n" + + "url:http://example.com\r\n" + + "protocol:http\r\n" + + "visualRange:local\r\n" + + "enable_ssl:true\r\n" + + "nodes:\r\n" + + " ip-127.0.0.1\r\n" + + " port-8080\r\n" + + " ttl-300\r\n"; + + assertEquals(expectedOutput, microServiceInfo.toString()); + } + + private static MicroServiceInfo getMicroServiceInfo() { + MicroServiceInfo microServiceInfo = new MicroServiceInfo(); + microServiceInfo.setServiceName("service-name"); + microServiceInfo.setVersion("1.0"); + microServiceInfo.setUrl("http://example.com"); + microServiceInfo.setProtocol("http"); + microServiceInfo.setVisualRange("local"); + microServiceInfo.setEnable_ssl(true); + + Set nodes = new HashSet<>(); + Node node = new Node(); + node.setIp("127.0.0.1"); + node.setPort("8080"); + node.setTtl("300"); + nodes.add(node); + microServiceInfo.setNodes(nodes); + return microServiceInfo; + } +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java new file mode 100644 index 0000000..9458dcf --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeInfoTest.java @@ -0,0 +1,47 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import java.util.Date; + +import static org.junit.Assert.*; + +public class NodeInfoTest { + @Test + public void testGettersAndSetters() { + NodeInfo nodeInfo = new NodeInfo(); + nodeInfo.setNodeId("node-1"); + nodeInfo.setStatus("active"); + + Date expiration = new Date(); + nodeInfo.setExpiration(expiration); + + Date createdAt = new Date(); + nodeInfo.setCreated_at(createdAt); + + Date updatedAt = new Date(); + nodeInfo.setUpdated_at(updatedAt); + + assertEquals("node-1", nodeInfo.getNodeId()); + assertEquals("active", nodeInfo.getStatus()); + assertEquals(expiration, nodeInfo.getExpiration()); + assertEquals(createdAt, nodeInfo.getCreated_at()); + assertEquals(updatedAt, nodeInfo.getUpdated_at()); + } +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeTest.java new file mode 100644 index 0000000..7555ad3 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/NodeTest.java @@ -0,0 +1,56 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class NodeTest { + + @Test + public void testToString() { + Node node = new Node(); + node.setIp("127.0.0.1"); + node.setPort("8080"); + node.setTtl("300"); + + String expectedOutput = "127.0.0.1:8080 ttl:300"; + assertEquals(expectedOutput, node.toString()); + } + + @Test + public void testGettersAndSetters() { + Node node = new Node(); + node.setIp("192.168.1.1"); + node.setPort("8888"); + node.setTtl("600"); + node.setCheckType("http"); + node.setCheckUrl("/health"); + node.setCheckInterval("30s"); + node.setCheckTimeOut("5s"); + + assertEquals("192.168.1.1", node.getIp()); + assertEquals("8888", node.getPort()); + assertEquals("600", node.getTtl()); + assertEquals("http", node.getCheckType()); + assertEquals("/health", node.getCheckUrl()); + assertEquals("30s", node.getCheckInterval()); + assertEquals("5s", node.getCheckTimeOut()); + } + +} \ No newline at end of file diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/ServiceTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/ServiceTest.java new file mode 100644 index 0000000..ac50841 --- /dev/null +++ b/holmes-actions/src/test/java/org/onap/holmes/common/msb/entity/ServiceTest.java @@ -0,0 +1,59 @@ +/** + * Copyright 2023 ZTE Corporation. + *

+ * 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. + */ + +package org.onap.holmes.common.msb.entity; + +import org.junit.Test; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.junit.Assert.*; + +public class ServiceTest { + @Test + public void testGettersAndSetters() { + Service service = new Service<>(); + service.setServiceName("my-service"); + service.setVersion("1.0"); + service.setUrl("http://example.com"); + service.setProtocol("http"); + service.setVisualRange("local"); + service.setLb_policy("round-robin"); + service.setPath("/api"); + service.setEnable_ssl(true); + + Set nodes = new HashSet<>(); + nodes.add(8080); + nodes.add(8081); + service.setNodes(nodes); + + List metadata = List.of(new KeyValuePair("key1", "value1"), new KeyValuePair("key2", "value2")); + service.setMetadata(metadata); + + assertEquals("my-service", service.getServiceName()); + assertEquals("1.0", service.getVersion()); + assertEquals("http://example.com", service.getUrl()); + assertEquals("http", service.getProtocol()); + assertEquals("local", service.getVisualRange()); + assertEquals("round-robin", service.getLb_policy()); + assertEquals("/api", service.getPath()); + assertEquals(true, service.isEnable_ssl()); + assertEquals(nodes, service.getNodes()); + assertEquals(metadata, service.getMetadata()); + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 14384fc..3de6290 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 3.1.0 1.7.25 0.8.5 - 2.13.3 + 2.15.2 0.8.5 3.2 @@ -90,17 +90,6 @@ javax.servlet-api 4.0.1 - - org.onap.msb.java-sdk - msb-java-sdk - 1.2.5 - - - com.fasterxml.jackson.core - jackson-databind - - - org.glassfish.jersey.containers jersey-container-servlet-core @@ -167,6 +156,21 @@ jakarta.ws.rs-api ${jakarta.ws.rs.version} + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + org.apache.commons + commons-lang3 + 3.13.0 + -- 2.16.6 From 5200ae428eb894fac15db1b1af0bb9e7a9f3c9ae Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Tue, 24 Oct 2023 19:36:40 +0800 Subject: [PATCH 13/16] Updated the version of direction dependencies Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu Change-Id: I7c977f9ef88c5284e1212cbc4b66c93a60e60c6d --- .../org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java | 2 -- pom.xml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java index 6a65b0c..6e28fdc 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/store/UniqueRequestIdCache.java @@ -19,11 +19,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import javax.inject.Singleton; import java.util.concurrent.ConcurrentHashMap; @Component -@Singleton public class UniqueRequestIdCache extends ConcurrentHashMap { private static final Logger log = LoggerFactory.getLogger(UniqueRequestIdCache.class); diff --git a/pom.xml b/pom.xml index 3de6290..0dacb29 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ ${project.artifactId}-${project.version} 2.0.7 - 2.7.2 - 5.3.13 + 3.1.4 + 6.0.12 3.19.0 2.0.9 @@ -144,7 +144,7 @@ com.google.guava guava - 30.0-jre + 32.1.2-jre com.google.code.gson -- 2.16.6 From 288b8bc763d4c4e4bef01b293d3ee09b8f817bba Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 30 Oct 2023 17:06:17 +0800 Subject: [PATCH 14/16] Updated slf4j to 2.0.9 Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu Change-Id: Ib7da8e391b7f8a50d9a67db6acb00f6d0a94660a --- holmes-actions/pom.xml | 5 ++++- .../src/main/java/org/onap/holmes/common/utils/LanguageUtil.java | 2 +- .../src/main/java/org/onap/holmes/common/utils/UserUtil.java | 2 +- .../utils/transactionid/AddHeadersHttpServletRequestWrapper.java | 4 ++-- .../holmes/common/utils/transactionid/TransactionIdFilter.java | 8 ++++---- .../test/java/org/onap/holmes/common/utils/LanguageUtilTest.java | 2 +- .../src/test/java/org/onap/holmes/common/utils/UserUtilTest.java | 2 +- .../common/utils/transactionid/TransactionIdFilterTest.java | 6 +++--- pom.xml | 8 +++++++- 9 files changed, 24 insertions(+), 15 deletions(-) diff --git a/holmes-actions/pom.xml b/holmes-actions/pom.xml index 01c7b8c..954e0dc 100644 --- a/holmes-actions/pom.xml +++ b/holmes-actions/pom.xml @@ -104,7 +104,10 @@ jakarta.ws.rs jakarta.ws.rs-api - ${jakarta.ws.rs.version} + + + jakarta.servlet + jakarta.servlet-api com.fasterxml.jackson.core diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/LanguageUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/LanguageUtil.java index cf49b84..2ea606e 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/LanguageUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/LanguageUtil.java @@ -17,7 +17,7 @@ package org.onap.holmes.common.utils; import org.onap.holmes.common.constant.AlarmConst; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Locale; public class LanguageUtil { diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java index 5400b20..6a4ad15 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/UserUtil.java @@ -17,7 +17,7 @@ package org.onap.holmes.common.utils; import org.onap.holmes.common.constant.AlarmConst; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class UserUtil { diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/AddHeadersHttpServletRequestWrapper.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/AddHeadersHttpServletRequestWrapper.java index bfe67d1..70f5e2f 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/AddHeadersHttpServletRequestWrapper.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/AddHeadersHttpServletRequestWrapper.java @@ -15,8 +15,8 @@ */ package org.onap.holmes.common.utils.transactionid; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; import java.util.HashMap; import java.util.Map; diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilter.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilter.java index 3451b85..7c15240 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilter.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilter.java @@ -22,10 +22,10 @@ import org.slf4j.Marker; import org.slf4j.MarkerFactory; import org.springframework.stereotype.Component; -import javax.servlet.*; -import javax.servlet.annotation.WebFilter; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.*; +import jakarta.servlet.annotation.WebFilter; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.UUID; diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/LanguageUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/LanguageUtilTest.java index 06759ec..2e5e6ca 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/LanguageUtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/LanguageUtilTest.java @@ -21,7 +21,7 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; import java.util.Locale; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.easymock.EasyMock; import org.junit.Before; import org.junit.Test; diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java index 7b452f0..8cdeabb 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/UserUtilTest.java @@ -22,7 +22,7 @@ import org.junit.Before; import org.junit.Test; import org.powermock.api.easymock.PowerMock; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilterTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilterTest.java index cfbf747..e56c6a9 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilterTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/transactionid/TransactionIdFilterTest.java @@ -15,9 +15,9 @@ */ package org.onap.holmes.common.utils.transactionid; -import javax.servlet.FilterChain; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.easymock.EasyMock; import org.junit.Before; import org.junit.Test; diff --git a/pom.xml b/pom.xml index 0dacb29..a947783 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.0.5 compile 3.1.0 - 1.7.25 + 2.0.9 0.8.5 2.15.2 @@ -156,6 +156,12 @@ jakarta.ws.rs-api ${jakarta.ws.rs.version} + + jakarta.servlet + jakarta.servlet-api + 6.0.0 + provided + com.fasterxml.jackson.core jackson-annotations -- 2.16.6 From 5a8bf0afa932d6d41359716685d8220f2e6af04f Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 30 Oct 2023 17:08:55 +0800 Subject: [PATCH 15/16] Bumped the version number to 1.4.7 Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu Change-Id: I41c45eb6787a4a5a6831bc1993e1ca0df0f2eb24 --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 8786bbb..b69668f 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ major=1 minor=4 -patch=6 +patch=7 base_version=${major}.${minor}.${patch} -- 2.16.6 From d209cf72b970780ff9434a4bfd0d45b49150c6f5 Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 30 Oct 2023 17:25:22 +0800 Subject: [PATCH 16/16] Released Version 1.4.7 Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu Change-Id: Id06a358adaeabc06271ac011cd7ca24890cba753 --- releases/maven-1.4.7.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 releases/maven-1.4.7.yaml diff --git a/releases/maven-1.4.7.yaml b/releases/maven-1.4.7.yaml new file mode 100644 index 0000000..a81c033 --- /dev/null +++ b/releases/maven-1.4.7.yaml @@ -0,0 +1,5 @@ +--- +distribution_type: 'maven' +version: '1.4.7' +project: 'holmes-common' +log_dir: 'holmes-common-maven-stage-master/1471/' \ No newline at end of file -- 2.16.6