aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java9
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml5
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml5
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java4
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java4
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java4
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java23
7 files changed, 37 insertions, 17 deletions
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
index b3b22e239d..9e08cda354 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
@@ -32,13 +32,15 @@ public class AaiPropertiesImpl implements AAIProperties {
private final String endpoint;
private final String encryptedBasicAuth;
private final String encrytptionKey;
+ private final String aaiVersion;
public AaiPropertiesImpl() {
-
final ApplicationContext context = SpringContextHelper.getAppContext();
this.endpoint = context.getEnvironment().getProperty("aai.endpoint");
this.encryptedBasicAuth = context.getEnvironment().getProperty("aai.auth");
this.encrytptionKey = context.getEnvironment().getProperty("mso.key");
+ this.aaiVersion = context.getEnvironment().getProperty("aai.version");
+
}
@Override
@@ -53,6 +55,11 @@ public class AaiPropertiesImpl implements AAIProperties {
@Override
public AAIVersion getDefaultVersion() {
+ for (final AAIVersion version : AAIVersion.values()) {
+ if (version.toString().equalsIgnoreCase(this.aaiVersion)) {
+ return version;
+ }
+ }
return AAIVersion.LATEST;
}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml
index 8d79aff29d..aaf4949144 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml
@@ -187,10 +187,5 @@
<artifactId>okhttp</artifactId>
<version>${okhttp-version}</version>
</dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
</dependencies>
</project>
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml
index f34fb61802..6554da3409 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml
@@ -187,11 +187,6 @@
<artifactId>okhttp</artifactId>
<version>${okhttp-version}</version>
</dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
</dependencies>
</project>
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
index 442339d9fe..b972517338 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
@@ -59,8 +59,8 @@ public class AaiServiceProviderImpl implements AaiServiceProvider {
public EsrSystemInfoList invokeGetThirdPartySdncEsrSystemInfo(String sdncId) {
return aaiClientProvider.getAaiClient()
.get(EsrSystemInfoList.class,
- AAIUriFactory
- .createResourceUri(AAIFluentTypeBuilder.externalSystem().esrThirdpartySdnc((sdncId))))
+ AAIUriFactory.createResourceUri(
+ AAIFluentTypeBuilder.externalSystem().esrThirdpartySdnc((sdncId)).esrSystemInfoList()))
.orElseGet(() -> {
logger.debug("VNFM not found in AAI");
return null;
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
index 97a4c5e889..2ccd88a358 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
@@ -141,7 +141,9 @@ public abstract class BaseNssmfManager implements NssmfManager {
public RestResponse queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) throws ApplicationException {
this.params.clear();
this.params.put("jobId", jobId);
- this.params.put("responseId", jobReq.getResponseId());
+ if (jobReq.getResponseId() != null) {
+ this.params.put("responseId", jobReq.getResponseId());
+ }
this.urlHandler();
/**
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
index d8a9088a42..0d0d896370 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
@@ -127,8 +127,8 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
return restUtil.send(nssmfUrl, this.httpMethod, content, header);
}
- private void updateRequestDbJobStatus(ResponseDescriptor rspDesc, ResourceOperationStatus status, RestResponse rsp)
- throws ApplicationException {
+ protected void updateRequestDbJobStatus(ResponseDescriptor rspDesc, ResourceOperationStatus status,
+ RestResponse rsp) throws ApplicationException {
switch (fromString(rspDesc.getStatus())) {
case STARTED:
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
index bc7a3d0bb7..491da0aab4 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
@@ -30,6 +30,8 @@ import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
import org.onap.so.beans.nsmf.DeAllocateNssi;
import org.onap.so.beans.nsmf.NssiResponse;
import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest;
+import org.onap.so.beans.nsmf.ResponseDescriptor;
+import org.onap.so.beans.nsmf.JobStatusResponse;
import org.onap.so.db.request.beans.ResourceOperationStatus;
import java.util.HashMap;
import java.util.Map;
@@ -72,7 +74,7 @@ public class ExternalAnNssmfManager extends ExternalNssmfManager {
restResponse = returnRsp;
ResourceOperationStatus status =
- new ResourceOperationStatus(serviceInfo.getNsiId(), nssiId, serviceInfo.getServiceUuid());
+ new ResourceOperationStatus(serviceInfo.getNsiId(), resp.getJobId(), serviceInfo.getServiceUuid());
status.setResourceInstanceID(nssiId);
updateDbStatus(status, restResponse.getStatus(), JobStatus.FINISHED,
@@ -111,6 +113,25 @@ public class ExternalAnNssmfManager extends ExternalNssmfManager {
}
@Override
+ protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
+ ResponseDescriptor responseDescriptor = new ResponseDescriptor();
+ responseDescriptor.setStatus(JobStatus.FINISHED.toString());
+ responseDescriptor.setProgress(100);
+ responseDescriptor.setStatusDescription("Finished");
+
+ JobStatusResponse jobStatusResponse = new JobStatusResponse();
+ jobStatusResponse.setResponseDescriptor(responseDescriptor);
+
+ RestResponse restResponse = new RestResponse();
+ restResponse.setStatus(200);
+ restResponse.setResponseContent(marshal(jobStatusResponse));
+
+ updateRequestDbJobStatus(responseDescriptor, status, restResponse);
+
+ return restResponse;
+ }
+
+ @Override
protected SelectionType doQueryNSSISelectionCapability() {
return SelectionType.NSSMF;
}