Commit Graph

752 Commits

Author SHA1 Message Date
Czar.Echavez
eba10ae5ef #1962: clean up tests + improve the show command which shows the folders and files in file system 2023-11-06 11:56:44 +00:00
Czar.Echavez
535c1b19ab #1962: attempt to make the timestep actions look neater + adding logic that allows restoring a folder take multiple timesteps 2023-11-06 11:12:06 +00:00
Czar.Echavez
e70ceec716 #1962: folder/file restore logic 2023-11-06 10:22:08 +00:00
Czar.Echavez
51713bad74 #1962: split tests into managable files + implement deletion of folders and files + tests 2023-11-03 15:15:18 +00:00
Czar.Echavez
b2c3e273b7 #1962: separating file system into more managable files 2023-11-02 15:10:51 +00:00
Czar.Echavez
b67eb1bb34 #1962: separating file system into more managable files 2023-11-02 13:14:08 +00:00
Czar.Echavez
11848aa180 #1962: keeping track of deleted files 2023-10-31 15:52:44 +00:00
Czar Echavez
870707f86b Merged PR 200: Implement node scan and reset
## Summary
Implementing the ability for the simulation to scan all node components as well as the ability for the red agent to reveal the node and its components.

Implementing the ability for the simulation to reset a node

## Test process
Unit tests added

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #1961
2023-10-30 16:47:28 +00:00
Czar.Echavez
98ca33e994 #1961: scanning no longer happens every timestep - the scan is all done in one timestep after the required timestep countdown is complete 2023-10-30 15:34:13 +00:00
Czar.Echavez
1ddf400d6f #1961: node resetting 2023-10-27 18:28:34 +01:00
Czar.Echavez
68b22b6444 #1961: node scanning + applying timestep to all components within node + node revealing to red 2023-10-27 17:50:41 +01:00
Czar.Echavez
8783574442 #1961: os scan set up 2023-10-27 10:17:59 +01:00
Czar Echavez
091920c6f7 Merged PR 192: Implement missing actions
## Summary

#1947
Implementation of actions from the QTSL-820-2450 - ARCD Track 2 Common Interface Definition for Environments UC2 document

Covers:
- [X] BAS-12 NODE  SERVICE SCAN
- [X] BAS-15 NODE  SERVICE STOP
- [X] BAS-16 NODE  SERVICE START
- [X] BAS-17 NODE  SERVICE PAUSE
- [X] BAS-18 NODE  SERVICE RESUME
- [X] BAS-19 NODE  SERVICE RESTART
- [X] BAS-20 NODE  SERVICE DISABLE
- [X] BAS-21 NODE  SERVICE ENABLE

- [X] BAS-29 NODE  FILE SCAN
- [X] BAS-30 NODE  FILE CHECKHASH
- [X] BAS-33 NODE  FILE DELETE
- [X] BAS-34 NODE  FILE REPAIR

- [X] BAS-38 NODE  FOLDER SCAN
- [X] BAS-39 NODE  FOLDER CHECKHASH
- [X] BAS-41 NODE  FOLDER REPAIR

- [X] BAS-44 NODE SHUTDOWN
- [X] BAS-45 NODE STARTUP

- [X] RAS-30 NODE FILE DELETE
- [X] RAS-31 NODE FILE CORRUPT
- [X] RAS-36 NODE FOLDER DELETE
- [X] RAS-37 NODE FOLDER CORRUPT

## Test process

### node actions test
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/192?_a=files&path=/tests/unit_tests/_primaite/_simulator/_network/_hardware/test_node_actions.py

### service actions
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/192?_a=files&path=/tests/unit_tests/_primaite/_simulator/_system/_services/test_service_actions.py

### file/folder actions
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/192?_a=files&path=/tests/unit_tests/_primaite/_simulator/_file_system/test_file_system_actions.py

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #1947
2023-10-25 08:35:59 +00:00
Czar.Echavez
ac23633d82 #1947: Added documentation on how the node initialisation works 2023-10-24 15:41:39 +01:00
Czar.Echavez
c4b43c479e #1947: remove storing deleted files in a list and banish them to the shadow realm instead 2023-10-24 11:53:21 +01:00
Czar.Echavez
1e66795aff #1947: remove scan from components that cannot be scanned 2023-10-24 10:43:00 +01:00
Czar.Echavez
8b85d5d55b #1947: node startup/shutdown now take multiple timesteps to complete 2023-10-24 10:11:50 +01:00
Czar.Echavez
724beb1a29 #1947: folder/file scan now take multiple time steps to complete 2023-10-23 15:58:37 +01:00
Czar.Echavez
ffc4711afb #1947: added test for agent actions + clearing up the implementation of the request managers for filesystem 2023-10-20 12:58:58 +01:00
Czar.Echavez
0edb9b46a7 #1947: clean up existing work and clear up some itesm left in TODO 2023-10-18 13:21:05 +01:00
Czar.Echavez
4ee2235dd1 #1947: temp commit what is done so far 2023-10-16 11:42:56 +01:00
Czar.Echavez
9b5d95cbb9 #1947: refactor am->rm to align with refactor of ActionManager->RequestManager 2023-10-13 10:41:27 +01:00
Czar.Echavez
5e419455f1 Merge branch 'dev' into feature/1947-implement-missing-node-actions 2023-10-12 13:17:04 +01:00
Czar.Echavez
c9e4ba3c7d #1947: File and Folder hash checks 2023-10-12 11:16:25 +01:00
Marek Wolan
1c5eb392d0 Merged PR 184: Connect up actions in the simulator
## Summary
Finishes (?) the action system.
- Defines all UC2 common action space actions on SimComponents
- Links up SimComponents and their children, so actions can be passed from parent to child
- Add a function for enumerating all possible actions that exist on a SimComponent. (will be used for generating action space)
- add documentation for action management

