Create common/clients module 34/141634/2
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 31 Jul 2025 13:42:38 +0000 (15:42 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 31 Jul 2025 14:15:09 +0000 (16:15 +0200)
- move client-related code into a dedicated clients module inside the common pom
  to allow better exclusion of unwanted dependencies
- in the future all clients should have their own module to selectively include them

Issue-ID: SO-4215
Change-Id: Iee70dccf5c520d6b09c6de875b1f752e8a256d8f
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
128 files changed:
common/clients-base/pom.xml
common/clients-base/src/main/java/org/onap/so/client/HttpClientFactory.java
common/clients/pom.xml [new file with mode: 0644]
common/clients/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java [moved from common/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/adapter/rest/AdapterRestProperties.java [moved from common/common/src/main/java/org/onap/so/client/adapter/rest/AdapterRestProperties.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/cds/BasicAuthClientInterceptor.java [moved from common/common/src/main/java/org/onap/so/client/cds/BasicAuthClientInterceptor.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/cds/CDSProcessingClient.java [moved from common/common/src/main/java/org/onap/so/client/cds/CDSProcessingClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/cds/CDSProcessingHandler.java [moved from common/common/src/main/java/org/onap/so/client/cds/CDSProcessingHandler.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/cds/CDSProcessingListener.java [moved from common/common/src/main/java/org/onap/so/client/cds/CDSProcessingListener.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/cds/CDSProperties.java [moved from common/common/src/main/java/org/onap/so/client/cds/CDSProperties.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/defaultproperties/DefaultDmaapPropertiesImpl.java [moved from common/common/src/main/java/org/onap/so/client/defaultproperties/DefaultDmaapPropertiesImpl.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/defaultproperties/PolicyRestPropertiesImpl.java [moved from common/common/src/main/java/org/onap/so/client/defaultproperties/PolicyRestPropertiesImpl.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/Consumer.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/Consumer.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapClient.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/DmaapClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapConsumer.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/DmaapConsumer.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapProperties.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/DmaapProperties.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapPropertiesLoader.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/DmaapPropertiesLoader.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/DmaapPublisher.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/DmaapPublisher.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/Publisher.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/Publisher.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/exceptions/DMaaPConsumerFailure.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/exceptions/DMaaPConsumerFailure.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/exceptions/ExceededMaximumPollingTime.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/exceptions/ExceededMaximumPollingTime.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/rest/PropertiesBean.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/rest/PropertiesBean.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/rest/RestConsumer.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/rest/RestConsumer.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/dmaap/rest/RestPublisher.java [moved from common/common/src/main/java/org/onap/so/client/dmaap/rest/RestPublisher.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/exception/BadResponseException.java [moved from common/common/src/main/java/org/onap/so/client/exception/BadResponseException.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/exception/MapperException.java [moved from common/common/src/main/java/org/onap/so/client/exception/MapperException.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/exceptions/SDNOException.java [moved from common/common/src/main/java/org/onap/so/client/exceptions/SDNOException.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMAction.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMAction.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMClient.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMProperties.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMProperties.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMPropertiesLoader.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMPropertiesLoader.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMRestClient.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/GRMRestInvoker.java [moved from common/common/src/main/java/org/onap/so/client/grm/GRMRestInvoker.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/OperationalInfo.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/OperationalInfo.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/Property.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/Property.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/ServiceEndPoint.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/ServiceEndPoint.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointList.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointList.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointLookup.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointLookup.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointLookupRequest.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointLookupRequest.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointRequest.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/ServiceEndPointRequest.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/Status.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/Status.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/Version.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/Version.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/beans/VersionLookup.java [moved from common/common/src/main/java/org/onap/so/client/grm/beans/VersionLookup.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/grm/exceptions/GRMClientCallFailed.java [moved from common/common/src/main/java/org/onap/so/client/grm/exceptions/GRMClientCallFailed.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/kafka/KafkaClient.java [moved from common/common/src/main/java/org/onap/so/client/kafka/KafkaClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/kafka/KafkaConsumerImpl.java [moved from common/common/src/main/java/org/onap/so/client/kafka/KafkaConsumerImpl.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/DecisionAttributes.java [moved from common/common/src/main/java/org/onap/so/client/policy/DecisionAttributes.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/JettisonStyleMapperProvider.java [moved from common/common/src/main/java/org/onap/so/client/policy/JettisonStyleMapperProvider.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/PolicyClient.java [moved from common/common/src/main/java/org/onap/so/client/policy/PolicyClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java [moved from common/common/src/main/java/org/onap/so/client/policy/PolicyClientImpl.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/PolicyRestClient.java [moved from common/common/src/main/java/org/onap/so/client/policy/PolicyRestClient.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/PolicyRestProperties.java [moved from common/common/src/main/java/org/onap/so/client/policy/PolicyRestProperties.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/AllowedTreatments.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/AllowedTreatments.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Bbid.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Bbid.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Config.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Config.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/ConfigRequestParameters.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/ConfigRequestParameters.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Content.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Content.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/DecisionAttributes.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/DecisionAttributes.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/DictionaryData.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/DictionaryData.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/DictionaryItemsRequest.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/DictionaryItemsRequest.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/DictionaryJson.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/DictionaryJson.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/FabricConfigModel.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/FabricConfigModel.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Id.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Id.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/PolicyConfig.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/PolicyConfig.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/PolicyDecision.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/PolicyDecision.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/PolicyDecisionRequest.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/PolicyDecisionRequest.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/PolicyServiceType.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/PolicyServiceType.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Treatments.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Treatments.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/policy/entities/Workstep.java [moved from common/common/src/main/java/org/onap/so/client/policy/entities/Workstep.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java [moved from common/common/src/main/java/org/onap/so/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java with 100% similarity]
common/clients/src/main/java/org/onap/so/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java [moved from common/common/src/main/java/org/onap/so/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java with 100% similarity]
common/clients/src/main/resources/dmaap/default-consumer.properties [moved from common/common/src/main/resources/dmaap/default-consumer.properties with 100% similarity]
common/clients/src/main/resources/dmaap/default-publisher.properties [moved from common/common/src/main/resources/dmaap/default-publisher.properties with 100% similarity]
common/clients/src/main/resources/dmaap/empty.txt [moved from common/common/src/main/resources/dmaap/empty.txt with 100% similarity]
common/clients/src/main/resources/kafka/default-consumer.properties [moved from common/common/src/main/resources/kafka/default-consumer.properties with 100% similarity]
common/clients/src/test/java/org/onap/so/client/HttpClientTest.java [moved from common/common/src/test/java/org/onap/so/client/HttpClientTest.java with 96% similarity]
common/clients/src/test/java/org/onap/so/client/RestClientTest.java [moved from common/common/src/test/java/org/onap/so/client/RestClientTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/adapter/rest/AdapterRestClientTest.java [moved from common/common/src/test/java/org/onap/so/client/adapter/rest/AdapterRestClientTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/cds/CDSProcessingClientTest.java [moved from common/common/src/test/java/org/onap/so/client/cds/CDSProcessingClientTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/cds/TestCDSProcessingListener.java [moved from common/common/src/test/java/org/onap/so/client/cds/TestCDSProcessingListener.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/cds/TestCDSPropertiesImpl.java [moved from common/common/src/test/java/org/onap/so/client/cds/TestCDSPropertiesImpl.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java [moved from common/common/src/test/java/org/onap/so/client/dmaap/DmaapClientTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/dmaap/exceptions/DMaaPConsumerFailureTest.java [moved from common/common/src/test/java/org/onap/so/client/dmaap/exceptions/DMaaPConsumerFailureTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java [moved from common/common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/grm/GRMBeansTest.java [moved from common/common/src/test/java/org/onap/so/client/grm/GRMBeansTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/grm/ServiceEndPointListTest.java [moved from common/common/src/test/java/org/onap/so/client/grm/ServiceEndPointListTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/grm/ServiceEndPointRequestTest.java [moved from common/common/src/test/java/org/onap/so/client/grm/ServiceEndPointRequestTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/grm/exception/GRMClientCallFailedTest.java [moved from common/common/src/test/java/org/onap/so/client/grm/exception/GRMClientCallFailedTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/kafka/KafkaConsumerImplTest.java [moved from common/common/src/test/java/org/onap/so/client/kafka/KafkaConsumerImplTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java [moved from common/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/policy/entities/PolicyEntitiesTest.java [moved from common/common/src/test/java/org/onap/so/client/policy/entities/PolicyEntitiesTest.java with 100% similarity]
common/clients/src/test/java/org/onap/so/client/sdno/beans/SdnoBeansTest.java [moved from common/common/src/test/java/org/onap/so/client/sdno/beans/SdnoBeansTest.java with 100% similarity]
common/clients/src/test/resources/META-INF/services/org.onap.so.client.RestProperties [moved from common/common/src/test/resources/META-INF/services/org.onap.so.client.RestProperties with 100% similarity]
common/clients/src/test/resources/__files/Policy/configJson.json [moved from common/common/src/test/resources/__files/Policy/configJson.json with 100% similarity]
common/clients/src/test/resources/__files/Policy/policyAbortResponse.json [moved from common/common/src/test/resources/__files/Policy/policyAbortResponse.json with 100% similarity]
common/clients/src/test/resources/__files/Policy/policyConfig.json [moved from common/common/src/test/resources/__files/Policy/policyConfig.json with 100% similarity]
common/clients/src/test/resources/__files/Policy/policySkipResponse.json [moved from common/common/src/test/resources/__files/Policy/policySkipResponse.json with 100% similarity]
common/clients/src/test/resources/__files/grm/endpoints.json [moved from common/common/src/test/resources/__files/grm/endpoints.json with 100% similarity]
common/clients/src/test/resources/__files/grm/endpoints2.json [moved from common/common/src/test/resources/__files/grm/endpoints2.json with 100% similarity]
common/clients/src/test/resources/__files/logging/openstack-payload.json [moved from common/common/src/test/resources/__files/logging/openstack-payload.json with 100% similarity]
common/clients/src/test/resources/dmaap.properties [moved from common/common/src/test/resources/dmaap.properties with 100% similarity]
common/clients/src/test/resources/policy.properties [moved from common/common/src/test/resources/policy.properties with 100% similarity]
common/common/pom.xml
common/common/src/test/java/org/onap/so/BeansTest.java
common/common/src/test/java/org/onap/so/logging/TestAppender.java [moved from common/common/src/test/java/org/onap/so/utils/TestAppender.java with 97% similarity]
common/common/src/test/resources/application-test.yaml
common/common/src/test/resources/logback-test.xml
common/pom.xml
common/utils/pom.xml [new file with mode: 0644]
common/utils/src/main/java/org/onap/so/exceptions/MarshallerException.java [moved from common/common/src/main/java/org/onap/so/exceptions/MarshallerException.java with 100% similarity]
common/utils/src/main/java/org/onap/so/jsonpath/JsonPathUtil.java [moved from common/common/src/main/java/org/onap/so/jsonpath/JsonPathUtil.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/CheckResults.java [moved from common/common/src/main/java/org/onap/so/utils/CheckResults.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/Components.java [moved from common/common/src/main/java/org/onap/so/utils/Components.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/CryptoUtils.java [moved from common/common/src/main/java/org/onap/so/utils/CryptoUtils.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java [moved from common/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/ExternalTaskUtils.java [moved from common/common/src/main/java/org/onap/so/utils/ExternalTaskUtils.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/RetrySequenceLevel.java [moved from common/common/src/main/java/org/onap/so/utils/RetrySequenceLevel.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/UUIDChecker.java [moved from common/common/src/main/java/org/onap/so/utils/UUIDChecker.java with 100% similarity]
common/utils/src/main/java/org/onap/so/utils/XmlMarshaller.java [moved from common/common/src/main/java/org/onap/so/utils/XmlMarshaller.java with 100% similarity]
common/utils/src/test/java/org/onap/so/jsonpath/JsonPathUtilTest.java [moved from common/common/src/test/java/org/onap/so/jsonpath/JsonPathUtilTest.java with 100% similarity]
common/utils/src/test/java/org/onap/so/utils/CheckResultsTest.java [moved from common/common/src/test/java/org/onap/so/utils/CheckResultsTest.java with 100% similarity]
common/utils/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java [moved from common/common/src/test/java/org/onap/so/utils/ExternalTaskServiceUtilsTest.java with 100% similarity]
common/utils/src/test/java/org/onap/so/utils/ExternalTaskUtilsTest.java [moved from common/common/src/test/java/org/onap/so/utils/ExternalTaskUtilsTest.java with 100% similarity]
common/utils/src/test/java/org/onap/so/utils/UUIDCheckerTest.java [moved from common/common/src/test/java/org/onap/so/utils/UUIDCheckerTest.java with 100% similarity]
common/utils/src/test/java/org/onap/so/utils/XMLMarshallerTest.java [moved from common/common/src/test/java/org/onap/so/utils/XMLMarshallerTest.java with 100% similarity]
pom.xml
so-sdn-clients/src/test/java/org/onap/so/client/sdno/BeansTest.java [new file with mode: 0644]

index 44be628..3b9cf68 100644 (file)
   <properties>
   </properties>
   <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.onap.so</groupId>
       <artifactId>logger</artifactId>
index 84a8bb9..ba599a3 100644 (file)
@@ -30,7 +30,7 @@ public class HttpClientFactory {
     }
 
     public HttpClient newXmlClient(URL host, ONAPComponentsList targetEntity) {
-        return new HttpClient(host, MediaType.APPLICATION_XML, targetEntity);
+        return new HttpClient(host, MediaType.APPLICATION_XML, MediaType.APPLICATION_XML, targetEntity);
     }
 
     public HttpClient newTextXmlClient(URL host, ONAPComponentsList targetEntity) {
diff --git a/common/clients/pom.xml b/common/clients/pom.xml
new file mode 100644 (file)
index 0000000..955a049
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.so</groupId>
+        <artifactId>common</artifactId>
+        <version>1.16.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.onap.so.common</groupId>
+    <artifactId>clients</artifactId>
+
+    <properties>
+        <ccsdk.version>1.1.5</ccsdk.version>
+        <protobuf.version>3.22.2</protobuf.version>
+        <grpc.netty.version>4.1.30.Final</grpc.netty.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.so</groupId>
+            <artifactId>utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.so</groupId>
+            <artifactId>clients-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.inject</groupId>
+            <artifactId>jersey-hk2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+            <artifactId>blueprint-proto</artifactId>
+            <version>${ccsdk.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.springfox</groupId>
+                    <artifactId>springfox-boot-starter</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.kafka</groupId>
+                    <artifactId>kafka-clients</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-protobuf</artifactId>
+            <version>${grpc.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.google.code.findbugs</groupId>
+                    <artifactId>jsr305</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty</artifactId>
+            <version>${grpc.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka-clients</artifactId>
+            <version>${kafka-clients.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>uk.org.webcompere</groupId>
+            <artifactId>system-stubs-jupiter</artifactId>
+            <version>1.1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-testing</artifactId>
+            <version>${grpc.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
@@ -7,9 +7,9 @@
  * 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.
@@ -70,7 +70,7 @@ public class HttpClientTest {
         URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
 
-        client.addAdditionalHeader("Accept", "application/json");
+        // client.addAdditionalHeader("Accept", "application/json");
         client.addAdditionalHeader("id", null);
 
         client.post("{}");
@@ -89,7 +89,6 @@ public class HttpClientTest {
         HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
 
         client.addBasicAuthHeader("", "12345");
-        client.addAdditionalHeader("Accept", "application/json");
 
         client.post("{}");
 
@@ -125,7 +124,6 @@ public class HttpClientTest {
         URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newXmlClient(url, ONAPComponents.BPMN);
 
-        client.accept = "application/xml";
         client.addAdditionalHeader("id", null);
 
         client.post("{}");
@@ -180,7 +178,7 @@ public class HttpClientTest {
         URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
         HttpClient client = httpClientFactory.newTextXmlClient(url, ONAPComponents.BPMN);
 
-        client.addAdditionalHeader("Accept", "text/xml");
+        // client.addAdditionalHeader("Accept", "text/xml");
         client.addAdditionalHeader("id", null);
 
         client.post("{}");
@@ -199,7 +197,7 @@ public class HttpClientTest {
         HttpClient client = httpClientFactory.newTextXmlClient(url, ONAPComponents.BPMN);
 
         client.addBasicAuthHeader("", "12345");
-        client.addAdditionalHeader("Accept", "text/xml");
+        // client.addAdditionalHeader("Accept", "text/xml");
 
         client.post("{}");
 
index 718bfae..1490074 100644 (file)
   <name>common</name>
   <description>MSO Common classes:- Logger</description>
   <properties>
-    <protobuf.version>3.22.2</protobuf.version>
-    <grpc.netty.version>4.1.30.Final</grpc.netty.version>
-    <ccsdk.version>1.1.5</ccsdk.version>
     <tomcat-catalina-version>9.0.105</tomcat-catalina-version>
     <logback.version>1.2.13</logback.version>
   </properties>
   <dependencies>
     <dependency>
       <groupId>org.onap.so</groupId>
-      <artifactId>logger</artifactId>
+      <artifactId>utils</artifactId>
       <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>org.onap.so</groupId>
-      <artifactId>clients-base</artifactId>
+      <artifactId>logger</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.so.common</groupId>
+      <artifactId>clients</artifactId>
       <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-actuator</artifactId>
     </dependency>
-    <dependency>
-      <groupId>com.jayway.jsonpath</groupId>
-      <artifactId>json-path</artifactId>
-      <version>2.5.0</version>
-    </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-core</artifactId>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webmvc</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-sleuth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-sleuth-zipkin</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.modelmapper</groupId>
       <artifactId>modelmapper</artifactId>
       <groupId>com.zaxxer</groupId>
       <artifactId>HikariCP</artifactId>
     </dependency>
-    <!-- CDS dependencies -->
-    <dependency>
-      <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
-      <artifactId>blueprint-proto</artifactId>
-      <version>${ccsdk.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>io.springfox</groupId>
-          <artifactId>springfox-boot-starter</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.kafka</groupId>
-          <artifactId>kafka-clients</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <!-- protobuf dependencies -->
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>${protobuf.version}</version>
-    </dependency>
-
-    <!-- gRPC dependencies -->
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-protobuf</artifactId>
-      <version>${grpc.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>com.google.code.findbugs</groupId>
-          <artifactId>jsr305</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-netty</artifactId>
-      <version>${grpc.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-testing</artifactId>
-      <version>${grpc.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.camunda.bpm</groupId>
-      <artifactId>camunda-external-task-client</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.onap.appc.client</groupId>
       <artifactId>client-lib</artifactId>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>com.sun.xml.bind</groupId>
-      <artifactId>jaxb-core</artifactId>
-      <version>2.3.0</version>
-    </dependency>
-    <dependency>
-      <groupId>com.sun.xml.bind</groupId>
-      <artifactId>jaxb-impl</artifactId>
-      <version>2.3.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.cloud</groupId>
-      <artifactId>spring-cloud-starter-sleuth</artifactId>
-    </dependency>
-    <!-- kafka dependency -->
-    <dependency>
-      <groupId>org.apache.kafka</groupId>
-      <artifactId>kafka-clients</artifactId>
-      <version>${kafka-clients.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>uk.org.webcompere</groupId>
-      <artifactId>system-stubs-jupiter</artifactId>
-      <version>1.1.0</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-engine</artifactId>
             <systemPropertyVariables>
               <so.log.level>DEBUG</so.log.level>
             </systemPropertyVariables>
-            <rerunFailingTestsCount>2</rerunFailingTestsCount>
             <parallel>suites</parallel>
             <useUnlimitedThreads>false</useUnlimitedThreads>
             <threadCount>1</threadCount>
index 01bdc4d..f0fbe7e 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
@@ -63,7 +63,6 @@ public class BeansTest {
         test("org.onap.so.appc.orchestrator.service.beans");
         test("org.onap.so.client.policy.entities");
         test("org.onap.so.client.grm.beans");
-        test("org.onap.so.client.sdno.beans");
         test("org.onap.so.entity");
         test("org.onap.so.serviceinstancebeans");
     }
@@ -7,9 +7,9 @@
  * 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.
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.utils;
+package org.onap.so.logging;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.spi.ILoggingEvent;
index 1a3e97c..084cb28 100644 (file)
@@ -1,4 +1,7 @@
 org:
   onap:
     so:
-      cloud-owner: my-custom-owner
\ No newline at end of file
+      cloud-owner: my-custom-owner
+spring:
+  sleuth:
+    enabled: false
index d0714bb..a039f5e 100644 (file)
@@ -7,9 +7,9 @@
   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.
@@ -37,7 +37,7 @@
     </encoder>
   </appender>
 
-  <appender name="test" class="org.onap.so.utils.TestAppender" />
+  <appender name="test" class="org.onap.so.logging.TestAppender" />
 
   <logger name="com.att.ecomp.audit" level="info" additivity="false">
     <appender-ref ref="STDOUT" />
@@ -68,7 +68,7 @@
   <logger name="org.reflections" level="ERROR" additivity="false">
     <appender-ref ref="STDOUT" />
   </logger>
-  
+
   <logger name="org.reflections" level="ERROR" />
 
   <root level="WARN">
@@ -77,4 +77,4 @@
   </root>
 
 
-</configuration>
\ No newline at end of file
+</configuration>
index 7ee498c..fa036bb 100644 (file)
@@ -9,8 +9,10 @@
   <artifactId>common</artifactId>
   <packaging>pom</packaging>
   <modules>
+    <module>utils</module>
     <module>logger</module>
     <module>clients-base</module>
+    <module>clients</module>
     <module>common</module>
   </modules>
 </project>
diff --git a/common/utils/pom.xml b/common/utils/pom.xml
new file mode 100644 (file)
index 0000000..cfa5e5b
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.so</groupId>
+        <artifactId>common</artifactId>
+        <version>1.16.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>utils</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.so</groupId>
+            <artifactId>logger</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path</artifactId>
+            <version>2.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.camunda.bpm</groupId>
+            <artifactId>camunda-external-task-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/pom.xml b/pom.xml
index 4a003a6..ceebfe3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <version>2.4</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.springframework.cloud</groupId>
-      <artifactId>spring-cloud-starter-sleuth</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.cloud</groupId>
-      <artifactId>spring-cloud-sleuth-zipkin</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.projectlombok</groupId>
       <artifactId>lombok</artifactId>
diff --git a/so-sdn-clients/src/test/java/org/onap/so/client/sdno/BeansTest.java b/so-sdn-clients/src/test/java/org/onap/so/client/sdno/BeansTest.java
new file mode 100644 (file)
index 0000000..d1d7046
--- /dev/null
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.client.sdno;
+
+import org.junit.Test;
+import com.openpojo.reflection.PojoClass;
+import com.openpojo.reflection.PojoClassFilter;
+import com.openpojo.reflection.filters.FilterEnum;
+import com.openpojo.reflection.filters.FilterNonConcrete;
+import com.openpojo.reflection.filters.FilterPackageInfo;
+import com.openpojo.validation.Validator;
+import com.openpojo.validation.ValidatorBuilder;
+import com.openpojo.validation.rule.impl.GetterMustExistRule;
+import com.openpojo.validation.rule.impl.NoNestedClassRule;
+import com.openpojo.validation.rule.impl.NoPublicFieldsExceptStaticFinalRule;
+import com.openpojo.validation.rule.impl.NoStaticExceptFinalRule;
+import com.openpojo.validation.rule.impl.SerializableMustHaveSerialVersionUIDRule;
+import com.openpojo.validation.test.impl.GetterTester;
+import com.openpojo.validation.test.impl.SetterTester;
+
+
+public class BeansTest {
+
+    private PojoClassFilter filterTestClasses = new FilterTestClasses();
+
+    private PojoClassFilter enumFilter = new FilterEnum();
+
+
+
+    @Test
+    public void pojoStructure() {
+        test("org.onap.so.client.sdno.beans");
+    }
+
+    private void test(String pojoPackage) {
+        Validator validator = ValidatorBuilder.create().with(new GetterMustExistRule()).with(new NoNestedClassRule())
+                .with(new NoStaticExceptFinalRule()).with(new SerializableMustHaveSerialVersionUIDRule())
+                .with(new NoPublicFieldsExceptStaticFinalRule()).with(new SetterTester()).with(new GetterTester())
+                .build();
+
+
+        validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, enumFilter,
+                new FilterNonConcrete());
+    }
+
+    private static class FilterTestClasses implements PojoClassFilter {
+        public boolean include(PojoClass pojoClass) {
+            return !pojoClass.getSourcePath().contains("/test-classes/");
+        }
+    }
+}