diff options
author | deepikasatheesh <deepika.s84@wipro.com> | 2021-10-12 18:32:04 +0000 |
---|---|---|
committer | deepikasatheesh <deepika.s84@wipro.com> | 2021-10-12 18:32:04 +0000 |
commit | 81d9ecc92ef795b4e17823fda10da1cd21bfe666 (patch) | |
tree | 38aa0dd17c5bb0abbadf1f57cf8260ea2d7a9cb1 | |
parent | 83fb1096c356eee2f0ac721feed14d44a771e79d (diff) |
Fix issues in shared NSI flow-option 2
Issue-ID: SO-3786
Signed-off-by: deepikasatheesh <deepika.s84@wipro.com>
Change-Id: I521fd6d29ba51958f69486cd4004999115fa6d9d
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);
|