summaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/main
diff options
context:
space:
mode:
authorlapentafd <francesco.lapenta@est.tech>2023-05-08 10:07:26 +0100
committerFrancesco Davide Lapenta <francesco.lapenta@est.tech>2023-05-08 10:29:18 +0000
commitb4b9a1f3c81a1c64271e38d879a84f6b134d3a54 (patch)
tree6d02f2cd9db6a20e4b90ad6255ccbe9cb4110944 /runtime-acm/src/main
parent1b54aea09dcc3a278a55d7e7754fd2bc095ba789 (diff)
Update ACM-R missing stubs
Fix typo and adding return 202 to missing stub Issue-ID: POLICY-4143 Change-Id: I9b59b762395a1c3a1ae262ed4ac7679de402e0ac Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'runtime-acm/src/main')
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java4
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java18
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/ParticipantControllerStub.java4
3 files changed, 13 insertions, 13 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java
index adcb1410b..fc94f3476 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/CommissioningControllerStub.java
@@ -31,6 +31,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplates;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
+import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
@@ -87,7 +88,6 @@ public class CommissioningControllerStub extends AbstractRestController implemen
@Override
public ResponseEntity<Void> compositionDefinitionPriming(UUID compositionId, UUID requestId,
AcTypeStateUpdate body) {
- // TODO Auto-generated method stub
- return null;
+ return new ResponseEntity<>(HttpStatus.ACCEPTED);
}
}
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java
index d0b190dd3..3fa47497a 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/InstantiationControllerStub.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation.
+ * Copyright (C) 2022-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import org.onap.policy.clamp.models.acm.messages.rest.instantiation.AcInstanceSt
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
+import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
@@ -45,13 +46,13 @@ public class InstantiationControllerStub extends AbstractRestController implemen
private String pathToResponseFile;
@Value("${stub.getCompositionInstancesResponse}")
- private String pathToSingleIntance;
+ private String pathToSingleInstance;
@Value("${stub.getAllCompositionInstancesResponse}")
- private String pathToAllIntances;
+ private String pathToAllInstances;
@Value("${stub.postInstanceResponse}")
- private String pathPostIntance;
+ private String pathPostInstance;
@Value("${stub.putCompositionInstanceUpdateResponse}")
private String pathToPutUpdate;
@@ -60,7 +61,7 @@ public class InstantiationControllerStub extends AbstractRestController implemen
public ResponseEntity<InstantiationResponse> createCompositionInstance(UUID compositionId,
AutomationComposition body, UUID xonaprequestid) {
if (body.getInstanceId() == null) {
- return stubUtils.getResponse(pathPostIntance, InstantiationResponse.class);
+ return stubUtils.getResponse(pathPostInstance, InstantiationResponse.class);
} else {
return stubUtils.getResponse(pathToResponseFile, InstantiationResponse.class);
}
@@ -75,19 +76,18 @@ public class InstantiationControllerStub extends AbstractRestController implemen
@Override
public ResponseEntity<AutomationComposition> getCompositionInstance(UUID compositionId, UUID instanceId,
UUID xonaprequestid) {
- return stubUtils.getResponse(pathToSingleIntance, AutomationComposition.class);
+ return stubUtils.getResponse(pathToSingleInstance, AutomationComposition.class);
}
@Override
public ResponseEntity<AutomationCompositions> queryCompositionInstances(UUID compositionId, String name,
String version, UUID xonaprequestid) {
- return stubUtils.getResponse(pathToAllIntances, AutomationCompositions.class);
+ return stubUtils.getResponse(pathToAllInstances, AutomationCompositions.class);
}
@Override
public ResponseEntity<Void> compositionInstanceState(UUID compositionId, UUID instanceId,
@Valid AcInstanceStateUpdate body, UUID requestId) {
- // TODO Auto-generated method stub
- return null;
+ return new ResponseEntity<>(HttpStatus.ACCEPTED);
}
}
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/ParticipantControllerStub.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/ParticipantControllerStub.java
index e87accf20..78c566ce4 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/ParticipantControllerStub.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/stub/ParticipantControllerStub.java
@@ -52,12 +52,12 @@ public class ParticipantControllerStub extends AbstractRestController implements
@Override
public ResponseEntity<Void> orderAllParticipantsReport(UUID xonaprequestid) {
- return new ResponseEntity(HttpStatus.ACCEPTED);
+ return new ResponseEntity<>(HttpStatus.ACCEPTED);
}
@Override
public ResponseEntity<Void> orderParticipantReport(UUID participantId, UUID xonaprequestid) {
- return new ResponseEntity(HttpStatus.ACCEPTED);
+ return new ResponseEntity<>(HttpStatus.ACCEPTED);
}
@Override