::
- MSO_CREATE_SERVICE_INSTANCE_PATH = "/ecomp/mso/infra/serviceInstance/v4"
+ MSO_CREATE_SERVICE_INSTANCE_PATH = "/ecomp/mso/infra/serviceInstance/v6"
- MSO_GET_REQUEST_STATUS_PATH = "/ecomp/mso/infra/orchestrationRequests/v4/"
+ MSO_GET_REQUEST_STATUS_PATH = "/ecomp/mso/infra/orchestrationRequests/v6/"
- MSO_DELETE_REQUEST_STATUS_PATH = "/ecomp/mso/infra/serviceInstances/"
+ MSO_DELETE_REQUEST_STATUS_PATH = "/ecomp/mso/infra/serviceInstances/v6/"
"/aai/v11/business/customers/customer/$customerId/service-subscriptions/service-subscription/$serviceSpecName/service-instances/";
// MSO
- public static final String MSO_CREATE_SERVICE_INSTANCE_PATH = "/ecomp/mso/infra/serviceInstances/v4";
- public static final String MSO_GET_REQUEST_STATUS_PATH = "/ecomp/mso/infra/orchestrationRequests/v4/";
- public static final String MSO_DELETE_REQUEST_STATUS_PATH = "/ecomp/mso/infra/serviceInstances/v4/";
+ public static final String MSO_CREATE_SERVICE_INSTANCE_PATH = "/ecomp/mso/infra/serviceInstances/v6";
+ public static final String MSO_GET_REQUEST_STATUS_PATH = "/ecomp/mso/infra/orchestrationRequests/v6/";
+ public static final String MSO_DELETE_REQUEST_STATUS_PATH = "/ecomp/mso/infra/serviceInstances/v6/";
}
@Value("${aai.api.id}")
private String aaiApiId;
+ @Value("${aai.header.transaction.id}")
+ private String aaiTransactionId;
+
private static final String HEADER_AUTHORIZATION = "Authorization";
private static final String X_FROM_APP_ID = "X-FromAppId";
private static final Logger LOGGER = LoggerFactory.getLogger(AaiClient.class);
+ private static final String X_TRANSACTION_ID = "X-TransactionId";
private HttpHeaders buildRequestHeaderForAAI() {
httpHeaders.add(X_FROM_APP_ID, aaiApiId);
httpHeaders.add("Accept", "application/json");
httpHeaders.add("Content-Type", "application/json");
+ httpHeaders.add(X_TRANSACTION_ID, aaiTransactionId);
+
return httpHeaders;
}
private static final Logger LOGGER = LoggerFactory.getLogger(BaseClient.class);
+
@Autowired
private RestTemplate restTemplate;
+
+
protected ResponseEntity<Object> callApiGet(String callURL, HttpHeaders httpHeaders) {
- ResponseEntity<Object> response = restTemplate.exchange(callURL, HttpMethod.GET,
- new HttpEntity<>("parameters", httpHeaders), Object.class);
+
+ if(LOGGER.isDebugEnabled()){
+ LOGGER.debug("log request : "+callURL+ " "+httpHeaders);
+ }
+
+ ResponseEntity<Object> response = null;
+ response = restTemplate.exchange(callURL, HttpMethod.GET,
+ new HttpEntity<>("parameters", httpHeaders), Object.class);
+
if(LOGGER.isDebugEnabled()){
LOGGER.debug("response body : {}",response.getBody().toString());
}
@Value("${aai.api.id}")
private String aaiApiId;
+ @Value("${aai.header.transaction.id}")
+ private String aaiTransactionId;
+
+
@Value("${onap.lcpCloudRegionId}")
private String lcpCloudRegionId;
private static final String HEADER_AUTHORIZATION = "Authorization";
private static final String X_FROM_APP_ID = "X-FromAppId";
+ private static final String X_TRANSACTION_ID = "X-TransactionId";
private static final Logger LOGGER = LoggerFactory.getLogger(MultiClient.class);
httpHeaders.add(X_FROM_APP_ID, aaiApiId);
httpHeaders.add("Accept", "application/json");
httpHeaders.add("Content-Type", "application/json");
+ httpHeaders.add(X_TRANSACTION_ID, aaiTransactionId);
+
return httpHeaders;
}
--- /dev/null
+/**
+ * Copyright (c) 2018 Orange
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.nbi.apis.serviceorder.model.consumer;
+
+public class OwningEntity {
+
+ private String owningEntityId;
+ private String owningEntityName;
+
+ public String getOwningEntityId() {
+ return owningEntityId;
+ }
+
+ public void setOwningEntityId(String owningEntityId) {
+ this.owningEntityId = owningEntityId;
+ }
+
+ public String getOwningEntityName() {
+ return owningEntityName;
+ }
+
+ public void setOwningEntityName(String owningEntityName) {
+ this.owningEntityName = owningEntityName;
+ }
+}
--- /dev/null
+/**
+ * Copyright (c) 2018 Orange
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.nbi.apis.serviceorder.model.consumer;
+
+public class Project {
+
+ private String projectName;
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+}
private CloudConfiguration cloudConfiguration;
+ private OwningEntity owningEntity;
+
+ private Project project;
+
+ public Project getProject() {
+ return project;
+ }
+
+ public void setProject(Project project) {
+ this.project = project;
+ }
+
+ public OwningEntity getOwningEntity() {
+ return owningEntity;
+ }
+
+ public void setOwningEntity(OwningEntity owningEntity) {
+ this.owningEntity = owningEntity;
+ }
public CloudConfiguration getCloudConfiguration() {
return cloudConfiguration;
import org.onap.nbi.apis.serviceorder.model.consumer.GetRequestStatusResponse;
import org.onap.nbi.apis.serviceorder.model.consumer.MSOPayload;
import org.onap.nbi.apis.serviceorder.model.consumer.ModelInfo;
+import org.onap.nbi.apis.serviceorder.model.consumer.OwningEntity;
+import org.onap.nbi.apis.serviceorder.model.consumer.Project;
import org.onap.nbi.apis.serviceorder.model.consumer.RequestDetails;
import org.onap.nbi.apis.serviceorder.model.consumer.RequestInfo;
import org.onap.nbi.apis.serviceorder.model.consumer.RequestParameters;
@Value("${onap.tenantId}")
private String tenantId;
+ @Value("${so.owning.entity.id}")
+ private String soOwningEntityId;
+
+ @Value("${so.owning.entity.name}")
+ private String soOwningEntityName;
+
+ @Value("${so.project.name}")
+ private String soProjectName;
+
@Autowired
private ServiceOrderService serviceOrderService;
CloudConfiguration cloudConfiguration = new CloudConfiguration(lcpCloudRegionId, tenantId);
requestDetails.setCloudConfiguration(cloudConfiguration);
+
+ OwningEntity owningEntity = new OwningEntity();
+ owningEntity.setOwningEntityId(soOwningEntityId);
+ owningEntity.setOwningEntityName(soOwningEntityName);
+ requestDetails.setOwningEntity(owningEntity);
+
+ Project project = new Project();
+ project.setProjectName(soProjectName);
+
+ requestDetails.setProject(project);
+
return requestDetails;
}
# AAI
aai.host=https://10.0.1.1:8443
aai.header.authorization=Basic QUFJOkFBSQ==
-aai.api.id=AAI
+aai.api.id=NBI
+aai.header.transaction.id=808b54e3-e563-4144-a1b9-e24e2ed93d4f
# SO
so.host=http://10.0.5.1:8080
so.header.authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
so.api.id=SO
+so.owning.entity.id=6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
+so.owning.entity.name=OE-generic
+so.project.name=Project-generic
# MONGO
spring.data.mongodb.host=localhost
ExecutionTask executionTaskA = ServiceOrderAssertions.setUpBddForExecutionTaskSucess(serviceOrderRepository,
executionTaskRepository, ActionType.ADD);
- removeWireMockMapping("/ecomp/mso/infra/orchestrationRequests/v4/requestId");
+ removeWireMockMapping("/ecomp/mso/infra/orchestrationRequests/v6/requestId");
SoTaskProcessor.processOrderItem(executionTaskA);
ExecutionTask executionTaskA = ServiceOrderAssertions.setUpBddForExecutionTaskSucess(serviceOrderRepository,
executionTaskRepository, ActionType.ADD);
- removeWireMockMapping("/ecomp/mso/infra/serviceInstances/v4");
+ removeWireMockMapping("/ecomp/mso/infra/serviceInstances/v6");
SoTaskProcessor.processOrderItem(executionTaskA);
ExecutionTask executionTaskA = ServiceOrderAssertions.setUpBddForExecutionTaskSucess(serviceOrderRepository,
executionTaskRepository, ActionType.ADD);
- removeWireMockMapping("/ecomp/mso/infra/serviceInstances/v4");
- removeWireMockMapping("/ecomp/mso/infra/orchestrationRequests/v4/requestId");
+ removeWireMockMapping("/ecomp/mso/infra/serviceInstances/v6");
+ removeWireMockMapping("/ecomp/mso/infra/orchestrationRequests/v6/requestId");
SoTaskProcessor.processOrderItem(executionTaskA);
aai.host=http://127.0.0.1:8091
aai.header.authorization=Basic QUFJOkFBSQ==
aai.api.id=AAI
+aai.header.transaction.id=808b54e3-e563-4144-a1b9-e24e2ed93d4f
# SO
so.host=http://127.0.0.1:8091
so.header.authorization=
so.api.id=SO
+so.owning.entity.id=6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
+so.owning.entity.name=OE-generic
+so.project.name=Project-generic
# H2
spring.datasource.url=jdbc:h2:mem:~/db;DB_CLOSE_ON_EXIT=false
{
"request": {
"method": "DELETE",
- "url": "/ecomp/mso/infra/serviceInstances/v4/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb"
+ "url": "/ecomp/mso/infra/serviceInstances/v6/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb"
},
"response": {
"status": 202,
{
"request": {
"method": "GET",
- "url": "/ecomp/mso/infra/orchestrationRequests/v4/requestId"
+ "url": "/ecomp/mso/infra/orchestrationRequests/v6/requestId"
},
"response": {
"status": 200,
{
"request": {
"method": "POST",
- "url": "/ecomp/mso/infra/serviceInstances/v4"
+ "url": "/ecomp/mso/infra/serviceInstances/v6"
},
"response": {
"status": 201,