aboutsummaryrefslogtreecommitdiffstats
path: root/rest-services/aai-client/src/main/java
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2019-05-27 11:20:22 +0200
committerpwielebs <piotr.wielebski@nokia.com>2019-05-27 13:44:00 +0200
commit6ef3cb626cdf753b15cf91b88bf8304b7ea7a812 (patch)
tree64437810b708ee1b63337c5c59ddb3eecb31b588 /rest-services/aai-client/src/main/java
parent2668ca2fd0029fe0946f8148882f93c3bfaab466 (diff)
Refactor of AAI model
Unused fields removed from AAI model in SDK Change-Id: Ie46c98edd2ccbcff146b210c715f472d15e26bef Issue-ID: DCAEGEN2-1533 Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
Diffstat (limited to 'rest-services/aai-client/src/main/java')
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java25
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiGetServiceInstanceClient.java10
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java8
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java7
4 files changed, 6 insertions, 44 deletions
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java
index fad3cb60..00d323cc 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java
@@ -37,23 +37,6 @@ public abstract class AaiClientConfiguration implements Serializable {
@Value.Parameter
public abstract String pnfUrl();
- /**
- Due to changes in the aai client configuration json old parameters:
- aaiHost, aaiProtocol, aaiPort, aaiBasePath, aaiPnfPath
- will be replaced by pnfUrl
- */
- @Deprecated
- @Value.Parameter
- public abstract String aaiHost();
-
- @Deprecated
- @Value.Parameter
- public abstract Integer aaiPort();
-
- @Deprecated
- @Value.Parameter
- public abstract String aaiProtocol();
-
@Value.Parameter
public abstract String aaiUserName();
@@ -63,14 +46,6 @@ public abstract class AaiClientConfiguration implements Serializable {
@Value.Parameter
public abstract Boolean aaiIgnoreSslCertificateErrors();
- @Deprecated
- @Value.Parameter
- public abstract String aaiBasePath();
-
- @Deprecated
- @Value.Parameter
- public abstract String aaiPnfPath();
-
@Value.Parameter
public abstract String aaiServiceInstancePath();
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiGetServiceInstanceClient.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiGetServiceInstanceClient.java
index 30e28a47..9c9b9fed 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiGetServiceInstanceClient.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiGetServiceInstanceClient.java
@@ -46,7 +46,7 @@ public class AaiGetServiceInstanceClient implements
private final RxHttpClient httpClient;
private final AaiClientConfiguration configuration;
- public AaiGetServiceInstanceClient(final AaiClientConfiguration configuration,
+ AaiGetServiceInstanceClient(final AaiClientConfiguration configuration,
final RxHttpClient httpClient) {
this.configuration = configuration;
this.httpClient = httpClient;
@@ -69,12 +69,6 @@ public class AaiGetServiceInstanceClient implements
}
private String getUri(final String endpoint) {
- return new URI.URIBuilder()
- .scheme(configuration.aaiProtocol())
- .host(configuration.aaiHost())
- .port(configuration.aaiPort())
- .path(configuration.aaiBasePath() + "/" + endpoint)
- .build()
- .toString();
+ return new URI.URIBuilder().path(configuration.pnfUrl() + "/" + endpoint).build().toString();
}
}
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
index d78953da..9c059a99 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
@@ -38,7 +38,7 @@ public final class AaiHttpGetClient implements AaiHttpClient<AaiModel, HttpRespo
private final AaiClientConfiguration configuration;
- public AaiHttpGetClient(AaiClientConfiguration configuration, RxHttpClient httpClient) {
+ AaiHttpGetClient(AaiClientConfiguration configuration, RxHttpClient httpClient) {
this.configuration = configuration;
this.httpClient = httpClient;
}
@@ -53,10 +53,6 @@ public final class AaiHttpGetClient implements AaiHttpClient<AaiModel, HttpRespo
private String getUri(String pnfName) {
- return new URI.URIBuilder()
- .scheme(configuration.aaiProtocol())
- .host(configuration.aaiHost())
- .port(configuration.aaiPort())
- .path(configuration.aaiBasePath() + configuration.aaiPnfPath() + "/" + pnfName).build().toString();
+ return new URI.URIBuilder().path(configuration.pnfUrl() + "/" + pnfName).build().toString();
}
}
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
index 4d0af7ea..f1629999 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
@@ -44,7 +44,7 @@ public final class AaiHttpPatchClient implements AaiHttpClient<AaiModel, HttpRes
private final JsonBodyBuilder jsonBodyBuilder;
- public AaiHttpPatchClient(final AaiClientConfiguration configuration, JsonBodyBuilder jsonBodyBuilder,
+ AaiHttpPatchClient(final AaiClientConfiguration configuration, JsonBodyBuilder jsonBodyBuilder,
RxHttpClient httpClient) {
this.configuration = configuration;
this.jsonBodyBuilder = jsonBodyBuilder;
@@ -66,9 +66,6 @@ public final class AaiHttpPatchClient implements AaiHttpClient<AaiModel, HttpRes
private String getUri(String pnfName) {
return new URI.URIBuilder()
- .scheme(configuration.aaiProtocol())
- .host(configuration.aaiHost())
- .port(configuration.aaiPort())
- .path(configuration.aaiBasePath() + configuration.aaiPnfPath() + "/" + pnfName).build().toString();
+ .path(configuration.pnfUrl() + "/" + pnfName).build().toString();
}
}