currentNSSI['S-NSSAI'] = sNssai
}
+ LOGGER.debug("S-NSSAI=" + currentNSSI['S-NSSAI'])
// Slice Profile id
String sliceProfileId = jsonUtil.getJsonValue(sliceProfile, "sliceProfileId")
}
+ LOGGER.debug("${getPrefix()} Exit callPUTServiceInstance")
+
return response
- LOGGER.debug("${getPrefix()} Exit callPUTServiceInstance")
}
// Supported S-NSSAI
List<String> snssais = (List<String>) currentNSSI['S-NSSAIs']
+ LOGGER.debug("prepareInstanceParams: snssais size = " + snssais.size())
+
ServiceInstance nssi = (ServiceInstance) currentNSSI['nssi']
String orchStatus = nssi.getOrchestrationStatus()
List<Map<String, String>> snssaiList = new ArrayList<>()
for(String snssai:snssais) {
+ LOGGER.debug("prepareInstanceParams: snssai = " + snssai)
Map<String, String> snssaisMap = new HashMap<>()
snssaisMap.put("snssai", snssai)
snssaisMap.put("status", orchStatus)
ObjectMapper mapper = new ObjectMapper()
- String supportedNssaiDetailsStr = mapper.writeValueAsString(snssaiList)
+ Map<String, Object> nSsai= new LinkedHashMap<>()
+ nSsai.put("sNssai", snssaiList)
+ // String supportedsNssaiJson = mapper.writeValueAsString(snssaiList)
+ String supportedsNssaiJson = mapper.writeValueAsString(nSsai)
instanceParamsMap.put("k8s-rb-profile-name", "default") // ???
instanceParamsMap.put("config-type", "day2") // ???
- instanceParamsMap.put("supportedNssai", supportedNssaiDetailsStr)
+ instanceParamsMap.put("supportedsNssai", supportedsNssaiJson)
instanceParams.add(instanceParamsMap)
LOGGER.debug("${getPrefix()} Exit prepareInstanceParams")
sliceProfileInstanceUri = (AAIResourceUri)spURI
}
else {
- String msg = "Slice Profile URI not found"
- LOGGER.error(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ String msg = "Slice Profile association with NSSI was already removed"
+ LOGGER.info(msg)
}
}
sliceProfileInstanceUri = (AAIResourceUri)spURI
}
else {
- String msg = "Slice Profile URI not found"
- LOGGER.error(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ String msg = "Slice Profile instance was already deleted"
+ LOGGER.info(msg)
}
}
- if(sliceProfileInstanceUri != null) { // NSSI should not be terminated
+ if(sliceProfileInstanceUri != null) {
try {
client.delete(sliceProfileInstanceUri)
} catch (Exception e) {