aboutsummaryrefslogtreecommitdiffstats
path: root/rest-services/aai-client/src/main
diff options
context:
space:
mode:
authorkurczews <krzysztof.kurczewski@nokia.com>2019-06-10 14:39:01 +0200
committerkurczews <krzysztof.kurczewski@nokia.com>2019-06-11 07:13:31 +0200
commitf13bb478e0b79db83dcf6f8e5e67ff4c815c0610 (patch)
treea09a4dbc30b8beeff0b27e6c3fa99ae6eb4f7abe /rest-services/aai-client/src/main
parent13cc0bf2987cd12bccf131fd99019d8e16c6c07d (diff)
Deprecate AAI pnfUrl
Issue-ID: DCAEGEN2-1608 Change-Id: I4efdcdcde4e3905e369cec171bcd7e629e1b7bee Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
Diffstat (limited to 'rest-services/aai-client/src/main')
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/config/AaiClientConfiguration.java36
1 files changed, 27 insertions, 9 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 00d323cc..ff74f9b7 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
@@ -20,22 +20,35 @@
package org.onap.dcaegen2.services.sdk.rest.services.aai.client.config;
-import org.immutables.gson.Gson;
-import org.immutables.value.Value;
-
import java.io.Serializable;
import java.util.Map;
-
+import org.immutables.gson.Gson;
+import org.immutables.value.Value;
@Value.Immutable(prehash = true)
@Value.Style(builder = "new")
@Gson.TypeAdapters
public abstract class AaiClientConfiguration implements Serializable {
+ private static final String PNF_PATH = "/network/pnfs/pnf";
+ private static final String SERVICE_INSTANCE_PATH = "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}";
+
private static final long serialVersionUID = 1L;
@Value.Parameter
- public abstract String pnfUrl();
+ @Value.Default
+ public String baseUrl() {
+ return "";
+ }
+
+ /**
+ * Please use baseUrl() instead
+ */
+ @Deprecated
+ @Value.Default
+ public String pnfUrl() {
+ return baseUrl() + PNF_PATH;
+ }
@Value.Parameter
public abstract String aaiUserName();
@@ -46,8 +59,14 @@ public abstract class AaiClientConfiguration implements Serializable {
@Value.Parameter
public abstract Boolean aaiIgnoreSslCertificateErrors();
- @Value.Parameter
- public abstract String aaiServiceInstancePath();
+ /**
+ * Please use baseUrl() instead
+ */
+ @Deprecated
+ @Value.Default
+ public String aaiServiceInstancePath() {
+ return SERVICE_INSTANCE_PATH;
+ }
@Value.Parameter
public abstract Map<String, String> aaiHeaders();
@@ -66,5 +85,4 @@ public abstract class AaiClientConfiguration implements Serializable {
@Value.Parameter
public abstract Boolean enableAaiCertAuth();
-
-}
+} \ No newline at end of file