aboutsummaryrefslogtreecommitdiffstats
path: root/gui-clamp/ui-react/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'gui-clamp/ui-react/src/api')
-rw-r--r--gui-clamp/ui-react/src/api/ACMService.js (renamed from gui-clamp/ui-react/src/api/ControlLoopService.js)22
-rw-r--r--gui-clamp/ui-react/src/api/ACMService.test.js (renamed from gui-clamp/ui-react/src/api/ControlLoopService.test.js)10
-rw-r--r--gui-clamp/ui-react/src/api/LoopCache.test.js10
-rw-r--r--gui-clamp/ui-react/src/api/LoopCacheMockFile.json2
4 files changed, 22 insertions, 22 deletions
diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.js b/gui-clamp/ui-react/src/api/ACMService.js
index 011d5ae..405d222 100644
--- a/gui-clamp/ui-react/src/api/ControlLoopService.js
+++ b/gui-clamp/ui-react/src/api/ACMService.js
@@ -17,12 +17,12 @@
* ============LICENSE_END=========================================================
*/
-export default class ControlLoopService {
+export default class ACMService {
- static async getControlLoopInstantiation() {
+ static async getACMInstantiation() {
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/getToscaInstantiation');
+ 'restservices/clds/v2/acm/getToscaInstantiation');
return response
}
@@ -30,7 +30,7 @@ export default class ControlLoopService {
static async createInstanceProperties(instanceName, instancePropertiesTemplate) {
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/postToscaInstanceProperties', {
+ 'restservices/clds/v2/acm/postToscaInstanceProperties', {
method: 'POST',
headers: {
"Content-Type": "application/json"
@@ -49,7 +49,7 @@ export default class ControlLoopService {
}
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/deleteToscaInstanceProperties?' + (new URLSearchParams(params)), {
+ 'restservices/clds/v2/acm/deleteToscaInstanceProperties?' + (new URLSearchParams(params)), {
method: 'DELETE',
credentials: 'same-origin',
});
@@ -65,7 +65,7 @@ export default class ControlLoopService {
version: version
}
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/getInstantiationOrderState'+ '?' + (new URLSearchParams(params)));
+ 'restservices/clds/v2/acm/getInstantiationOrderState'+ '?' + (new URLSearchParams(params)));
const data = await response;
@@ -74,7 +74,7 @@ export default class ControlLoopService {
static async changeInstanceOrderState(toscaObject) {
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/putToscaInstantiationStateChange', {
+ 'restservices/clds/v2/acm/putToscaInstantiationStateChange', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
@@ -93,7 +93,7 @@ export default class ControlLoopService {
}
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/getToscaTemplate' + '?' + (new URLSearchParams(params)));
+ 'restservices/clds/v2/acm/getToscaTemplate' + '?' + (new URLSearchParams(params)));
const data = await response;
@@ -102,7 +102,7 @@ export default class ControlLoopService {
static async uploadToscaFile(toscaObject) {
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/commissionToscaTemplate', {
+ 'restservices/clds/v2/acm/commissionToscaTemplate', {
method: 'POST',
headers: {
"Content-Type": "application/json"
@@ -122,7 +122,7 @@ export default class ControlLoopService {
}
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/decommissionToscaTemplate' + '?' + (new URLSearchParams(params)),
+ 'restservices/clds/v2/acm/decommissionToscaTemplate' + '?' + (new URLSearchParams(params)),
{
method: 'DELETE'
});
@@ -140,7 +140,7 @@ export default class ControlLoopService {
}
const response = await fetch(window.location.pathname +
- 'restservices/clds/v2/toscaControlLoop/getCommonOrInstanceProperties' + '?' + (new URLSearchParams(params)));
+ 'restservices/clds/v2/acm/getCommonOrInstanceProperties' + '?' + (new URLSearchParams(params)));
return response;
}
diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.test.js b/gui-clamp/ui-react/src/api/ACMService.test.js
index 47fef71..e4a3837 100644
--- a/gui-clamp/ui-react/src/api/ControlLoopService.test.js
+++ b/gui-clamp/ui-react/src/api/ACMService.test.js
@@ -16,9 +16,9 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-import ControlLoopService from "./ControlLoopService";
+import ACMService from "./ACMService";
-describe("Verify GetControlLoopInstantiation", () => {
+describe("Verify GetACMInstantiation", () => {
let response;
let name = "name";
let template = "template";
@@ -29,9 +29,9 @@ describe("Verify GetControlLoopInstantiation", () => {
})
);
beforeEach(async () => {
- response = await ControlLoopService.getControlLoopInstantiation(name, template);
+ response = await ACMService.getACMInstantiation(name, template);
});
- it("Test getControlLoopInstantiation", () => {
+ it("Test getACMInstantiation", () => {
expect(response.status).toEqual("Success");
});
});
@@ -46,7 +46,7 @@ describe("Verify DeleteInstantiation", () => {
})
);
beforeEach(async () => {
- response = await ControlLoopService.deleteInstantiation(name, version);
+ response = await ACMService.deleteInstantiation(name, version);
});
it("Test deleteInstantiation", () => {
expect(response.status).toEqual("Success");
diff --git a/gui-clamp/ui-react/src/api/LoopCache.test.js b/gui-clamp/ui-react/src/api/LoopCache.test.js
index 76f819c..eff2e65 100644
--- a/gui-clamp/ui-react/src/api/LoopCache.test.js
+++ b/gui-clamp/ui-react/src/api/LoopCache.test.js
@@ -35,7 +35,7 @@ describe('Verify LoopCache functions', () => {
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -53,7 +53,7 @@ describe('Verify LoopCache functions', () => {
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -192,7 +192,7 @@ describe('Verify LoopCache functions', () => {
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -209,7 +209,7 @@ describe('Verify LoopCache functions', () => {
it('getOperationalPolicyPropertiesForName', () => {
const opPolicyJson = {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}};
expect(loopCache.getOperationalPolicyPropertiesForName("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(opPolicyJson);
@@ -280,7 +280,7 @@ describe('Verify LoopCache functions', () => {
it('updateOperationalPolicyProperties', () => {
const newOpPolicy = {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
};
diff --git a/gui-clamp/ui-react/src/api/LoopCacheMockFile.json b/gui-clamp/ui-react/src/api/LoopCacheMockFile.json
index e5a6702..733fcaa 100644
--- a/gui-clamp/ui-react/src/api/LoopCacheMockFile.json
+++ b/gui-clamp/ui-react/src/api/LoopCacheMockFile.json
@@ -92,7 +92,7 @@
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},