From ea764f9f6dfefd2706ff668a88fb9b8f4a75ede6 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 26 Sep 2022 15:46:55 +0100 Subject: Amend GUI to work directly towards ACM runtime GUI proxies the URLs towards the ACM runtime server across CLAMP backend because clamp-backend handles the certificates for HTTPS communication and also handles AAF. For now, the Policy GUI is being used for testing and demonstration purposes only. As AAF is disabled and we are using HTTP, the GUI can now work towards the ACM runtime server port directly for test installations. Issue-ID: POLICY-4122 Change-Id: Idca87d520a5eef2058781534df6f96a0260c5eaf Signed-off-by: liamfallon --- gui-clamp/ui-react/src/api/ACMService.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gui-clamp/ui-react/src') diff --git a/gui-clamp/ui-react/src/api/ACMService.js b/gui-clamp/ui-react/src/api/ACMService.js index 722a571..a03aac2 100644 --- a/gui-clamp/ui-react/src/api/ACMService.js +++ b/gui-clamp/ui-react/src/api/ACMService.js @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation. + * Copyright (C) 2021-2022 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ export default class ACMService { static async getACMInstantiation() { const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/getToscaInstantiation'); + 'onap/policy/clamp/acm/v2/instantiation'); return response } @@ -30,7 +30,7 @@ export default class ACMService { static async createInstanceProperties(instancePropertiesTemplate) { const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/postToscaInstanceProperties', { + 'onap/policy/clamp/acm/v2/instanceProperties', { method: 'POST', headers: { "Content-Type": "application/json" @@ -49,7 +49,7 @@ export default class ACMService { } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/putToscaInstanceProperties?' + (new URLSearchParams(params)), { + 'onap/policy/clamp/acm/v2/instanceProperties?' + (new URLSearchParams(params)), { method: 'PUT', headers: { "Content-Type": "application/json" @@ -68,7 +68,7 @@ export default class ACMService { } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/deleteToscaInstanceProperties?' + (new URLSearchParams(params)), { + 'onap/policy/clamp/acm/v2/instanceProperties?' + (new URLSearchParams(params)), { method: 'DELETE', credentials: 'same-origin', }); @@ -84,7 +84,7 @@ export default class ACMService { version: version } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/getInstantiationOrderState'+ '?' + (new URLSearchParams(params))); + 'onap/policy/clamp/acm/v2/instantiationState'+ '?' + (new URLSearchParams(params))); const data = await response; @@ -93,7 +93,7 @@ export default class ACMService { static async changeInstanceOrderState(toscaObject) { const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/putToscaInstantiationStateChange', { + 'onap/policy/clamp/acm/v2/instantiation/command', { method: 'PUT', headers: { "Content-Type": "application/json" @@ -118,7 +118,7 @@ export default class ACMService { } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/getToscaTemplate' + '?' + (new URLSearchParams(params))); + 'onap/policy/clamp/acm/v2/commission/toscaservicetemplate' + '?' + (new URLSearchParams(params))); const data = await response; @@ -127,7 +127,7 @@ export default class ACMService { static async uploadToscaFile(toscaObject) { const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/commissionToscaTemplate', { + 'onap/policy/clamp/acm/v2/commission', { method: 'POST', headers: { "Content-Type": "application/json" @@ -147,7 +147,7 @@ export default class ACMService { } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/decommissionToscaTemplate' + '?' + (new URLSearchParams(params)), + 'onap/policy/clamp/acm/v2/commission' + '?' + (new URLSearchParams(params)), { method: 'DELETE' }); @@ -172,7 +172,7 @@ export default class ACMService { } const response = await fetch(window.location.pathname + - 'restservices/clds/v2/acm/getCommonOrInstanceProperties' + '?' + (new URLSearchParams(params))); + 'onap/policy/clamp/acm/v2/commission/getCommonOrInstanceProperties' + '?' + (new URLSearchParams(params))); return response; } -- cgit 1.2.3-korg