2  * ============LICENSE_START=======================================================
 
   4  * ================================================================================
 
   5  * Copyright (C) 2020  Tech Mahindra
 
   6  * ================================================================================
 
   7  * Licensed under the Apache License, Version 2.0 (the "License");
 
   8  * you may not use this file except in compliance with the License.
 
   9  * You may obtain a copy of the License at
 
  11  *      http://www.apache.org/licenses/LICENSE-2.0
 
  13  * Unless required by applicable law or agreed to in writing, software
 
  14  * distributed under the License is distributed on an "AS IS" BASIS,
 
  15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  16  * See the License for the specific language governing permissions and
 
  17  * limitations under the License.
 
  18  * ============LICENSE_END=========================================================
 
  21 package org.onap.so.bpmn.infrastructure.scripts
 
  23 import static org.junit.Assert.*
 
  25 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 
  26 import org.junit.Before
 
  28 import org.mockito.ArgumentCaptor
 
  29 import org.mockito.Captor
 
  30 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
  31 import org.mockito.Mockito
 
  32 import org.onap.aaiclient.client.aai.AAIObjectType
 
  33 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 
  34 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 
  35 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 
  37 import static org.mockito.Mockito.spy
 
  38 import static org.mockito.Mockito.times
 
  39 import static org.mockito.Mockito.verify
 
  40 import static org.mockito.Mockito.when
 
  41 import static org.mockito.ArgumentMatchers.eq
 
  43 import javax.ws.rs.NotFoundException
 
  45 class DoAllocateCoreSharedSliceTest extends MsoGroovyTest {
 
  47     DoAllocateCoreSharedSlice allocate = new DoAllocateCoreSharedSlice()
 
  50     void init() throws IOException {
 
  51         super.init("DoAllocateCoreSharedSlice")
 
  55     static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
 
  58     void testPreProcessRequest(){
 
  60         String solutions = """ [
 
  62             "invariantUUID": "y7685f64-5717-4562-b3fc-2c963f66afa6",
 
  63             "UUID": "8u785f64-5717-4562-b3fc-2c963f66afa6",
 
  64             "NSSIName": "embb-core-ser",
 
  65             "NSSIId": "f4485f64-5717-4562-b3fc-2c963f66afa6",
 
  71         String sliceProfile = "{\r\n      \"snssaiList\": [ \r\n        \"001-100001\"\r\n      ],\r\n      \"sliceProfileId\": \"ab9af40f13f721b5f13539d87484098\",\r\n      \"plmnIdList\": [\r\n        \"460-00\",\r\n        \"460-01\"\r\n      ],\r\n      \"perfReq\": {\r\n        \"perfReqEmbbList \": [\r\n          {\r\n            \"activityFactor\": 50\r\n          }\r\n        ]\r\n      },\r\n      \"maxNumberofUEs\": 200, \r\n      \"coverageAreaTAList\": [ \r\n        \"1\",\r\n        \"2\",\r\n        \"3\",\r\n        \"4\"\r\n      ],\r\n      \"latency\": 2,\r\n      \"resourceSharingLevel\": \"non-shared\" \r\n    }"
 
  75         when(mockExecution.getVariable("solutions")).thenReturn(solutions)
 
  76         when(mockExecution.getVariable("sliceProfile")).thenReturn(sliceProfile)
 
  78         allocate.preProcessRequest(mockExecution)
 
  80         Mockito.verify(mockExecution, times(1)).setVariable(eq("nssiId"), captor.capture())
 
  81         def nssiId = captor.getValue()
 
  82         assertEquals("f4485f64-5717-4562-b3fc-2c963f66afa6", nssiId)
 
  84         Mockito.verify(mockExecution, times(1)).setVariable(eq("sNssai"), captor.capture())
 
  85         def sNssai = captor.getValue()
 
  86         assertEquals("001-100001", sNssai)
 
  88         Mockito.verify(mockExecution,times(3)).setVariable(captor.capture() as String, captor.capture())
 
  89         List<ExecutionEntity> values = captor.getAllValues()
 
  94     public void tesPrepareSOMacroRequestPayload() {
 
  96         String json ="{ \"serviceResources\"    : {\r\n\t\"modelInfo\"       : {\r\n\t\t\"modelName\"          : \"MSOTADevInfra_vSAMP10a_Service\",\r\n\t\t\"modelUuid\"          : \"5df8b6de-2083-11e7-93ae-92361f002671\",\r\n\t\t\"modelInvariantUuid\" : \"9647dfc4-2083-11e7-93ae-92361f002671\",\r\n\t\t\"modelVersion\"       : \"1.0\"\r\n\t},\r\n\t\"serviceType\"        : \"PortMirroring\",\r\n\t\"serviceRole\"        : \"InfraRole\",\r\n\t\"environmentContext\" : \"Luna\",\r\n\t\"workloadContext\"    : \"Oxygen\",\r\n\t\"serviceVnfs\": [\r\n\t\r\n\t\t{ \"modelInfo\"                    : {\r\n\t\t\t\"modelName\"              : \"vSAMP10a\",\r\n\t\t\t\"modelUuid\"              : \"ff2ae348-214a-11e7-93ae-92361f002671\",\r\n\t\t\t\"modelInvariantUuid\"     : \"2fff5b20-214b-11e7-93ae-92361f002671\",\r\n\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\"modelCustomizationUuid\" : \"68dc9a92-214c-11e7-93ae-92361f002671\",\r\n\t\t\t\"modelInstanceName\"      : \"vSAMP10a 1\"\r\n\t\t\t},\r\n\t\t\"toscaNodeType\"            : \"VF\",\r\n\t\t\"nfFunction\"           \t: null,\r\n\t\t\"nfType\"              \t\t: null,\r\n\t\t\"nfRole\"              \t\t: null,\r\n\t\t\"nfNamingCode\"         \t: null,\r\n\t\t\"multiStageDesign\"\t\t: null,\r\n\t\t\t\"vfModules\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"NetworkFqdnTest4\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"025606c1-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"06bd0a18-65c0-4418-83c7-5b0d13cba01a\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"2.0\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"06bd0a18-65c0-4418-83c7-5b0d13cba01a\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"label\",\r\n\t\t\t\t\t\"initialCount\"           : 0,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"NetworkFqdnTest3\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"02560575-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"06bd0a18-65c0-4418-83c7-5b0d13cba0bb\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"06bd0a18-65c0-4418-83c7-5b0d13cba0bb\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"label\",\r\n\t\t\t\t\t\"initialCount\"           : 0,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : false\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"NetworkFqdnTest5\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"025607e4-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"06bd0a18-65c0-4418-83c7-5b0d14cba01a\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"06bd0a18-65c0-4418-83c7-5b0d14cba01a\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : false,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"label\",\r\n\t\t\t\t\t\"initialCount\"           : 0,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : false\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"vSAMP10aDEV::PCM::module-2\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"7774b4e4-7d37-11e7-bb31-be2e44b06b34\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"93e9c1d2-7d37-11e7-bb31-be2e44b06b34\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"2\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"6728bee8-7d3a-11e7-bb31-be2e44b06b34\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : false,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"PCM\",\r\n\t\t\t\t\t\"initialCount\"           : 0,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"vSAMP10aDEV::PCM::module-1\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"066de97e-253e-11e7-93ae-92361f002671\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"64efd51a-2544-11e7-93ae-92361f002671\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"2\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"b4ea86b4-253f-11e7-93ae-92361f002671\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : false,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"PCM\",\r\n\t\t\t\t\t\"initialCount\"           : 0,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"vSAMP10aDEV::base::module-0\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"20c4431c-246d-11e7-93ae-92361f002671\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : \"78ca26d0-246d-11e7-93ae-92361f002671\",\r\n\t\t\t\t\t\t\"modelVersion\"           : \"2\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"cb82ffd8-252a-11e7-93ae-92361f002671\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"base\",\r\n\t\t\t\t\t\"initialCount\"           : 1,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"vSAMP10a::base::module-0\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"02560de2-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : null,\r\n\t\t\t\t\t\t\"modelVersion\"           : \"2\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"MIGRATED_36e76920-ef30-4793-9979-cbd7d4b2bfc4\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"base\",\r\n\t\t\t\t\t\"initialCount\"           : 1,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"base::module-0\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"02561381-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : null,\r\n\t\t\t\t\t\t\"modelVersion\"           : \"1\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"MIGRATED_51baae4c-b7c7-4f57-b77e-6e01acca89e5\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"module-0\",\r\n\t\t\t\t\t\"initialCount\"           : 1,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : false\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"modelInfo\"               : { \r\n\t\t\t\t\t\t\"modelName\"              : \"vSAMP10a::PCM::module-1\",\r\n\t\t\t\t\t\t\"modelUuid\"              : \"02560f1b-4223-11e7-9252-005056850d2e\",\r\n\t\t\t\t\t\t\"modelInvariantUuid\"     : null,\r\n\t\t\t\t\t\t\"modelVersion\"           : \"1\",\r\n\t\t\t\t\t\t\"modelCustomizationUuid\" : \"MIGRATED_e9be2ed7-45b6-479c-b06e-9093899f8ce8\"\r\n\t\t\t\t\t},\t\t\"isBase\"                 : true,\r\n\t\t\t\t\t\"vfModuleLabel\"          : \"PCM\",\r\n\t\t\t\t\t\"initialCount\"           : 1,\r\n\t\t\t\t\t\"hasVolumeGroup\"           : true\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t],\r\n\t\"serviceNetworks\": [],\r\n\t\"serviceAllottedResources\": [\r\n\t\t{\r\n\t\t\t\"modelInfo\"       : {\r\n\t\t\t\t\"modelName\"              : \"Tunnel_Xconn\",\r\n\t\t\t\t\"modelUuid\"              : \"f6b7d4c6-e8a4-46e2-81bc-31cad5072842\",\r\n\t\t\t\t\"modelInvariantUuid\"     : \"b7a1b78e-6b6b-4b36-9698-8c9530da14af\",\r\n\t\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\t\"modelCustomizationUuid\" : \"5b9bee43-f537-4fb3-9e8b-4de9f714d28a\",\r\n\t\t\t\t\"modelInstanceName\"      : \"Pri_Tunnel_Xconn 9\"\r\n\t\t\t},\r\n\t\t\t\"toscaNodeType\"              : null,\r\n\t\t\t\"allottedResourceType\"              : null,\r\n\t\t\t\"allottedResourceRole\"              : null,\r\n\t\t\t\"providingServiceModelInvariantUuid\"              : null,\r\n\t\t\t\"nfFunction\"              : null,\r\n\t\t\t\"nfType\"              : null,\r\n\t\t\t\"nfRole\"              : null,\r\n\t\t\t\"nfNamingCode\"              : null\r\n\t\t}\r\n\t],\r\n\t\"serviceConfigs\": [\r\n\t\t{\r\n\t\t\t\"modelInfo\"       : {\r\n\t\t\t\t\"modelName\"              : \"Mulder\",\r\n\t\t\t\t\"modelUuid\"              : \"025606c1-4fff-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelInvariantUuid\"     : \"025606c1-4eee-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\t\"modelCustomizationUuid\" : \"025606c1-4ddd-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelInstanceName\"      : \"X_FILES_001\"\r\n\t\t\t},\r\n\t\t\t\"toscaNodeType\"   : \"Scully\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"modelInfo\"       : {\r\n\t\t\t\t\"modelName\"              : \"Krychuk\",\r\n\t\t\t\t\"modelUuid\"              : \"025606c1-5fff-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelInvariantUuid\"     : \"025606c1-5eee-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelVersion\"           : \"1.0\",\r\n\t\t\t\t\"modelCustomizationUuid\" : \"025606c1-5ddd-11e7-9252-005056850d2e\",\r\n\t\t\t\t\"modelInstanceName\"      : \"X_FILES_002\"\r\n\t\t\t},\r\n\t\t\t\"toscaNodeType\"   : \"Skinner\"\r\n\t\t}\r\n\t]\r\n\t}}\r\n\r\n"
 
  97         String sliceProfile = "{\r\n      \"snssaiList\": [ \r\n        \"001-100001\"\r\n      ],\r\n      \"sliceProfileId\": \"ab9af40f13f721b5f13539d87484098\",\r\n      \"plmnIdList\": [\r\n        \"460-00\",\r\n        \"460-01\"\r\n      ],\r\n      \"perfReq\": {\r\n        \"perfReqEmbbList \": [\r\n          {\r\n            \"activityFactor\": 50\r\n          }\r\n        ]\r\n      },\r\n      \"maxNumberofUEs\": 200, \r\n      \"coverageAreaTAList\": [ \r\n        \"1\",\r\n        \"2\",\r\n        \"3\",\r\n        \"4\"\r\n      ],\r\n      \"latency\": 2,\r\n      \"resourceSharingLevel\": \"non-shared\" \r\n    }"
 
  98         String vnfs="[{\"toscaNodeType\":\"VF\",\"vfModules\":[{\"initialCount\":0,\"vfModuleLabel\":\"label\",\"modelInfo\":{\"modelInvariantUuid\":\"06bd0a18-65c0-4418-83c7-5b0d13cba01a\",\"modelName\":\"NetworkFqdnTest4\",\"modelVersion\":\"2.0\",\"modelCustomizationUuid\":\"06bd0a18-65c0-4418-83c7-5b0d13cba01a\",\"modelUuid\":\"025606c1-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":true,\"isBase\":true},{\"initialCount\":0,\"vfModuleLabel\":\"label\",\"modelInfo\":{\"modelInvariantUuid\":\"06bd0a18-65c0-4418-83c7-5b0d13cba0bb\",\"modelName\":\"NetworkFqdnTest3\",\"modelVersion\":\"1.0\",\"modelCustomizationUuid\":\"06bd0a18-65c0-4418-83c7-5b0d13cba0bb\",\"modelUuid\":\"02560575-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":false,\"isBase\":true},{\"initialCount\":0,\"vfModuleLabel\":\"label\",\"modelInfo\":{\"modelInvariantUuid\":\"06bd0a18-65c0-4418-83c7-5b0d14cba01a\",\"modelName\":\"NetworkFqdnTest5\",\"modelVersion\":\"1.0\",\"modelCustomizationUuid\":\"06bd0a18-65c0-4418-83c7-5b0d14cba01a\",\"modelUuid\":\"025607e4-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":false,\"isBase\":false},{\"initialCount\":0,\"vfModuleLabel\":\"PCM\",\"modelInfo\":{\"modelInvariantUuid\":\"93e9c1d2-7d37-11e7-bb31-be2e44b06b34\",\"modelName\":\"vSAMP10aDEV::PCM::module-2\",\"modelVersion\":\"2\",\"modelCustomizationUuid\":\"6728bee8-7d3a-11e7-bb31-be2e44b06b34\",\"modelUuid\":\"7774b4e4-7d37-11e7-bb31-be2e44b06b34\"},\"hasVolumeGroup\":true,\"isBase\":false},{\"initialCount\":0,\"vfModuleLabel\":\"PCM\",\"modelInfo\":{\"modelInvariantUuid\":\"64efd51a-2544-11e7-93ae-92361f002671\",\"modelName\":\"vSAMP10aDEV::PCM::module-1\",\"modelVersion\":\"2\",\"modelCustomizationUuid\":\"b4ea86b4-253f-11e7-93ae-92361f002671\",\"modelUuid\":\"066de97e-253e-11e7-93ae-92361f002671\"},\"hasVolumeGroup\":true,\"isBase\":false},{\"initialCount\":1,\"vfModuleLabel\":\"base\",\"modelInfo\":{\"modelInvariantUuid\":\"78ca26d0-246d-11e7-93ae-92361f002671\",\"modelName\":\"vSAMP10aDEV::base::module-0\",\"modelVersion\":\"2\",\"modelCustomizationUuid\":\"cb82ffd8-252a-11e7-93ae-92361f002671\",\"modelUuid\":\"20c4431c-246d-11e7-93ae-92361f002671\"},\"hasVolumeGroup\":true,\"isBase\":true},{\"initialCount\":1,\"vfModuleLabel\":\"base\",\"modelInfo\":{\"modelInvariantUuid\":null,\"modelName\":\"vSAMP10a::base::module-0\",\"modelVersion\":\"2\",\"modelCustomizationUuid\":\"MIGRATED_36e76920-ef30-4793-9979-cbd7d4b2bfc4\",\"modelUuid\":\"02560de2-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":true,\"isBase\":true},{\"initialCount\":1,\"vfModuleLabel\":\"module-0\",\"modelInfo\":{\"modelInvariantUuid\":null,\"modelName\":\"base::module-0\",\"modelVersion\":\"1\",\"modelCustomizationUuid\":\"MIGRATED_51baae4c-b7c7-4f57-b77e-6e01acca89e5\",\"modelUuid\":\"02561381-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":false,\"isBase\":true},{\"initialCount\":1,\"vfModuleLabel\":\"PCM\",\"modelInfo\":{\"modelInvariantUuid\":null,\"modelName\":\"vSAMP10a::PCM::module-1\",\"modelVersion\":\"1\",\"modelCustomizationUuid\":\"MIGRATED_e9be2ed7-45b6-479c-b06e-9093899f8ce8\",\"modelUuid\":\"02560f1b-4223-11e7-9252-005056850d2e\"},\"hasVolumeGroup\":true,\"isBase\":true}],\"modelInfo\":{\"modelInvariantUuid\":\"2fff5b20-214b-11e7-93ae-92361f002671\",\"modelName\":\"vSAMP10a\",\"modelVersion\":\"1.0\",\"modelCustomizationUuid\":\"68dc9a92-214c-11e7-93ae-92361f002671\",\"modelInstanceName\":\"vSAMP10a 1\",\"modelUuid\":\"ff2ae348-214a-11e7-93ae-92361f002671\"},\"nfRole\":null,\"nfType\":null,\"multiStageDesign\":null,\"nfFunction\":null,\"nfNamingCode\":null}]\r\n"
 
  99         String service = "{\r\n                \"modelName\"          : \"eMBB-NSST\",\r\n                \"modelUuid\"          : \"ecfa2329-8765-4665-84e0-a32a2ac2be90\",\r\n                \"modelInvariantUuid\" : \"2eeeb5ff-4655-47d8-8aa3-044682246b60\",\r\n                \"modelVersion\"       : \"1.0\"\r\n        }"
 
 101         when(mockExecution.getVariable("serviceVnfs")).thenReturn(vnfs)
 
 103         when(mockExecution.getVariable("serviceType")).thenReturn("5g")
 
 104         when(mockExecution.getVariable("vnfs")).thenReturn(vnfs)
 
 105         when(mockExecution.getVariable("serviceModelInfo")).thenReturn(service)
 
 106         when(mockExecution.getVariable("sliceProfile")).thenReturn(sliceProfile)
 
 107         allocate.prepareSOMacroRequestPayload(mockExecution)
 
 109         Mockito.verify(mockExecution, times(1)).setVariable(eq("requestPayload"), captor.capture())
 
 110         assertNotNull(captor.getValue())
 
 114     void testPrepareVnfInstanceParamsJson() {
 
 115         List<Map<String, Object>> snssaiList = new ArrayList<>()
 
 116         Map<String, Object> snssaiMap = new LinkedHashMap<>()
 
 117         snssaiMap.put("snssai", "01-5C83F071")
 
 118         snssaiMap.put("status", "activated")
 
 119         snssaiList.add(snssaiMap)
 
 120         Map<String, Object> snssaiMap1 = new LinkedHashMap<>()
 
 121         snssaiMap1.put("snssai", "01-5B179BD4")
 
 122         snssaiMap1.put("status", "activated")
 
 123         snssaiList.add(snssaiMap1)
 
 125         when(mockExecution.getVariable("snssaiAndOrchStatusList")).thenReturn(snssaiList)
 
 127         String returnedJsonAsString= allocate.prepareVnfInstanceParamsJson(mockExecution)
 
 128         String expectedJsonAsString = """{supportedNssai={"sNssai":[{"snssai":"01-5C83F071","status":"activated"},{"snssai":"01-5B179BD4","status":"activated"}]}}"""
 
 129         assertEquals(expectedJsonAsString, returnedJsonAsString)
 
 133     void testGetNetworkInstanceWithSPInstanceAssociatedWithNssiId(){
 
 136         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
 138         DoAllocateCoreSharedSlice obj = spy(DoAllocateCoreSharedSlice.class)
 
 139         when(obj.getAAIClient()).thenReturn(client)
 
 140         AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX")
 
 141         when(client.exists(resourceUri1)).thenReturn(true)
 
 142         AAIResultWrapper wrapper1 = new AAIResultWrapper(mockQuerySliceServiceReturn())
 
 143         when(client.get(resourceUri1, NotFoundException.class)).thenReturn(wrapper1)
 
 145         //networkServiceInstanceId
 
 146         when(mockExecution.getVariable("networkServiceInstanceId")).thenReturn("206535e7-77c9-4036-9387-3f1cf57b4379")
 
 148         AAIResourceUri resourceUri2 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "206535e7-77c9-4036-9387-3f1cf57b4379")
 
 149         when(client.exists(resourceUri2)).thenReturn(true)
 
 150         AAIResultWrapper wrapper2 = new AAIResultWrapper(mockQueryNS())
 
 151         when(client.get(resourceUri2, NotFoundException.class)).thenReturn(wrapper2)
 
 154         when(mockExecution.getVariable("vnfId")).thenReturn("eeb66c6f-36bd-47ad-8294-48f46b1aa912")
 
 155         AAIResourceUri resourceUri3 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "eeb66c6f-36bd-47ad-8294-48f46b1aa912")
 
 156         when(client.exists(resourceUri3)).thenReturn(true)
 
 157         AAIResultWrapper wrapper3 = new AAIResultWrapper(mockQueryVnf())
 
 158         when(client.get(resourceUri3, NotFoundException.class)).thenReturn(wrapper3)
 
 161         //Allotted Resources-1
 
 162         AAIResourceUri resourceUri4 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "0d3d3cce-46a8-486d-816a-954e71697c4e")
 
 163         when(client.exists(resourceUri4)).thenReturn(true)
 
 164         AAIResultWrapper wrapper4 = new AAIResultWrapper(mockServiceProfile1())
 
 165         when(client.get(resourceUri4, NotFoundException.class)).thenReturn(wrapper4)
 
 167         //Allotted Resources-2
 
 168         AAIResourceUri resourceUri5 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "1c7046f2-a5a3-4d7f-9da8-388ee641a795")
 
 169         when(client.exists(resourceUri5)).thenReturn(true)
 
 170         AAIResultWrapper wrapper5 = new AAIResultWrapper(mockServiceProfile2())
 
 171         when(client.get(resourceUri5, NotFoundException.class)).thenReturn(wrapper5)
 
 173         obj.getNetworkInstanceAssociatedWithNssiId(mockExecution)
 
 175         //networkServiceInstanceId
 
 176         Mockito.verify(mockExecution, times(1)).setVariable(eq("networkServiceInstanceId"), captor.capture())
 
 177         assertEquals("206535e7-77c9-4036-9387-3f1cf57b4379", captor.getValue())
 
 179         Mockito.verify(mockExecution, times(1)).setVariable(eq("networkServiceInstanceName"), captor.capture())
 
 180         assertEquals("nsi_DemoEmbb", captor.getValue())
 
 182         Mockito.verify(mockExecution, times(1)).setVariable(eq("networkServiceModelInvariantUuid"), captor.capture())
 
 183         assertEquals("848c5656-5594-4d41-84bb-7afc7c64765c", captor.getValue())
 
 185         Mockito.verify(mockExecution, times(1)).setVariable(eq("owningEntityId"), captor.capture())
 
 186         assertEquals("OE-generic", captor.getValue())
 
 188         //assertEquals("206535e7-77c9-4036-9387-3f1cf57b4379", captor.getValue())
 
 191         Mockito.verify(mockExecution, times(1)).setVariable(eq("vnfId"), captor.capture())
 
 192         assertEquals("eeb66c6f-36bd-47ad-8294-48f46b1aa912", captor.getValue())
 
 195         Mockito.verify(mockExecution, times(1)).setVariable(eq("snssaiAndOrchStatusList"), captor.capture())
 
 196         List<Map<String, Object>> snssaiList = new ArrayList<>()
 
 197         Map<String, Object> snssaiMap = new LinkedHashMap<>()
 
 198         snssaiMap.put("snssai", "01-5C83F071")
 
 199         snssaiMap.put("orchestrationStatus", "activated")
 
 200         snssaiList.add(snssaiMap)
 
 201         Map<String, Object> snssaiMap1 = new LinkedHashMap<>()
 
 202         snssaiMap1.put("snssai", "01-5B179BD4")
 
 203         snssaiMap1.put("orchestrationStatus", "activated")
 
 204         snssaiList.add(snssaiMap1)
 
 205         assertEquals(snssaiList, captor.getValue())
 
 208         Mockito.verify(mockExecution, times(1)).setVariable(eq("projectName"), captor.capture())
 
 209         assertEquals("Project-generic", captor.getValue())
 
 211         Mockito.verify(mockExecution, times(1)).setVariable(eq("tenantId"), captor.capture())
 
 212         assertEquals("3d5819f1542e4ef9a4ccb0bcb278ca10", captor.getValue())
 
 214         Mockito.verify(mockExecution, times(1)).setVariable(eq("cloudOwner"), captor.capture())
 
 215         assertEquals("k8scloudowner", captor.getValue())
 
 217         Mockito.verify(mockExecution, times(1)).setVariable(eq("lcpCloudRegionId"), captor.capture())
 
 218         assertEquals("k8sregion", captor.getValue())
 
 220         Mockito.verify(mockExecution, times(1)).setVariable(eq("platformName"), captor.capture())
 
 221         assertEquals("test", captor.getValue())
 
 223         Mockito.verify(mockExecution, times(1)).setVariable(eq("lineOfBusinessName"), captor.capture())
 
 224         assertEquals("LOB-Demonstration", captor.getValue())
 
 228     void setUpBaseMockData() {
 
 230         String sliceParams ="""{
 
 231                                         "nsiId": "NSI-M-001-HDBNJ-NSMF-01-A-ZX",
 
 235                                         "sliceProfileId": "ab9af40f13f721b5f13539d87484098"
 
 238         when(mockExecution.getVariable("msoRequestId")).thenReturn("5ad89cf9-0569-4a93-4509-d8324321e2be")
 
 239         when(mockExecution.getVariable("serviceInstanceID")).thenReturn("NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX")
 
 240         when(mockExecution.getVariable("nsiId")).thenReturn("NSI-M-001-HDBNJ-NSMF-01-A-ZX")
 
 241         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
 
 242         when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("5G")
 
 243         when(mockExecution.getVariable("operationType")).thenReturn("deactivateInstance")
 
 244         when(mockExecution.getVariable("jobId")).thenReturn("5ad89cf9-0569-4a93-9999-d8324321e2be")
 
 245         when(mockExecution.getVariable("sliceParams")).thenReturn(sliceParams)
 
 248     String mockQueryNS() {
 
 251         "service-instance-id": "206535e7-77c9-4036-9387-3f1cf57b4379",
 
 252         "service-instance-name": "nsi_DemoEmbb",
 
 253         "environment-context": "General_Revenue-Bearing",
 
 254         "workload-context": "Production",
 
 255         "model-invariant-id": "848c5656-5594-4d41-84bb-7afc7c64765c",
 
 256         "model-version-id": "2de92587-3395-44e8-bb2c-b9529747e580",
 
 257         "resource-version": "1599228110527",
 
 258         "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/206535e7-77c9-4036-9387-3f1cf57b4379/service-data/service-topology/",
 
 259         "orchestration-status": "Assigned",
 
 260         "relationship-list": {
 
 262                         "related-to": "owning-entity",
 
 263                         "relationship-label": "org.onap.relationships.inventory.BelongsTo",
 
 264                         "related-link": "/aai/v19/business/owning-entities/owning-entity/OE-generic",
 
 265                         "relationship-data": [{
 
 266                                 "relationship-key": "owning-entity.owning-entity-id",
 
 267                                 "relationship-value": "OE-generic"
 
 270                         "related-to": "generic-vnf",
 
 271                         "relationship-label": "org.onap.relationships.inventory.ComposedOf",
 
 272                         "related-link": "/aai/v19/network/generic-vnfs/generic-vnf/eeb66c6f-36bd-47ad-8294-48f46b1aa912",
 
 273                         "relationship-data": [{
 
 274                                 "relationship-key": "generic-vnf.vnf-id",
 
 275                                 "relationship-value": "eeb66c6f-36bd-47ad-8294-48f46b1aa912"
 
 277                         "related-to-property": [{
 
 278                                 "property-key": "generic-vnf.vnf-name",
 
 279                                 "property-value": "vfwuctest 0"
 
 282                         "related-to": "project",
 
 283                         "relationship-label": "org.onap.relationships.inventory.Uses",
 
 284                         "related-link": "/aai/v19/business/projects/project/Project-generic",
 
 285                         "relationship-data": [{
 
 286                                 "relationship-key": "project.project-name",
 
 287                                 "relationship-value": "Project-generic"
 
 295     String mockQueryVnf() {
 
 299   "vnf-id": "eeb66c6f-36bd-47ad-8294-48f46b1aa912",
 
 300   "vnf-name": "vfwuctest 0",
 
 301   "vnf-type": "vfwuctest/null",
 
 302   "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
 
 303   "prov-status": "PREPROV",
 
 304   "orchestration-status": "ConfigAssigned",
 
 306   "is-closed-loop-disabled": false,
 
 307   "resource-version": "1599228155361",
 
 308   "model-invariant-id": "1086e068-c932-4b61-ae3b-2d2eb0cbe3ec",
 
 309   "model-version-id": "7fbb28cf-7dfc-447a-892c-4a3130b371d2",
 
 310   "model-customization-id": "471b3188-e8f2-470b-9f4d-89e74d45445f",
 
 311   "relationship-list": {
 
 313       "related-to": "tenant",
 
 314       "relationship-label": "org.onap.relationships.inventory.BelongsTo",
 
 315       "related-link": "/aai/v19/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner/k8sregion/tenants/tenant/3d5819f1542e4ef9a4ccb0bcb278ca10",
 
 316       "relationship-data": [{
 
 317         "relationship-key": "cloud-region.cloud-owner",
 
 318         "relationship-value": "k8scloudowner"
 
 320         "relationship-key": "cloud-region.cloud-region-id",
 
 321         "relationship-value": "k8sregion"
 
 323         "relationship-key": "tenant.tenant-id",
 
 324         "relationship-value": "3d5819f1542e4ef9a4ccb0bcb278ca10"
 
 326       "related-to-property": [{
 
 327         "property-key": "tenant.tenant-name",
 
 328         "property-value": "onap-tm5g-dev"
 
 331       "related-to": "cloud-region",
 
 332       "relationship-label": "org.onap.relationships.inventory.LocatedIn",
 
 333       "related-link": "/aai/v19/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner/k8sregion",
 
 334       "relationship-data": [{
 
 335         "relationship-key": "cloud-region.cloud-owner",
 
 336         "relationship-value": "k8scloudowner"
 
 338         "relationship-key": "cloud-region.cloud-region-id",
 
 339         "relationship-value": "k8sregion"
 
 341       "related-to-property": [{
 
 342         "property-key": "cloud-region.owner-defined-type",
 
 343         "property-value": "OwnerType"
 
 346       "related-to": "service-instance",
 
 347       "relationship-label": "org.onap.relationships.inventory.ComposedOf",
 
 348       "related-link": "/aai/v19/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vfw-k8s/service-instances/service-instance/206535e7-77c9-4036-9387-3f1cf57b4379",
 
 349       "relationship-data": [{
 
 350         "relationship-key": "customer.global-customer-id",
 
 351         "relationship-value": "Demonstration"
 
 353         "relationship-key": "service-subscription.service-type",
 
 354         "relationship-value": "vfw-k8s"
 
 356         "relationship-key": "service-instance.service-instance-id",
 
 357         "relationship-value": "206535e7-77c9-4036-9387-3f1cf57b4379"
 
 359       "related-to-property": [{
 
 360         "property-key": "service-instance.service-instance-name",
 
 361         "property-value": "vfw-0201"
 
 364       "related-to": "platform",
 
 365       "relationship-label": "org.onap.relationships.inventory.Uses",
 
 366       "related-link": "/aai/v19/business/platforms/platform/test",
 
 367       "relationship-data": [{
 
 368         "relationship-key": "platform.platform-name",
 
 369         "relationship-value": "test"
 
 372       "related-to": "line-of-business",
 
 373       "relationship-label": "org.onap.relationships.inventory.Uses",
 
 374       "related-link": "/aai/v19/business/lines-of-business/line-of-business/LOB-Demonstration",
 
 375       "relationship-data": [{
 
 376         "relationship-key": "line-of-business.line-of-business-name",
 
 377         "relationship-value": "LOB-Demonstration"
 
 385     String mockQuerySliceServiceReturn(){
 
 388   "service-instance-id": "NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX",
 
 389   "service-instance-name": "nssi_DemoEmbb",
 
 390   "service-role": "nssi",
 
 391   "environment-context": "cn",
 
 392   "model-invariant-id": "da575e8e-0863-4172-88b3-b3a9ead67895",
 
 393   "model-version-id": "e398c92f-27da-44b9-a717-1dbfc1bdd82e",
 
 394   "service-instance-location-id": "39-00",
 
 395   "resource-version": "1593525640482",
 
 396   "orchestration-status": "activated",
 
 397   "relationship-list": {
 
 399       "related-to": "service-instance",
 
 400       "relationship-label": "org.onap.relationships.inventory.ComposedOf",
 
 401       "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/206535e7-77c9-4036-9387-3f1cf57b4379",
 
 402       "relationship-data": [{
 
 403         "relationship-key": "customer.global-customer-id",
 
 404         "relationship-value": "5GCustomer"
 
 406         "relationship-key": "service-subscription.service-type",
 
 407         "relationship-value": "5G"
 
 409         "relationship-key": "service-instance.service-instance-id",
 
 410         "relationship-value": "206535e7-77c9-4036-9387-3f1cf57b4379"
 
 412       "related-to-property": [{
 
 413         "property-key": "service-instance.service-instance-name",
 
 414         "property-value": "nsi_DemoEmbb"
 
 418       "related-to": "allotted-resource",
 
 419       "relationship-label": "org.onap.relationships.inventory.Uses",
 
 420       "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/0d3d3cce-46a8-486d-816a-954e71697c4e/allotted-resources/allotted-resource/d63c241a-4c0b-4294-b4c3-5a57421a1769",
 
 421       "relationship-data": [{
 
 422         "relationship-key": "customer.global-customer-id",
 
 423         "relationship-value": "5GCustomer"
 
 425         "relationship-key": "service-subscription.service-type",
 
 426         "relationship-value": "5G"
 
 428         "relationship-key": "service-instance.service-instance-id",
 
 429         "relationship-value": "0d3d3cce-46a8-486d-816a-954e71697c4e"
 
 431         "relationship-key": "allotted-resource.id",
 
 432         "relationship-value": "d63c241a-4c0b-4294-b4c3-5a57421a1769"
 
 434       "related-to-property": [{
 
 435         "property-key": "allotted-resource.description"
 
 437         "property-key": "allotted-resource.allotted-resource-name",
 
 438         "property-value": "Allotted_DemoEmbb_shared"
 
 441       "related-to": "allotted-resource",
 
 442       "relationship-label": "org.onap.relationships.inventory.Uses",
 
 443       "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/1c7046f2-a5a3-4d7f-9da8-388ee641a795/allotted-resources/allotted-resource/362e46c2-cd84-45e4-a6c1-77f4ef88328d",
 
 444       "relationship-data": [{
 
 445         "relationship-key": "customer.global-customer-id",
 
 446         "relationship-value": "5GCustomer"
 
 448         "relationship-key": "service-subscription.service-type",
 
 449         "relationship-value": "5G"
 
 451         "relationship-key": "service-instance.service-instance-id",
 
 452         "relationship-value": "1c7046f2-a5a3-4d7f-9da8-388ee641a795"
 
 454         "relationship-key": "allotted-resource.id",
 
 455         "relationship-value": "362e46c2-cd84-45e4-a6c1-77f4ef88328d"
 
 457       "related-to-property": [{
 
 458         "property-key": "allotted-resource.description"
 
 460         "property-key": "allotted-resource.allotted-resource-name",
 
 461         "property-value": "Allotted_DemoEmbb"
 
 471     String mockServiceProfile1() {
 
 473   "service-instance-id": "0d3d3cce-46a8-486d-816a-954e71697c4e",
 
 474   "service-instance-name": "DemoEmbb2",
 
 475   "service-role": "e2esliceprofile-service",
 
 476   "environment-context": "01-5C83F071",
 
 477   "model-invariant-id": "040b1b40-3120-446b-b8e3-4f21d153d11e",
 
 478   "model-version-id": "8b7dabb3-3f27-4555-a9fe-803e862b0292",
 
 479   "service-instance-location-id": "39-00",
 
 480   "resource-version": "1593511782269",
 
 481   "orchestration-status": "activated",
 
 482   "relationship-list": {
 
 484       "related-to": "service-instance",
 
 485       "relationship-label": "org.onap.relationships.inventory.ComposedOf",
 
 486       "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/4b2bdbc0-cf7e-4c50-882a-f660e3ab8520",
 
 487       "relationship-data": [{
 
 488         "relationship-key": "customer.global-customer-id",
 
 489         "relationship-value": "5GCustomer"
 
 491         "relationship-key": "service-subscription.service-type",
 
 492         "relationship-value": "5G"
 
 494         "relationship-key": "service-instance.service-instance-id",
 
 495         "relationship-value": "4b2bdbc0-cf7e-4c50-882a-f660e3ab8520"
 
 497       "related-to-property": [{
 
 498         "property-key": "service-instance.service-instance-name",
 
 499         "property-value": "DemoEmbb"
 
 503   "allotted-resources": {
 
 504     "allotted-resource": [{
 
 505       "id": "362e46c2-cd84-45e4-a6c1-77f4ef88328d",
 
 506       "model-invariant-id": "e5941a50-ddb4-4f74-be03-25449ae02ddc",
 
 507       "model-version-id": "ab171d60-c2cc-4903-ac1d-c451b647e461",
 
 508       "resource-version": "1593511173712",
 
 509       "type": "Allotted Resource",
 
 510       "allotted-resource-name": "Allotted_DemoEmbb",
 
 511       "relationship-list": {
 
 513           "related-to": "service-instance",
 
 514           "relationship-label": "org.onap.relationships.inventory.Uses",
 
 515           "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/ea107578-9854-4718-8145-7c7febf0de6c",
 
 516           "relationship-data": [{
 
 517             "relationship-key": "customer.global-customer-id",
 
 518             "relationship-value": "5GCustomer"
 
 520             "relationship-key": "service-subscription.service-type",
 
 521             "relationship-value": "5G"
 
 523             "relationship-key": "service-instance.service-instance-id",
 
 524             "relationship-value": "ea107578-9854-4718-8145-7c7febf0de6c"
 
 526           "related-to-property": [{
 
 527             "property-key": "service-instance.service-instance-name",
 
 528             "property-value": "nsi_DemoEmbb"
 
 536     "profile-id": "31a83df8-5bd0-4df7-a50f-7900476b81a2",
 
 538     "max-number-of-UEs": 0,
 
 539     "coverage-area-TA-list": "Beijing;Beijing;HaidianDistrict;WanshouluStreet",
 
 540     "ue-mobility-level": "stationary",
 
 541     "resource-sharing-level": "0",
 
 542     "exp-data-rate-UL": 500,
 
 543     "exp-data-rate-DL": 2000,
 
 544     "activity-factor": 0,
 
 550     "traffic-density": 0,
 
 552     "s-nssai": "01-5C83F071",
 
 553     "resource-version": "1593525640617"
 
 559     String mockServiceProfile2() {
 
 561   "service-instance-id": "1c7046f2-a5a3-4d7f-9da8-388ee641a795",
 
 562   "service-instance-name": "DemoEmbb",
 
 563   "service-role": "e2esliceprofile-service",
 
 564   "environment-context": "01-5B179BD4",
 
 565   "model-invariant-id": "040b1b40-3120-446b-b8e3-4f21d153d12e",
 
 566   "model-version-id": "8b7dabb3-3f27-4555-a9fe-803e862b0282",
 
 567   "service-instance-location-id": "39-00",
 
 568   "resource-version": "1593511782169",
 
 569   "orchestration-status": "activated",
 
 570   "relationship-list": {
 
 572       "related-to": "service-instance",
 
 573       "relationship-label": "org.onap.relationships.inventory.ComposedOf",
 
 574       "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/4b2bdbc0-cf7e-4c50-882a-f660e3ab8520",
 
 575       "relationship-data": [{
 
 576         "relationship-key": "customer.global-customer-id",
 
 577         "relationship-value": "5GCustomer"
 
 579         "relationship-key": "service-subscription.service-type",
 
 580         "relationship-value": "5G"
 
 582         "relationship-key": "service-instance.service-instance-id",
 
 583         "relationship-value": "4b2bdbc0-cf7e-4c50-882a-f660e3ab8520"
 
 585       "related-to-property": [{
 
 586         "property-key": "service-instance.service-instance-name",
 
 587         "property-value": "DemoEmbb"
 
 591   "allotted-resources": {
 
 592     "allotted-resource": [{
 
 593       "id": "362e46c2-cd84-45e4-a6c1-77f4ef88328d",
 
 594       "model-invariant-id": "e5941a50-ddb4-4f74-be03-25449ae02ddc",
 
 595       "model-version-id": "ab171d60-c2cc-4903-ac1d-c451b647e461",
 
 596       "resource-version": "1593511173712",
 
 597       "type": "Allotted Resource",
 
 598       "allotted-resource-name": "Allotted_DemoEmbb",
 
 599       "relationship-list": {
 
 601           "related-to": "service-instance",
 
 602           "relationship-label": "org.onap.relationships.inventory.Uses",
 
 603           "related-link": "/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/ea107578-9854-4718-8145-7c7febf0de6c",
 
 604           "relationship-data": [{
 
 605             "relationship-key": "customer.global-customer-id",
 
 606             "relationship-value": "5GCustomer"
 
 608             "relationship-key": "service-subscription.service-type",
 
 609             "relationship-value": "5G"
 
 611             "relationship-key": "service-instance.service-instance-id",
 
 612             "relationship-value": "ea107578-9854-4718-8145-7c7febf0de6c"
 
 614           "related-to-property": [{
 
 615             "property-key": "service-instance.service-instance-name",
 
 616             "property-value": "nsi_DemoEmbb"
 
 624     "profile-id": "b86df550-9d70-452b-a5a9-eb8823417255",
 
 626     "max-number-of-UEs": 0,
 
 627     "coverage-area-TA-list": "Beijing;Beijing;HaidianDistrict;WanshouluStreet",
 
 628     "ue-mobility-level": "stationary",
 
 629     "resource-sharing-level": "0",
 
 630     "exp-data-rate-UL": 500,
 
 631     "exp-data-rate-DL": 1000,
 
 632     "activity-factor": 0,
 
 638     "traffic-density": 0,
 
 640     "s-nssai": "01-5B179BD4",
 
 641     "resource-version": "1593511356725"