note: I know that the way I approached this is a bit convoluted but It's just what I came up with to allow the actions to be as flexible and modular as the SimComponents themselves.

## Test process
Tested that the functionality works in scratch notebook. But also in the process of adding unit/integration tests now.

## Checklist
- [x] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [x] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #1923
2023-10-12 09:00:30 +00:00
Czar.Echavez
060bbf0506 #1947: added ability for files and folders to be scanned, corrupted and repaired 2023-10-10 15:14:47 +01:00
Czar.Echavez
a1b4d3d5e0 Merge branch 'feature/1812-traverse-actions-dict' into feature/1947-implement-missing-node-actions 2023-10-10 09:59:34 +01:00
Czar.Echavez
56eda38a6e #1947: git merge did not change add_action -> add_request 2023-10-10 09:52:40 +01:00
Marek Wolan
f3451b2fbb Replace request overwrite error with warning 2023-10-10 09:50:39 +01:00
Czar.Echavez
80d371c238 Merge branch 'feature/1812-traverse-actions-dict' into feature/1947-implement-missing-node-actions 2023-10-10 08:58:58 +01:00
Marek Wolan
18706be4ff Merge branch 'origin/dev' into feature/1812-traverse-actions-dict 2023-10-09 18:26:25 +01:00
Czar.Echavez
bbf2b09f96 #1947: Add ability for all simcomponents to be scanned - sets up ability for service, files, folders and nodes to be scanned 2023-10-09 16:47:36 +01:00
Czar Echavez
e06c51e5d6 Merged PR 191: Web Service and Client
## Summary
Added a WebServer service and a Web Browser (client) so that the simulation can emulate HTTP requests across the network via HTTPPacket transfer

## Test process
Written an integration test that tests Web Server and Web Browser sending and returning requests

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #1752, #1816, #1866, #1916, #1943
2023-10-09 13:21:17 +00:00
Czar.Echavez
318539fd8f #1943: apply suggestions from PR + fixing FTP bug + elaborating 2023-10-09 13:25:12 +01:00
Marek Wolan
5a5710c6ae Rename Sim Actions to request 2023-10-09 13:24:08 +01:00
Marek Wolan
2722abe428 Fix typos and formattig (based on PR Review) 2023-10-09 11:49:38 +01:00
Marek Wolan
df22d0de0b Merge remote-tracking branch 'origin/dev' into feature/1812-traverse-actions-dict 2023-10-09 11:39:31 +01:00
Czar.Echavez
853bb9eecc #1943: unit tests + refactoring HTTP -> Http 2023-10-06 12:10:57 +01:00
Czar.Echavez
be6b904db9 - Fixed FTP client server infinite recursion - ftp server and clients can be installed on the same node, this could cause a loop of requests
- fixed tests broken by merged with dev
2023-10-05 16:24:48 +01:00
Czar.Echavez
4699e87ea8 Merge branch 'dev' into feature/1943-service-web-server 2023-10-04 16:35:23 +01:00
Czar Echavez
c71e989ac6 Merged PR 187: Database Service backup using FTP
## Summary
- Used FTP changes to allow the database service to create a copy of the database.db file in the backup server
- Used FTP changes to allow the database service to restore the database.db file from a copy made in the backup server

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Related work items: #1752, #1796, #1816, #1866, #1916
2023-10-04 14:06:32 +00:00
Czar.Echavez
97f0267539 #1796: apply PR suggestions + fix tests 2023-10-04 11:33:18 +01:00
Czar.Echavez
82da21b073 \#1943:
- changelog added
- added documentation + example of using web server + web browser
- extended web server so that it also accepts ip addresses
- web server can differentiate between a normal page request and one that propagates into a DB request
- rename WebServerService -> WebServer
2023-10-03 16:56:35 +01:00
Czar.Echavez
4b5a73bd32 #1943: web server + client + tests + a few improvements to syslogging 2023-10-03 14:59:48 +01:00
Czar.Echavez
fdebfce406 #1796: Fix test + making the restore test better 2023-10-02 12:14:59 +01:00
Chris McCarthy
84405d7ed3 #1796 - Added docstring to the test_uc2_data_manipulation_scenario.py 2023-09-29 20:19:26 +01:00
Chris McCarthy
3dc8a0f222 #1796 - Made the FTP copy real files. Hardcoded the DatabaseService backup folder and filename. Added db restore and final query check to the data manipulation e2e test. 2023-09-29 20:14:42 +01:00
Czar.Echavez
bca3e6344e #1796: documentation 2023-09-28 14:09:32 +01:00
Czar.Echavez
6202d320a6 #1796: Add ability to create and restore database backups + add more sys log messages + remove the link size checks temporarily 2023-09-28 12:23:49 +01:00
Czar.Echavez
c096d06bcd #1796: pre installing system software 2023-09-26 15:14:24 +01:00