summaryrefslogtreecommitdiffstats
path: root/gui-clamp/ui-react/src/api/ControlLoopService.js
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2021-09-10 10:14:25 +0000
committerGerrit Code Review <gerrit@onap.org>2021-09-10 10:14:25 +0000
commit4ee6cfe3c0c507370118348d782b14a09e1b3c53 (patch)
tree78ae07b056e1f28859fd93b4ba71f1c2ee4d5755 /gui-clamp/ui-react/src/api/ControlLoopService.js
parent1f68035b96e9336b737bc9a5d055c5ffdd016813 (diff)
parenta090a83268cfd8b1341c266d32ccfb670b9f0e8c (diff)
Merge "Add Delete Instantiation Functionality."
Diffstat (limited to 'gui-clamp/ui-react/src/api/ControlLoopService.js')
-rw-r--r--gui-clamp/ui-react/src/api/ControlLoopService.js27
1 files changed, 24 insertions, 3 deletions
diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.js b/gui-clamp/ui-react/src/api/ControlLoopService.js
index 0d6e11c..96eb403 100644
--- a/gui-clamp/ui-react/src/api/ControlLoopService.js
+++ b/gui-clamp/ui-react/src/api/ControlLoopService.js
@@ -26,7 +26,7 @@ export default class ControlLoopService {
return response
}
- static async createInstanceProperties(instancePropertiesTemplate, windowLocationPathname) {
+ static async createInstanceProperties(instanceName, instancePropertiesTemplate, windowLocationPathname) {
const response = await fetch(windowLocationPathname +
'/restservices/clds/v2/toscaControlLoop/postToscaInstanceProperties', {
@@ -41,8 +41,29 @@ export default class ControlLoopService {
return response
}
- static async getInstanceOrderState(windowLocationPathName) {
- const response = await fetch(windowLocationPathName + '/restservices/clds/v2/toscaControlLoop/getInstantiationOrderState');
+ static async deleteInstantiation(name, version, windowLocationPathName) {
+ console.log(windowLocationPathName);
+ const params = {
+ name: name,
+ version: version
+ }
+
+ const response = await fetch(windowLocationPathName + '/restservices/clds/v2/toscaControlLoop/deleteToscaInstanceProperties?' + (new URLSearchParams(params)), {
+ method: 'DELETE',
+ credentials: 'same-origin',
+ });
+
+ const data = await response;
+
+ return data;
+ }
+
+ static async getInstanceOrderState(name, version, windowLocationPathName) {
+ const params = {
+ name: name,
+ version: version
+ }
+ const response = await fetch(windowLocationPathName + '/restservices/clds/v2/toscaControlLoop/getInstantiationOrderState'+ '?' + (new URLSearchParams(params)));
const data = await response;