diff options
Diffstat (limited to 'src/main')
3 files changed, 31 insertions, 20 deletions
diff --git a/src/main/java/org/onap/ves/openapi/manager/Main.java b/src/main/java/org/onap/ves/openapi/manager/Main.java index 209c05b..735c8e0 100644 --- a/src/main/java/org/onap/ves/openapi/manager/Main.java +++ b/src/main/java/org/onap/ves/openapi/manager/Main.java @@ -3,6 +3,7 @@ * VES-OPENAPI-MANAGER * ================================================================================ * Copyright (C) 2021 Nokia. All rights reserved. + * Copyright © 2022 Nordix Foundation. 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. @@ -20,11 +21,12 @@ package org.onap.ves.openapi.manager; +import java.util.List; import lombok.extern.log4j.Log4j2; import org.onap.sdc.api.results.IDistributionClientResult; -import org.onap.sdc.http.HttpAsdcClient; import org.onap.sdc.http.HttpClientFactory; import org.onap.sdc.http.HttpRequestFactory; +import org.onap.sdc.http.HttpSdcClient; import org.onap.sdc.http.SdcConnectorClient; import org.onap.sdc.impl.DistributionClientImpl; import org.onap.ves.openapi.manager.config.DistributionClientConfig; @@ -39,8 +41,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Bean; -import java.util.List; - @Log4j2 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class Main { @@ -58,7 +58,7 @@ public class Main { public SdcConnectorClient getSdcConnectorClient(DistributionClientConfig clientConfig) { HttpRequestFactory requestFactory = new HttpRequestFactory(clientConfig.getUser(), clientConfig.getPassword()); HttpClientFactory clientFactory = new HttpClientFactory(clientConfig); - return new SdcConnectorClient(clientConfig, new HttpAsdcClient(clientConfig.getAsdcAddress(), clientFactory, requestFactory)); + return new SdcConnectorClient(clientConfig, new HttpSdcClient(clientConfig.getSdcAddress(), clientFactory, requestFactory)); } /** diff --git a/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java b/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java index 188cced..bc51801 100644 --- a/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java +++ b/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java @@ -3,6 +3,7 @@ * VES-OPENAPI-MANAGER * ================================================================================ * Copyright (C) 2021 Nokia. All rights reserved. + * Copyright © 2022 Nordix Foundation. 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. @@ -40,8 +41,7 @@ public class DistributionClientConfig implements IConfiguration { public static final String VES_EVENTS_ARTIFACT_TYPE = "VES_EVENTS"; - private String asdcAddress; - private String msgBusAddress; + private String sdcAddress; private String user; private String password; private Integer pollingInterval; @@ -51,16 +51,14 @@ public class DistributionClientConfig implements IConfiguration { private String consumerID; private Boolean activateServerTLSAuth; private Boolean isFilterInEmptyResources; - private Boolean isUseHttpsWithDmaap; + private String httpProxyHost; + private int httpProxyPort; + private String httpsProxyHost; + private int httpsProxyPort; @Override - public String getAsdcAddress() { - return asdcAddress; - } - - @Override - public List<String> getMsgBusAddress() { - return Collections.singletonList(msgBusAddress); + public String getSdcAddress() { + return sdcAddress; } @Override @@ -124,7 +122,22 @@ public class DistributionClientConfig implements IConfiguration { } @Override - public Boolean isUseHttpsWithDmaap() { - return isUseHttpsWithDmaap; + public String getHttpProxyHost() { + return httpProxyHost; + } + + @Override + public int getHttpProxyPort() { + return httpProxyPort; + } + + @Override + public String getHttpsProxyHost() { + return httpsProxyHost; + } + + @Override + public int getHttpsProxyPort() { + return httpsProxyPort; } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f179544..0ff3f4e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -4,17 +4,15 @@ vesopenapimanager: eventDomainPath: /event/structure/commonEventHeader/structure/domain/value eventSchemaReferencePath: /event/structure/stndDefinedFields/structure/schemaReference/value distribution: - asdcAddress: ${ASDC_ADDRESS:sdc-be.onap:30204} - msgBusAddress: message-router.onap + sdcAddress: ${SDC_ADDRESS:sdc-be.onap:30204} user: dcae password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U pollingInterval: 20 pollingTimeout: 20 - consumerGroup: ves-openapi-manager + consumerGroup: dcaegen2 environmentName: AUTO consumerID: ves-openapi-manager activateServerTLSAuth: false isFilterInEmptyResources: false - isUseHttpsWithDmaap: false |