Renamed Control Loop to ACM
Issue-ID: POLICY-3940
Change-Id: I37d768ac339e4e354a369fcb659bf36da861d7aa
Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
diff --git a/gui-clamp/ui-react-lib/libIndex.js b/gui-clamp/ui-react-lib/libIndex.js
index 24e3072..9cd8e9d 100644
--- a/gui-clamp/ui-react-lib/libIndex.js
+++ b/gui-clamp/ui-react-lib/libIndex.js
@@ -55,16 +55,16 @@
export { default as PolicyDeploymentEditor } from '../ui-react/src/components/dialogs/Policy/PolicyDeploymentEditor';
export { default as PoliciesTreeViewer } from '../ui-react/src/components/dialogs/Policy/PoliciesTreeViewer';
export { default as PolicyToscaFileSelector } from '../ui-react/src/components/dialogs/Policy/PolicyToscaFileSelector';
-export { default as MonitorInstantiation } from '../ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation';
-export { default as InstantiationItem } from '../ui-react/src/components/dialogs/ControlLoop/InstantiationItem';
-export { default as InstantiationElements } from '../ui-react/src/components/dialogs/ControlLoop/InstantiationElements';
-export { default as InstantiationElementItem } from '../ui-react/src/components/dialogs/ControlLoop/InstantiationElementItem';
-export { default as InstancePropertiesModal } from '../ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal';
-export { default as InstantiationManagementModal } from '../ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal';
-export { default as ChangeOrderStateModal } from '../ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal';
-export { default as InstantiationOrderStateChangeItem } from '../ui-react/src/components/dialogs/ControlLoop/InstantiationOrderStateChangeItem';
-export { default as ControlLoopService } from '../ui-react/src/api/ControlLoopService';
-export { default as GetLocalToscaFileForUpload } from '../ui-react/src/components/dialogs/ControlLoop/GetLocalToscaFileForUpload';
-export { default as ReadAndConvertYaml } from '../ui-react/src/components/dialogs/ControlLoop/ReadAndConvertYaml';
-export { default as UploadToscaFile } from '../ui-react/src/components/dialogs/ControlLoop/UploadToscaFile';
-export { default as GetToscaTemplate } from '../ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate';
+export { default as MonitorInstantiation } from '../ui-react/src/components/dialogs/ACM/MonitorInstantiation';
+export { default as InstantiationItem } from '../ui-react/src/components/dialogs/ACM/InstantiationItem';
+export { default as InstantiationElements } from '../ui-react/src/components/dialogs/ACM/InstantiationElements';
+export { default as InstantiationElementItem } from '../ui-react/src/components/dialogs/ACM/InstantiationElementItem';
+export { default as InstancePropertiesModal } from '../ui-react/src/components/dialogs/ACM/InstancePropertiesModal';
+export { default as InstantiationManagementModal } from '../ui-react/src/components/dialogs/ACM/InstantiationManagementModal';
+export { default as ChangeOrderStateModal } from '../ui-react/src/components/dialogs/ACM/ChangeOrderStateModal';
+export { default as InstantiationOrderStateChangeItem } from '../ui-react/src/components/dialogs/ACM/InstantiationOrderStateChangeItem';
+export { default as ACMService } from '../ui-react/src/api/ACMService';
+export { default as GetLocalToscaFileForUpload } from '../ui-react/src/components/dialogs/ACM/GetLocalToscaFileForUpload';
+export { default as ReadAndConvertYaml } from '../ui-react/src/components/dialogs/ACM/ReadAndConvertYaml';
+export { default as UploadToscaFile } from '../ui-react/src/components/dialogs/ACM/UploadToscaFile';
+export { default as GetToscaTemplate } from '../ui-react/src/components/dialogs/ACM/GetToscaTemplate';
diff --git a/gui-clamp/ui-react/src/LoopUI.js b/gui-clamp/ui-react/src/LoopUI.js
index e593a08..46e12e1 100644
--- a/gui-clamp/ui-react/src/LoopUI.js
+++ b/gui-clamp/ui-react/src/LoopUI.js
@@ -51,13 +51,13 @@
import Spinner from 'react-bootstrap/Spinner';
import { Link } from 'react-router-dom';
-import ReadAndConvertYaml from "./components/dialogs/ControlLoop/ReadAndConvertYaml";
-import MonitorInstantiation from "./components/dialogs/ControlLoop/MonitorInstantiation";
-import GetLocalToscaFileForUpload from "./components/dialogs/ControlLoop/GetLocalToscaFileForUpload";
-import CommissioningModal from "./components/dialogs/ControlLoop/CommissioningModal";
-import InstancePropertiesModal from "./components/dialogs/ControlLoop/InstancePropertiesModal";
-import ChangeOrderStateModal from "./components/dialogs/ControlLoop/ChangeOrderStateModal";
-import InstantiationManagementModal from "./components/dialogs/ControlLoop/InstantiationManagementModal";
+import ReadAndConvertYaml from "./components/dialogs/ACM/ReadAndConvertYaml";
+import MonitorInstantiation from "./components/dialogs/ACM/MonitorInstantiation";
+import GetLocalToscaFileForUpload from "./components/dialogs/ACM/GetLocalToscaFileForUpload";
+import CommissioningModal from "./components/dialogs/ACM/CommissioningModal";
+import InstancePropertiesModal from "./components/dialogs/ACM/InstancePropertiesModal";
+import ChangeOrderStateModal from "./components/dialogs/ACM/ChangeOrderStateModal";
+import InstantiationManagementModal from "./components/dialogs/ACM/InstantiationManagementModal";
const StyledMainDiv = styled.div`
background-color: ${ props => props.theme.backgroundColor };
@@ -389,7 +389,7 @@
/>
<Route path="/monitorInstantiation" render={ (routeProps) => (<MonitorInstantiation { ...routeProps } />) }/>
<Route path="/instantiationManagement" render={ (routeProps) => (<InstantiationManagementModal { ...routeProps } />) }/>
- <Route path="/editControlLoopInstanceProperties" render={ (routeProps) => (<InstancePropertiesModal { ...routeProps } />) }/>
+ <Route path="/editACMInstanceProperties" render={ (routeProps) => (<InstancePropertiesModal { ...routeProps } />) }/>
<Route path="/changeOrderState" render={ (routeProps) => (<ChangeOrderStateModal { ...routeProps } />) }/>
</React.Fragment>
);
diff --git a/gui-clamp/ui-react/src/__snapshots__/LoopUI.test.js.snap b/gui-clamp/ui-react/src/__snapshots__/LoopUI.test.js.snap
index 222b2a7..c2a26fe 100644
--- a/gui-clamp/ui-react/src/__snapshots__/LoopUI.test.js.snap
+++ b/gui-clamp/ui-react/src/__snapshots__/LoopUI.test.js.snap
@@ -94,7 +94,7 @@
render={[Function]}
/>
<Route
- path="/editControlLoopInstanceProperties"
+ path="/editACMInstanceProperties"
render={[Function]}
/>
<Route
diff --git a/gui-clamp/ui-react/src/__snapshots__/OnapClamp.test.js.snap b/gui-clamp/ui-react/src/__snapshots__/OnapClamp.test.js.snap
index cc5541b..5bb4f3a 100644
--- a/gui-clamp/ui-react/src/__snapshots__/OnapClamp.test.js.snap
+++ b/gui-clamp/ui-react/src/__snapshots__/OnapClamp.test.js.snap
@@ -123,7 +123,7 @@
render={[Function]}
/>
<Route
- path="/editControlLoopInstanceProperties"
+ path="/editACMInstanceProperties"
render={[Function]}
/>
<Route
diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.js b/gui-clamp/ui-react/src/api/ACMService.js
similarity index 78%
rename from gui-clamp/ui-react/src/api/ControlLoopService.js
rename to 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 @@
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 @@
}
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 @@
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 @@
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 @@
}
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 @@
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 @@
}
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 @@
}
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
similarity index 82%
rename from gui-clamp/ui-react/src/api/ControlLoopService.test.js
rename to 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 @@
})
);
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 @@
})
);
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 @@
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -53,7 +53,7 @@
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -192,7 +192,7 @@
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
@@ -209,7 +209,7 @@
it('getOperationalPolicyPropertiesForName', () => {
const opPolicyJson = {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}};
expect(loopCache.getOperationalPolicyPropertiesForName("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(opPolicyJson);
@@ -280,7 +280,7 @@
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": []
}
},
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.js b/gui-clamp/ui-react/src/components/dialogs/ACM/AccordionHeader.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/AccordionHeader.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/AccordionHeader.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/AccordionHeader.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.js b/gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.js
similarity index 89%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.js
index 3486ebf..0c9e8b7 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.js
@@ -22,7 +22,7 @@
import Button from "react-bootstrap/Button";
import React, { useEffect, useState } from "react";
import InstantiationOrderStateChangeItem from "./InstantiationOrderStateChangeItem";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
import { Alert, Container, Dropdown } from "react-bootstrap";
const ModalStyled = styled(Modal)`
@@ -48,7 +48,7 @@
const ChangeOrderStateModal = (props) => {
const [show, setShow] = useState(true);
- const [controlLoopIdentifierList, setControlLoopIdentifierList] = useState([]);
+ const [ACMIdentifierList, setACMIdentifierList] = useState([]);
const [orderedState, setOrderedState] = useState('');
const [toscaOrderStateObject, setToscaOrderStateObject] = useState({});
const [instantiationOrderStateError, setInstantiationOrderStateError] = useState(false);
@@ -57,7 +57,7 @@
useEffect(async () => {
- const instantiationOrderState = await ControlLoopService.getInstanceOrderState(
+ const instantiationOrderState = await ACMService.getInstanceOrderState(
props.location.instantiationName,
props.location.instantiationVersion)
.catch(error => error.message);
@@ -66,11 +66,11 @@
console.log(orderStateJson);
- if (!instantiationOrderState.ok || orderStateJson['controlLoopIdentifierList'].length === 0) {
+ if (!instantiationOrderState.ok || orderStateJson['automationCompositionIdentifierList'].length === 0) {
setInstantiationOrderStateError(true);
setInstantiationOrderStateMsgError(orderStateJson);
} else {
- setControlLoopIdentifierList(orderStateJson['controlLoopIdentifierList']);
+ setACMIdentifierList(orderStateJson['automationCompositionIdentifierList']);
setOrderedState(orderStateJson['orderedState']);
}
}, []);
@@ -80,7 +80,7 @@
const stateChangeObject = {
orderedState: event,
- controlLoopIdentifierList: controlLoopIdentifierList
+ automationCompositionIdentifierList: ACMIdentifierList
}
setToscaOrderStateObject(stateChangeObject);
setOrderedState(event);
@@ -89,7 +89,7 @@
const handleSave = async () => {
console.log("handleSave called");
- const response = await ControlLoopService.changeInstanceOrderState(toscaOrderStateObject)
+ const response = await ACMService.changeInstanceOrderState(toscaOrderStateObject)
.catch(error => error.message);
if (response.ok) {
@@ -148,7 +148,7 @@
</Dropdown.Menu>
</Dropdown>
{
- controlLoopIdentifierList.map((clIdList, index) => (
+ ACMIdentifierList.map((clIdList, index) => (
<InstantiationOrderStateChangeItem title={ clIdList.name } orderState={ orderedState } index={ index } key={ index }/>
))
}
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.test.js
similarity index 89%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.test.js
index 63c6a60..598e6e3 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ChangeOrderStateModal.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/ChangeOrderStateModal.test.js
@@ -23,12 +23,13 @@
import ChangeOrderStateModal from "./ChangeOrderStateModal";
import { createMemoryHistory } from "history";
import { act } from "react-dom/test-utils";
-import clLoopList from "./testFiles/controlLoopList.json";
+import acmList from "./testFiles/acmList.json";
import orderedStateJson from "./testFiles/orderedStateJson.json";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
let logSpy = jest.spyOn(console, 'log')
const oldWindowLocation = window.location
+
describe('Verify ChangeOrderStateModal', () => {
const flushPromises = () => new Promise(setImmediate);
@@ -144,7 +145,7 @@
it('handleSave called when save button clicked and response is ok', async () => {
jest.resetAllMocks()
- const getInstanceOrderStateSpy = jest.spyOn(ControlLoopService, 'getInstanceOrderState')
+ const getInstanceOrderStateSpy = jest.spyOn(ACMService, 'getInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: true,
@@ -157,14 +158,14 @@
}
)
- const changeInstanceOrderStateSpy = jest.spyOn(ControlLoopService, 'changeInstanceOrderState')
+ const changeInstanceOrderStateSpy = jest.spyOn(ACMService, 'changeInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: true,
status: 200,
text: () => "OK",
json: () => {
- return Promise.resolve(clLoopList)
+ return Promise.resolve(acmList)
}
})
}
@@ -172,7 +173,7 @@
const component = mount(<ChangeOrderStateModal location={window.location}/>)
- await act( async () => {
+ act( async () => {
component.find('[variant="primary"]').simulate('click');
await expect(getInstanceOrderStateSpy).toHaveBeenCalled()
await expect(changeInstanceOrderStateSpy).toHaveBeenCalled()
@@ -183,7 +184,7 @@
it('handleSave called when save button clicked and response is not ok', async () => {
jest.resetAllMocks()
- const getInstanceOrderStateSpy = jest.spyOn(ControlLoopService, 'getInstanceOrderState')
+ const getInstanceOrderStateSpy = jest.spyOn(ACMService, 'getInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: true,
@@ -196,14 +197,14 @@
}
)
- const changeInstanceOrderStateSpy = jest.spyOn(ControlLoopService, 'changeInstanceOrderState')
+ const changeInstanceOrderStateSpy = jest.spyOn(ACMService, 'changeInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: false,
status: 200,
text: () => "OK",
json: () => {
- return Promise.resolve(clLoopList)
+ return Promise.resolve(acmList)
}
})
}
@@ -222,7 +223,7 @@
it('Check useEffect is being called', async () => {
jest.resetAllMocks()
- jest.spyOn(ControlLoopService, 'getInstanceOrderState')
+ jest.spyOn(ACMService, 'getInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: true,
@@ -235,14 +236,14 @@
}
)
- jest.spyOn(ControlLoopService, 'changeInstanceOrderState')
+ jest.spyOn(ACMService, 'changeInstanceOrderState')
.mockImplementationOnce(() => {
return Promise.resolve({
ok: true,
status: 200,
text: () => "OK",
json: () => {
- return Promise.resolve(clLoopList)
+ return Promise.resolve(acmList)
}
})
}
@@ -251,7 +252,7 @@
const component = mount(<ChangeOrderStateModal location={window.location}/>)
const useEffect = jest.spyOn(React, "useEffect");
- await act(async () => {
+ act(async () => {
await flushPromises()
component.update()
await expect(useEffect).toHaveBeenCalled();
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.js b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js
similarity index 90%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js
index 4f8aaae..db71cd9 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.js
@@ -21,7 +21,7 @@
import Button from "react-bootstrap/Button";
import React, { useEffect, useState } from "react";
import styled from "styled-components";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
import { Alert } from "react-bootstrap";
import CommissioningUtils from "./utils/CommissioningUtils";
@@ -60,9 +60,9 @@
const version = '1.0.0';
useEffect(async () => {
- const toscaTemplateResponse = await ControlLoopService.getToscaTemplate(name, version)
+ const toscaTemplateResponse = await ACMService.getToscaTemplate(name, version)
.catch(error => error.message);
- const toscaCommonProperties = await ControlLoopService.getCommonOrInstanceProperties(name, version, true)
+ const toscaCommonProperties = await ACMService.getCommonOrInstanceProperties(name, version, true)
.catch(error => error.message);
if (!toscaCommonProperties.ok) {
@@ -109,9 +109,9 @@
console.log("handleCommission called")
- await ControlLoopService.deleteToscaTemplate('ToscaServiceTemplateSimple', "1.0.0")
+ await ACMService.deleteToscaTemplate('ToscaServiceTemplateSimple', "1.0.0")
- const recommissioningResponse = await ControlLoopService.uploadToscaFile(fullToscaTemplate)
+ const recommissioningResponse = await ACMService.uploadToscaFile(fullToscaTemplate)
await receiveResponseFromCommissioning(recommissioningResponse)
}
@@ -128,7 +128,7 @@
backdrop="static"
keyboard={ false }>
<Modal.Header closeButton>
- <Modal.Title>Change Control Loop Common Properties</Modal.Title>
+ <Modal.Title>Change ACM Common Properties</Modal.Title>
</Modal.Header>
<br/>
<div style={ { padding: '5px 5px 0px 5px' } }>
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.test.js
similarity index 92%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.test.js
index 9642145..e3a50be 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/CommissioningModal.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/CommissioningModal.test.js
@@ -25,7 +25,7 @@
import CommissioningModal from "./CommissioningModal";
import commonProps from "./testFiles/commonProps.json";
import fullTemp from "./testFiles/fullTemplate.json";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
let logSpy = jest.spyOn(console, 'log')
const commonProperties = JSON.parse(JSON.stringify(commonProps))
@@ -97,7 +97,7 @@
});
it('getToscaTemplate gets called in useEffect with error', async() => {
- const fetchMock = jest.spyOn(ControlLoopService, 'getToscaTemplate').mockImplementation(() => Promise.resolve({
+ const fetchMock = jest.spyOn(ACMService, 'getToscaTemplate').mockImplementation(() => Promise.resolve({
ok: false,
status: 200,
text: () => "OK",
@@ -111,7 +111,7 @@
});
it('getCommonProperties gets called in useEffect with error', async() => {
- const fetchMock = jest.spyOn(ControlLoopService, 'getToscaTemplate').mockImplementation(() => Promise.resolve({
+ const fetchMock = jest.spyOn(ACMService, 'getToscaTemplate').mockImplementation(() => Promise.resolve({
ok: false,
status: 200,
text: () => "OK",
@@ -193,7 +193,7 @@
});
it('test handleCommission called on click', async () => {
- const deleteToscaTemplateSpy = jest.spyOn(ControlLoopService, 'deleteToscaTemplate').mockImplementation(() => {
+ const deleteToscaTemplateSpy = jest.spyOn(ACMService, 'deleteToscaTemplate').mockImplementation(() => {
Promise.resolve({
ok: true,
status: 200,
@@ -201,7 +201,7 @@
json: () => "{handleCommissioning}"
})
})
- const uploadToscaTemplateSpy = jest.spyOn(ControlLoopService, 'uploadToscaFile').mockImplementation(() => {
+ const uploadToscaTemplateSpy = jest.spyOn(ACMService, 'uploadToscaFile').mockImplementation(() => {
Promise.resolve({
ok: true,
status: 200,
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/DeleteToscaTemplate.js b/gui-clamp/ui-react/src/components/dialogs/ACM/DeleteToscaTemplate.js
similarity index 90%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/DeleteToscaTemplate.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/DeleteToscaTemplate.js
index c2703cc..3dbf7bd 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/DeleteToscaTemplate.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/DeleteToscaTemplate.js
@@ -20,14 +20,14 @@
import React, { useState } from "react";
import Button from "react-bootstrap/Button";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
const DeleteToscaTemplate = props => {
const deleteTemplateHandler = async () => {
console.log('deleteTemplateHandler called');
- const response = await ControlLoopService.deleteToscaTemplate(props.templateName, props.templateVersion)
+ const response = await ACMService.deleteToscaTemplate(props.templateName, props.templateVersion)
.catch(error => error.message);
if(!response.ok) {
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/DeleteToscaTemplate.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/DeleteToscaTemplate.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/DeleteToscaTemplate.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/DeleteToscaTemplate.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetLocalToscaFileForUpload.js b/gui-clamp/ui-react/src/components/dialogs/ACM/GetLocalToscaFileForUpload.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetLocalToscaFileForUpload.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/GetLocalToscaFileForUpload.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetLocalToscaFileForUpload.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/GetLocalToscaFileForUpload.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetLocalToscaFileForUpload.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/GetLocalToscaFileForUpload.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate.js b/gui-clamp/ui-react/src/components/dialogs/ACM/GetToscaTemplate.js
similarity index 90%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/GetToscaTemplate.js
index 70c1f41..e86c2cf 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/GetToscaTemplate.js
@@ -19,13 +19,13 @@
import React, { useState } from "react";
import Button from "react-bootstrap/Button";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
const GetToscaTemplate = (props) => {
const getTemplateHandler = async () => {
- const response = await ControlLoopService.getToscaTemplate(props.templateName, props.templateVersion)
+ const response = await ACMService.getToscaTemplate(props.templateName, props.templateVersion)
.catch(error => error.message);
if(!response.ok) {
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/GetToscaTemplate.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/GetToscaTemplate.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/GetToscaTemplate.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstancePropertiesModal.js
similarity index 93%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstancePropertiesModal.js
index 8c8d403..8d0023b 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/InstancePropertiesModal.js
@@ -21,7 +21,7 @@
import Modal from "react-bootstrap/Modal";
import styled from "styled-components";
import Button from "react-bootstrap/Button";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
import Alert from "react-bootstrap/Alert";
import * as PropTypes from "prop-types";
import InstantiationUtils from "./utils/InstantiationUtils";
@@ -66,10 +66,10 @@
const [instanceName, setInstanceName] = useState('')
useEffect(async () => {
- const toscaTemplateResponse = await ControlLoopService.getToscaTemplate(templateName, templateVersion)
+ const toscaTemplateResponse = await ACMService.getToscaTemplate(templateName, templateVersion)
.catch(error => error.message);
- const toscaInstanceProperties = await ControlLoopService.getCommonOrInstanceProperties(templateName, templateVersion, false)
+ const toscaInstanceProperties = await ACMService.getCommonOrInstanceProperties(templateName, templateVersion, false)
.catch(error => error.message);
if (!toscaInstanceProperties.ok) {
@@ -111,7 +111,7 @@
setToscaFullTemplate(InstantiationUtils.updateTemplate(jsonEditor.getValue(), toscaFullTemplate));
}
- const response = await ControlLoopService.createInstanceProperties(instanceName, toscaFullTemplate)
+ const response = await ACMService.createInstanceProperties(instanceName, toscaFullTemplate)
.catch(error => error.message);
if (response.ok) {
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstancePropertiesModal.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstancePropertiesModal.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstancePropertiesModal.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElementItem.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElementItem.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElementItem.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElementItem.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElementItem.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElementItem.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElementItem.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElementItem.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElements.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElements.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElements.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElements.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElements.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElements.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationElements.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationElements.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationItem.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationItem.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationItem.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationItem.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationItem.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationItem.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationItem.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationItem.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.js
similarity index 91%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.js
index b9db230..78c2685 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.js
@@ -20,12 +20,12 @@
*/
import Modal from "react-bootstrap/Modal";
-import { Alert, Container, Dropdown, Table } from "react-bootstrap";
+import { Alert, Container, Table } from "react-bootstrap";
import Button from "react-bootstrap/Button";
import React, { useEffect, useState } from "react";
import styled from "styled-components";
import { Link } from "react-router-dom";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
import Row from "react-bootstrap/Row";
import InstantiationUtils from "./utils/InstantiationUtils";
@@ -48,16 +48,17 @@
const InstantiationManagementModal = (props) => {
const [show, setShow] = useState(true);
const [instantiationList, setInstantiationList] = useState([]);
- const [deleteInstantiation, setDeleteInstantiation] = useState(false);
const [alertMessage, setAlertMessage] = useState(null);
useEffect(async () => {
- const response = await ControlLoopService.getControlLoopInstantiation();
+ const response = await ACMService.getACMInstantiation();
const instantiationListJson = await response.json();
- const parsedInstantiationList = InstantiationUtils.parseInstantiationList(instantiationListJson['controlLoopList']);
+ console.log(instantiationListJson);
+
+ const parsedInstantiationList = InstantiationUtils.parseInstantiationList(instantiationListJson['automationCompositionList']);
setInstantiationList(parsedInstantiationList);
}, []);
@@ -72,7 +73,6 @@
const deleteInstantiationHandler = async (index, instantiation) => {
console.log("deleteInstantiationHandler called");
- setDeleteInstantiation(true);
console.log(instantiation);
@@ -83,13 +83,12 @@
const name = instantiation.name;
const version = instantiation.version;
- const response = await ControlLoopService.deleteInstantiation(name, version);
+ const response = await ACMService.deleteInstantiation(name, version);
updateList(index);
if (response.ok) {
successAlert();
- setDeleteInstantiation(false);
} else {
await errorAlert(response);
}
@@ -147,7 +146,7 @@
<Modal.Body>
<Container>
<Row>
- <Link to={ { pathname: "/editControlLoopInstanceProperties" } }>
+ <Link to={ { pathname: "/editACMInstanceProperties" } }>
<Button variant="primary" type="null">Create Instance</Button>
</Link>
<HorizontalSpace/>
@@ -176,7 +175,7 @@
<td>{ instantiation.name }</td>
<td style={ { textAlign: "center" } }>
<Link to={ {
- pathname: "editControlLoopInstanceProperties",
+ pathname: "editACMInstanceProperties",
} } state={ instantiation.name }>
<Button variant="outline-success" type="null"
disabled={ true }
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.test.js
similarity index 94%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.test.js
index d6e33f2..e511ce0 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationManagementModal.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationManagementModal.test.js
@@ -25,8 +25,8 @@
import InstantiationManagementModal from "./InstantiationManagementModal";
import {act} from "react-dom/test-utils";
import {createMemoryHistory} from "history";
-import ControlLoopService from "../../../api/ControlLoopService";
-import clLoopList from "./testFiles/controlLoopList.json";
+import ACMService from "../../../api/ACMService";
+import acmLoopList from "./testFiles/acmList.json";
import {BrowserRouter} from "react-router-dom";
const logSpy = jest.spyOn(console, 'log')
@@ -99,14 +99,14 @@
it('Check useEffect is being called', async () => {
jest.resetAllMocks();
- jest.spyOn(ControlLoopService, 'getControlLoopInstantiation')
+ jest.spyOn(ACMService, 'getACMInstantiation')
.mockImplementationOnce(async () => {
return Promise.resolve({
ok: true,
status: 200,
text: () => "OK",
json: () => {
- return Promise.resolve(clLoopList);
+ return Promise.resolve(acmLoopList);
}
});
});
@@ -138,7 +138,7 @@
ok: true,
status: 200,
text: () => "OK",
- json: () => clLoopList
+ json: () => acmLoopList
})
)
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationOrderStateChangeItem.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationOrderStateChangeItem.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationOrderStateChangeItem.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationOrderStateChangeItem.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationOrderStateChangeItem.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationOrderStateChangeItem.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/InstantiationOrderStateChangeItem.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/InstantiationOrderStateChangeItem.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.js b/gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.js
similarity index 69%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.js
index 4186477..5699b56 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.js
@@ -22,7 +22,7 @@
import Modal from "react-bootstrap/Modal";
import Button from "react-bootstrap/Button";
import InstantiationItem from "./InstantiationItem";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
import InstantiationElements from "./InstantiationElements";
import { Alert } from "react-bootstrap";
@@ -35,21 +35,21 @@
const MonitorInstantiation = (props) => {
const [show, setShow] = useState(true);
- const [controlLoopList, setControlLoopList] = useState([]);
- const [controlLoopInstantiationOk, setControlLoopInstantiationOk] = useState(true);
- const [controlLoopInstantiationError, setControlLoopInstantiationError] = useState({});
+ const [acmList, setAcmList] = useState([]);
+ const [acmInstantiationOk, setAcmInstantiationOk] = useState(true);
+ const [acmInstantiationError, setACMInstantiationError] = useState({});
useEffect(async () => {
- const controlLoopInstantiation = await ControlLoopService.getControlLoopInstantiation()
+ const acmInstantiation = await ACMService.getACMInstantiation()
.catch(error => error.message);
- const controlLoopInstantiationJson = await controlLoopInstantiation.json();
+ const acmInstantiationJson = await acmInstantiation.json();
- if (!controlLoopInstantiation.ok || controlLoopInstantiationJson['controlLoopList'].length === 0) {
- setControlLoopInstantiationOk(false)
- setControlLoopInstantiationError(controlLoopInstantiationJson)
+ if (!acmInstantiation.ok || acmInstantiationJson['automationCompositionList'].length === 0) {
+ setAcmInstantiationOk(false)
+ setACMInstantiationError(acmInstantiationJson)
} else {
- setControlLoopList(controlLoopInstantiationJson['controlLoopList']);
+ setAcmList(acmInstantiationJson['automationCompositionList']);
}
}, [])
@@ -66,14 +66,14 @@
</Modal.Header>
<Modal.Body>
{
- controlLoopList.map((clList, index) => (
+ acmList.map((clList, index) => (
<InstantiationItem title={ clList["name"] } orderedState={ clList["orderedState"] } index={ index } key={ index } >
<InstantiationElements elements={ clList["elements"] } />
</InstantiationItem>
))
}
- <AlertStyled show={ !controlLoopInstantiationOk }
- variant="danger">Can't get control loop instantiation info:<br/>{ JSON.stringify(controlLoopInstantiationError, null, 2) }</AlertStyled>
+ <AlertStyled show={ !acmInstantiationOk }
+ variant="danger">Can't get acm instantiation info:<br/>{ JSON.stringify(acmInstantiationError, null, 2) }</AlertStyled>
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" type="null" onClick={ handleClose }>Close</Button>
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.test.js
similarity index 93%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.test.js
index 9bc8c04..5923f10 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/MonitorInstantiation.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/MonitorInstantiation.test.js
@@ -23,8 +23,8 @@
import { act } from "react-dom/test-utils";
import { createMemoryHistory } from "history";
import MonitorInstantiation from "./MonitorInstantiation";
-import ControlLoopService from "../../../api/ControlLoopService";
-import clLoopList from "./testFiles/controlLoopList.json";
+import ACMService from "../../../api/ACMService";
+import clLoopList from "./testFiles/acmList.json";
const logSpy = jest.spyOn(console, 'log')
const history = createMemoryHistory();
@@ -68,7 +68,7 @@
it('Check useEffect is being called', async () => {
jest.resetAllMocks();
- jest.spyOn(ControlLoopService, 'getControlLoopInstantiation')
+ jest.spyOn(ACMService, 'getACMInstantiation')
.mockImplementationOnce(async () => {
return Promise.resolve({
ok: true,
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ReadAndConvertYaml.js b/gui-clamp/ui-react/src/components/dialogs/ACM/ReadAndConvertYaml.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/ReadAndConvertYaml.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/ReadAndConvertYaml.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/ReadAndConvertYaml.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/ReadAndConvertYaml.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/ReadAndConvertYaml.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/ReadAndConvertYaml.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js b/gui-clamp/ui-react/src/components/dialogs/ACM/UploadToscaFile.js
similarity index 91%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/UploadToscaFile.js
index 380838e..4357a9f 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/UploadToscaFile.js
@@ -19,7 +19,7 @@
import Button from "react-bootstrap/Button";
import React, { useState } from "react";
-import ControlLoopService from "../../../api/ControlLoopService";
+import ACMService from "../../../api/ACMService";
const UploadToscaFile = (props) => {
@@ -27,7 +27,7 @@
event.preventDefault();
console.log('postServiceTemplateHandler called');
- const response = await ControlLoopService.uploadToscaFile(props.toscaObject)
+ const response = await ACMService.uploadToscaFile(props.toscaObject)
.catch(error => error.message);
// const responseMessage = await response.text();
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/UploadToscaFile.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/UploadToscaFile.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/UploadToscaFile.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/AccordionHeader.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/AccordionHeader.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/AccordionHeader.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/AccordionHeader.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/ChangeOrderStateModal.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/ChangeOrderStateModal.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/ChangeOrderStateModal.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/ChangeOrderStateModal.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/CommissioningModal.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/CommissioningModal.test.js.snap
similarity index 96%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/CommissioningModal.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/CommissioningModal.test.js.snap
index 5ed3f3e..4ff976a 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/CommissioningModal.test.js.snap
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/CommissioningModal.test.js.snap
@@ -13,7 +13,7 @@
closeLabel="Close"
>
<ModalTitle>
- Change Control Loop Common Properties
+ Change ACM Common Properties
</ModalTitle>
</ModalHeader>
<br />
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/DeleteToscaTemplate.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/DeleteToscaTemplate.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/DeleteToscaTemplate.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/DeleteToscaTemplate.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/GetLocalToscaFileForUpload.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/GetLocalToscaFileForUpload.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/GetLocalToscaFileForUpload.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/GetLocalToscaFileForUpload.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/GetToscaTemplate.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/GetToscaTemplate.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/GetToscaTemplate.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/GetToscaTemplate.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstancePropertiesModal.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstancePropertiesModal.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstancePropertiesModal.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstancePropertiesModal.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationElementItem.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationElementItem.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationElementItem.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationElementItem.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationElements.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationElements.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationElements.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationElements.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationItem.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationItem.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationItem.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationItem.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationManagementModal.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationManagementModal.test.js.snap
similarity index 97%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationManagementModal.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationManagementModal.test.js.snap
index 21a8dd5..b800f52 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationManagementModal.test.js.snap
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationManagementModal.test.js.snap
@@ -26,7 +26,7 @@
<Link
to={
Object {
- "pathname": "/editControlLoopInstanceProperties",
+ "pathname": "/editACMInstanceProperties",
}
}
>
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationOrderStateChangeItem.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationOrderStateChangeItem.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/InstantiationOrderStateChangeItem.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/InstantiationOrderStateChangeItem.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/MonitorInstantiation.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/MonitorInstantiation.test.js.snap
similarity index 93%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/MonitorInstantiation.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/MonitorInstantiation.test.js.snap
index ad1f7f1..2b07252 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/MonitorInstantiation.test.js.snap
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/MonitorInstantiation.test.js.snap
@@ -21,7 +21,7 @@
show={false}
variant="danger"
>
- Can't get control loop instantiation info:
+ Can't get acm instantiation info:
<br />
{}
</Styled(Alert)>
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/ReadAndConvertYaml.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/ReadAndConvertYaml.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/ReadAndConvertYaml.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/ReadAndConvertYaml.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/UploadToscaFile.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/UploadToscaFile.test.js.snap
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/__snapshots__/UploadToscaFile.test.js.snap
rename to gui-clamp/ui-react/src/components/dialogs/ACM/__snapshots__/UploadToscaFile.test.js.snap
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/controlLoopList.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/acmList.json
similarity index 97%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/controlLoopList.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/acmList.json
index d549879..f854d90 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/controlLoopList.json
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/acmList.json
@@ -1,5 +1,5 @@
{
- "controlLoopList": [
+ "automationCompositionList": [
{
"name": "PMSHInstance0",
"version": "1.0.1",
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/commonProps.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/commonProps.json
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/commonProps.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/commonProps.json
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/fullTemplate.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/fullTemplate.json
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/fullTemplate.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/fullTemplate.json
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/instanceProps.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/instanceProps.json
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/instanceProps.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/instanceProps.json
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/jsonEditorData.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/jsonEditorData.json
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/jsonEditorData.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/jsonEditorData.json
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/orderedStateJson.json b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/orderedStateJson.json
similarity index 76%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/orderedStateJson.json
rename to gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/orderedStateJson.json
index 91c892d..1179fce 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/testFiles/orderedStateJson.json
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/testFiles/orderedStateJson.json
@@ -1,6 +1,6 @@
{
"orderedState": "PASSIVE",
- "controlLoopIdentifierList": [
+ "acmIdentifierList": [
{
"name": "PMSH_Instance1",
"version": "2.3.1"
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/CommissioningUtils.js b/gui-clamp/ui-react/src/components/dialogs/ACM/utils/CommissioningUtils.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/CommissioningUtils.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/utils/CommissioningUtils.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/CommissioningUtils.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/utils/CommissioningUtils.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/CommissioningUtils.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/utils/CommissioningUtils.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/InstantiationUtils.js b/gui-clamp/ui-react/src/components/dialogs/ACM/utils/InstantiationUtils.js
similarity index 94%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/InstantiationUtils.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/utils/InstantiationUtils.js
index fd83432..aaaa1bd 100644
--- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/InstantiationUtils.js
+++ b/gui-clamp/ui-react/src/components/dialogs/ACM/utils/InstantiationUtils.js
@@ -23,12 +23,13 @@
const InstantiationUtils = {
- parseInstantiationList: (controlLoopList) => {
- const parsedControlLoopList = [];
+ parseInstantiationList: (acmList) => {
+ console.log(acmList);
+ const parsedAcmList = [];
- controlLoopList.map((instance, index) => {
+ acmList.map((instance, index) => {
- const controlLoopObj = {
+ const acmObj = {
index,
name: instance['name'],
version: instance['version'],
@@ -37,10 +38,10 @@
disableDelete: instance['state'] !== 'UNINITIALISED'
}
- parsedControlLoopList.push(controlLoopObj);
+ parsedAcmList.push(acmObj);
});
- return parsedControlLoopList;
+ return parsedAcmList;
},
makeSchemaForInstanceProperties: (instanceProps) => {
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/InstantiationUtils.test.js b/gui-clamp/ui-react/src/components/dialogs/ACM/utils/InstantiationUtils.test.js
similarity index 100%
rename from gui-clamp/ui-react/src/components/dialogs/ControlLoop/utils/InstantiationUtils.test.js
rename to gui-clamp/ui-react/src/components/dialogs/ACM/utils/InstantiationUtils.test.js
diff --git a/gui-clamp/ui-react/src/components/dialogs/InstantiationManagementModal.test.js b/gui-clamp/ui-react/src/components/dialogs/InstantiationManagementModal.test.js
deleted file mode 100644
index 25292d0..0000000
--- a/gui-clamp/ui-react/src/components/dialogs/InstantiationManagementModal.test.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-import { mount, shallow } from "enzyme";
-import React from "react";
-import toJson from "enzyme-to-json";
-import { createMemoryHistory } from "history";
-import { act } from "react-dom/test-utils";
-import ChangeOrderStateModal from "./ControlLoop/ChangeOrderStateModal";
-
-describe('Verify InstantiationManagementModal', () => {
-
- it("renders without crashing", () => {
- shallow(<ChangeOrderStateModal />);
- });
-
- it("renders correctly", () => {
- const tree = shallow(<ChangeOrderStateModal />);
- expect(toJson(tree)).toMatchSnapshot();
- });
-
- it('should have save button element', () => {
- const container = shallow(<ChangeOrderStateModal/>)
- expect(container.find('[variant="primary"]').length).toEqual(1);
- });
-
- it('handleSave called when save button clicked', () => {
- const history = createMemoryHistory();
- const component = mount(<ChangeOrderStateModal history={ history }/>)
- const logSpy = jest.spyOn(console, 'log');
-
- act(() => {
- component.find('[variant="primary"]').simulate('click');
- expect(logSpy).toHaveBeenCalledWith('handleSave called');
- });
- });
-
- it('should have close button element', () => {
- const container = shallow(<ChangeOrderStateModal/>)
- expect(container.find('[variant="secondary"]').length).toEqual(1);
- });
-
- it('handleClose called when close button clicked', () => {
- const history = createMemoryHistory();
- const component = mount(<ChangeOrderStateModal history={ history }/>)
- const logSpy = jest.spyOn(console, 'log');
-
- act(() => {
- component.find('[variant="secondary"]').simulate('click');
- expect(logSpy).toHaveBeenCalledWith('handleClose called');
- });
- });
-});
diff --git a/gui-clamp/ui-react/src/components/dialogs/PerformActions.js b/gui-clamp/ui-react/src/components/dialogs/PerformActions.js
index ba7c99d..428902e 100644
--- a/gui-clamp/ui-react/src/components/dialogs/PerformActions.js
+++ b/gui-clamp/ui-react/src/components/dialogs/PerformActions.js
@@ -47,7 +47,7 @@
const loopName = this.state.loopName;
if (action === 'delete') {
- if (window.confirm('You are about to remove Control Loop Model "' + loopName +
+ if (window.confirm('You are about to remove ACM Model "' + loopName +
'". Select OK to continue with deletion or Cancel to keep the model.') === false) {
return;
}
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyEditor.test.js b/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyEditor.test.js
index 5e63ab4..339d660 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyEditor.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyEditor.test.js
@@ -49,7 +49,7 @@
],
"eventName": "vLoadBalancer",
"policyVersion": "v0.0.1",
- "controlLoopSchemaType": "VM",
+ "acmSchemaType": "VM",
"policyName": "DCAE.Config_tca-hi-lo"
}
]
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyModal.test.js b/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
index 658b19e..2cb1af5 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/PolicyModal.test.js
@@ -45,7 +45,7 @@
"name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
"configurationsJson": {
"operational_policy": {
- "controlLoop": {},
+ "acm": {},
"policies": []
}
},
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js b/gui-clamp/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
index 5b59760..538f0a8 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
@@ -31,7 +31,7 @@
let toscaYaml = fs.readFileSync('src/components/dialogs/Policy/toscaData.test.yaml', { encoding: 'utf8', flag: 'r' })
const toscaData = {
- "policyModelType": "onap.policies.controlloop.Guard",
+ "policyModelType": "onap.policies.acm.Guard",
"version": "1.0.0",
"policyAcronym": "Guard",
"createdDate": "2021-04-09T02:29:31.407356Z",
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/__snapshots__/PolicyEditor.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/Policy/__snapshots__/PolicyEditor.test.js.snap
index ea40bfd..ea435fc 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/__snapshots__/PolicyEditor.test.js.snap
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/__snapshots__/PolicyEditor.test.js.snap
@@ -12,7 +12,7 @@
"domain": "measurementsForVfScaling",
"metricsPerEventName": Array [
Object {
- "controlLoopSchemaType": "VM",
+ "acmSchemaType": "VM",
"eventName": "vLoadBalancer",
"policyName": "DCAE.Config_tca-hi-lo",
"policyScope": "DCAE",
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/toscaInstantiationData.test.json b/gui-clamp/ui-react/src/components/dialogs/Policy/toscaInstantiationData.test.json
index d740203..176d921 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/toscaInstantiationData.test.json
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/toscaInstantiationData.test.json
@@ -1,5 +1,5 @@
{
- "controlLoopList": [
+ "acmList": [
{
"name": "PMSHInstance0",
"version": "1.0.1",
diff --git a/gui-clamp/ui-react/src/components/dialogs/__snapshots__/InstantiationManagementModal.test.js.snap b/gui-clamp/ui-react/src/components/dialogs/__snapshots__/InstantiationManagementModal.test.js.snap
deleted file mode 100644
index fde9ba1..0000000
--- a/gui-clamp/ui-react/src/components/dialogs/__snapshots__/InstantiationManagementModal.test.js.snap
+++ /dev/null
@@ -1,114 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Verify InstantiationManagementModal renders correctly 1`] = `
-<Styled(Modal)
- backdrop="static"
- keyboard={false}
- onHide={[Function]}
- show={true}
- size="sm"
->
- <ModalHeader
- closeButton={true}
- closeLabel="Close"
- >
- <ModalTitle>
- Manage Instantiation
- </ModalTitle>
- </ModalHeader>
- <div
- style={
- Object {
- "padding": "5px 5px 0 5px",
- }
- }
- >
- <ModalBody>
- <Container
- fluid={false}
- >
- <Dropdown
- navbar={false}
- onSelect={[Function]}
- >
- <DropdownToggle
- id="dropdown-basic"
- variant="dark"
- >
- Select Order State
- </DropdownToggle>
- <DropdownMenu
- align="left"
- alignRight={false}
- flip={true}
- >
- <DropdownItem
- as={
- Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
- }
- }
- disabled={false}
- eventKey="UNINITIALISED"
- >
- UNINITIALISED
- </DropdownItem>
- <DropdownItem
- as={
- Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
- }
- }
- disabled={false}
- eventKey="PASSIVE"
- >
- PASSIVE
- </DropdownItem>
- <DropdownItem
- as={
- Object {
- "$$typeof": Symbol(react.forward_ref),
- "render": [Function],
- }
- }
- disabled={false}
- eventKey="RUNNING"
- >
- RUNNING
- </DropdownItem>
- </DropdownMenu>
- </Dropdown>
- </Container>
- <Styled(Alert)
- show={false}
- variant="danger"
- >
- Can't get instantiation ordered state:
- <br />
- {}
- </Styled(Alert)>
- </ModalBody>
- <styled.div />
- </div>
- <ModalFooter>
- <Button
- active={false}
- disabled={false}
- onClick={[Function]}
- variant="primary"
- >
- Save
- </Button>
- <Button
- active={false}
- disabled={false}
- onClick={[Function]}
- variant="secondary"
- >
- Close
- </Button>
- </ModalFooter>
-</Styled(Modal)>
-`;
diff --git a/gui-clamp/ui-react/src/components/menu/MenuBar.js b/gui-clamp/ui-react/src/components/menu/MenuBar.js
index 59cff22..769edb0 100644
--- a/gui-clamp/ui-react/src/components/menu/MenuBar.js
+++ b/gui-clamp/ui-react/src/components/menu/MenuBar.js
@@ -113,14 +113,14 @@
<NavDropdown.Item as={ StyledLink } to="/deploy" disabled={ this.state.disabled }>Deploy to DCAE (DEPLOY)</NavDropdown.Item>
<NavDropdown.Item as={ StyledLink } to="/undeploy" disabled={ this.state.disabled }>UnDeploy to DCAE (UNDEPLOY)</NavDropdown.Item>
</StyledNavDropdown>
- <StyledNavDropdown title="TOSCA Control Loop">
+ <StyledNavDropdown title="TOSCA Automation Composition">
<NavDropdown.Header>Instantiation</NavDropdown.Header>
<NavDropdown.Item as={ StyledLink } to="/instantiationManagement">Instantiation Management</NavDropdown.Item>
<NavDropdown.Divider/>
<NavDropdown.Header>Commissioning</NavDropdown.Header>
- <NavDropdown.Item as={ StyledLink } to="/readToscaTemplate">Manage Commissioned Tosca Template</NavDropdown.Item>
- <NavDropdown.Item as={ StyledLink } to="/uploadToscaFile">Upload Tosca to Commissioning</NavDropdown.Item>
- <NavDropdown.Item as={ StyledLink } to="/getJsonSchema">Edit Control Loop Common Properties</NavDropdown.Item>
+ <NavDropdown.Item as={ StyledLink } to="/readToscaTemplate">Manage Commissioned Automation Composition Template</NavDropdown.Item>
+ <NavDropdown.Item as={ StyledLink } to="/uploadToscaFile">Upload Automation Composition to Commissioning</NavDropdown.Item>
+ <NavDropdown.Item as={ StyledLink } to="/getJsonSchema">Edit Automation Composition Properties</NavDropdown.Item>
</StyledNavDropdown>
<StyledNavDropdown title="Help">
<StyledNavLink href="https://wiki.onap.org/" target="_blank">Wiki</StyledNavLink>
diff --git a/gui-clamp/ui-react/src/components/menu/__snapshots__/MenuBar.test.js.snap b/gui-clamp/ui-react/src/components/menu/__snapshots__/MenuBar.test.js.snap
index dbae793..86ae72d 100644
--- a/gui-clamp/ui-react/src/components/menu/__snapshots__/MenuBar.test.js.snap
+++ b/gui-clamp/ui-react/src/components/menu/__snapshots__/MenuBar.test.js.snap
@@ -1003,7 +1003,7 @@
</DropdownItem>
</Styled(NavDropdown)>
<Styled(NavDropdown)
- title="TOSCA Control Loop"
+ title="TOSCA Automation Composition"
>
<DropdownHeader
role="heading"
@@ -1146,7 +1146,7 @@
disabled={false}
to="/readToscaTemplate"
>
- Manage Commissioned Tosca Template
+ Manage Commissioned Automation Composition Template
</DropdownItem>
<DropdownItem
as={
@@ -1211,7 +1211,7 @@
disabled={false}
to="/uploadToscaFile"
>
- Upload Tosca to Commissioning
+ Upload Automation Composition to Commissioning
</DropdownItem>
<DropdownItem
as={
@@ -1276,7 +1276,7 @@
disabled={false}
to="/getJsonSchema"
>
- Edit Control Loop Common Properties
+ Edit Automation Composition Properties
</DropdownItem>
</Styled(NavDropdown)>
<Styled(NavDropdown)