summaryrefslogtreecommitdiffstats
path: root/gui-clamp/ui-react/src/api
diff options
context:
space:
mode:
authorbrunomilitzer <bruno.militzer@est.tech>2021-08-19 17:20:13 +0100
committerbrunomilitzer <bruno.militzer@est.tech>2021-08-20 12:35:07 +0100
commitad6a4573ef18da3395eee1c9f922a26b8ac1bbcf (patch)
tree0ccba7a28e52a6361b9fd557636d7b8267dc099d /gui-clamp/ui-react/src/api
parent706b284cb8091ef00bc352bc5ee32f4fdca1162a (diff)
ADD State Change CL Instantiation
Will Apply Unit Tests on POLICY-3537, since focus is to get the functionalities completed. Issue-ID: POLICY-3425 Change-Id: I926bb1a213e71dee56c0fc5df4779a4f1b633383 Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'gui-clamp/ui-react/src/api')
-rw-r--r--gui-clamp/ui-react/src/api/ControlLoopService.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.js b/gui-clamp/ui-react/src/api/ControlLoopService.js
index 4a2fdbd..0d6e11c 100644
--- a/gui-clamp/ui-react/src/api/ControlLoopService.js
+++ b/gui-clamp/ui-react/src/api/ControlLoopService.js
@@ -41,6 +41,27 @@ export default class ControlLoopService {
return response
}
+ static async getInstanceOrderState(windowLocationPathName) {
+ const response = await fetch(windowLocationPathName + '/restservices/clds/v2/toscaControlLoop/getInstantiationOrderState');
+
+ const data = await response;
+
+ return data;
+ }
+
+ static async changeInstanceOrderState(toscaObject, windowLocationPathName) {
+ const response = await fetch(windowLocationPathName + '/restservices/clds/v2/toscaControlLoop/putToscaInstantiationStateChange', {
+ method: 'PUT',
+ headers: {
+ "Content-Type": "application/json"
+ },
+ credentials: 'same-origin',
+ body: JSON.stringify(toscaObject)
+ });
+
+ return response
+ }
+
static async getToscaTemplate(name, version, windowLocationPathname) {
const params = {
name: name,