diff options
Diffstat (limited to 'prh-app-server/src/main')
2 files changed, 6 insertions, 17 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java index 51d86399..63947fa9 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java @@ -82,16 +82,11 @@ class CbsContentParser { AaiClientConfiguration getAaiClientConfig() { return new ImmutableAaiClientConfiguration.Builder() .pnfUrl(jsonObject.get("aai.aaiClientConfiguration.pnfUrl").getAsString()) - .aaiHost(jsonObject.get("aai.aaiClientConfiguration.aaiHost").getAsString()) - .aaiPort(jsonObject.get("aai.aaiClientConfiguration.aaiHostPortNumber").getAsInt()) .aaiUserName(jsonObject.get("aai.aaiClientConfiguration.aaiUserName").getAsString()) - .aaiPnfPath(jsonObject.get("aai.aaiClientConfiguration.aaiPnfPath").getAsString()) .aaiServiceInstancePath(jsonObject.get("aai.aaiClientConfiguration.aaiServiceInstancePath").getAsString()) .aaiIgnoreSslCertificateErrors( jsonObject.get("aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors").getAsBoolean()) .aaiUserPassword(jsonObject.get("aai.aaiClientConfiguration.aaiUserPassword").getAsString()) - .aaiProtocol(jsonObject.get("aai.aaiClientConfiguration.aaiProtocol").getAsString()) - .aaiBasePath(jsonObject.get("aai.aaiClientConfiguration.aaiBasePath").getAsString()) .trustStorePath(jsonObject.get(SECURITY_TRUST_STORE_PATH).getAsString()) .trustStorePasswordPath(jsonObject.get(SECURITY_TRUST_STORE_PASS_PATH).getAsString()) .keyStorePath(jsonObject.get(SECURITY_KEY_STORE_PATH).getAsString()) diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java index a0d844b1..ba0ed2a7 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskImpl.java @@ -33,7 +33,6 @@ import org.onap.dcaegen2.services.prh.model.bbs.RelationshipWrapper; import org.onap.dcaegen2.services.prh.model.utils.HttpUtils; import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.*; -import org.onap.dcaegen2.services.sdk.rest.services.uri.URI.URIBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -51,8 +50,8 @@ public class BbsActionsTaskImpl implements BbsActionsTask { private static final Logger LOGGER = LoggerFactory.getLogger(BbsActionsTaskImpl.class); private static final String ATTACHMENT_POINT = "attachmentPoint"; - private static final String LOGICAL_LINK_URI = "/network/logical-links/logical-link/"; - private static final String PNF_URI = "/network/pnfs/pnf/"; + private static final String LOGICAL_LINK_URI = "/network/logical-links/logical-link"; + private static final String PNF_URI = "/network/pnfs/pnf"; private final Config config; private final RxHttpClient httpClient; @@ -130,18 +129,13 @@ public class BbsActionsTaskImpl implements BbsActionsTask { .builder() .relationship(ImmutableRelationship .builder() - .relatedLink(PNF_URI + pnfName) + .relatedLink(PNF_URI + "/" + pnfName) .build()) .build()); } private String buildLogicalLinkUri(String linkName) { - return new URIBuilder() - .scheme(config.getAaiClientConfiguration().aaiProtocol()) - .host(config.getAaiClientConfiguration().aaiHost()) - .port(config.getAaiClientConfiguration().aaiPort()) - .path(config.getAaiClientConfiguration().aaiBasePath() + LOGICAL_LINK_URI + linkName) - .build() - .toString(); + return config.getAaiClientConfiguration().pnfUrl().replace(PNF_URI, LOGICAL_LINK_URI) + "/" + linkName; } -}
\ No newline at end of file +} + |