summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java4
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java5
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java4
-rw-r--r--so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java2
4 files changed, 11 insertions, 4 deletions
diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
index 98a5a19..31dddd0 100644
--- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
+++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
@@ -88,6 +88,8 @@ public class NssmfAdapterConsts {
private final static String EXTERNAL_AN_MODIFY_URL =
"/api/rest/provMns/{apiVersion}/an/NSS/SliceProfiles/{SliceProfileId}";
+ private final static String EXTERNAL_CN_MODIFY_URL = "/api/rest/provMns/{apiVersion}/NSS/nssi/{nssiId}";
+
private final static String INTERNAL_MODIFY_URL = "/onap/so/infra/3gppservices/{apiVersion}/modify";
//
@@ -145,7 +147,7 @@ public class NssmfAdapterConsts {
urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.MODIFY),
new NssmfUrlInfo(EXTERNAL_AN_MODIFY_URL, HttpMethod.PUT));
urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.MODIFY),
- new NssmfUrlInfo(EXTERNAL_CN_ALLOCATE_URL, HttpMethod.PUT));
+ new NssmfUrlInfo(EXTERNAL_CN_MODIFY_URL, HttpMethod.PUT));
urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.MODIFY),
new NssmfUrlInfo(INTERNAL_MODIFY_URL, HttpMethod.PUT));
diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
index 52da027..3b75d22 100644
--- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
+++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
@@ -87,6 +87,11 @@ public abstract class BaseNssmfManager implements NssmfManager {
@Override
public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
this.params.clear();
+ if(this.esrInfo.getNetworkType().equals(NetworkType.CORE))
+ {
+ //this.params.put("sliceProfileId", modifyRequest.getAllocateCnNssi().getSliceProfile().getSliceProfileId());
+ this.params.put("nssiId", modifyRequest.getAllocateCnNssi().getNssiId());
+ }
this.urlHandler();
String requestBody = wrapModifyReqBody(modifyRequest);
diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
index 2c51cef..a9ff249 100644
--- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
+++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
@@ -95,6 +95,7 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
nssiInstance.setModelVersionId(serviceInfo.getServiceUuid());
nssiInstance.setServiceInstanceLocationId(serviceInfo.getPLMNIdList());
nssiInstance.setEnvironmentContext(esrInfo.getNetworkType().getNetworkType());
+ nssiInstance.setWorkloadContext(esrInfo.getNetworkType().getNetworkType().toUpperCase()); //Subnet Type
nssiInstance.setServiceRole("nssi");
restUtil.createServiceInstance(nssiInstance, serviceInfo);
@@ -120,7 +121,6 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
JobStatusResponse jobStatusResponse = unMarshal(restResponse.getResponseContent(), JobStatusResponse.class);
ResponseDescriptor rspDesc = jobStatusResponse.getResponseDescriptor();
-
logger.info("status = {}", status);
rspDesc.setNssiId(status.getResourceInstanceID());
@@ -232,7 +232,7 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager {
NssiResponse response = unMarshal(restResponse.getResponseContent(), NssiResponse.class);
ResourceOperationStatus status =
new ResourceOperationStatus(serviceInfo.getNsiId(), response.getJobId(), serviceInfo.getServiceUuid());
- status.setResourceInstanceID(response.getNssiId());
+ status.setResourceInstanceID(serviceInfo.getNssiId());
status.setOperType(actionType.toString());
status.setProgress("0");
diff --git a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
index e9eb14c..fdce3fd 100644
--- a/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
+++ b/so-nssmf-adapter-application/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
@@ -120,7 +120,7 @@ public class ExternalAnNssmfManager extends ExternalNssmfManager {
public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
NssiResponse resp = new NssiResponse();
- String nssiId = modifyRequest.getActDeActNssi().getNssiId();
+ String nssiId = modifyRequest.getAllocateAnNssi().getNssiId();
resp.setJobId(UUID.randomUUID().toString());
resp.setNssiId(nssiId);