Commit Graph

2268 Commits

Author SHA1 Message Date
Archer Bowen
b0363a6b48 Merged PR 534: #2840 NODE_SEND_LOCAL_COMMAND
## Summary
Enables agents to use a new CAOS action ``NODE_SEND_LOCAL_COMMAND``.

## Test process

Added a new unit test as well as tested manually via sandbox notebooks.

## 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
- [X] 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: #2840
2024-09-24 10:47:08 +00:00
Archer Bowen
e29815305d #2840 Addressing PR comments. 2024-09-24 11:06:38 +01:00
Archer Bowen
88cbb783bc #2840 Fixed sphinx user guide formatting issues. 2024-09-20 13:54:13 +01:00
Archer Bowen
710a4d0e55 Merge remote-tracking branch 'origin/dev' into feature/2840_LOCAL_TERMINAL_COMMAND 2024-09-20 12:38:22 +01:00
Nick Todd
1a800ff83d Merged PR 552: Increment PrimAITE version.
## Summary
Increment PrimAITE version.

## Test process
Ran test suite.

## 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
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2896: Bump version.

Related work items: #2896
2024-09-19 11:27:48 +00:00
Nick Todd
0c576746aa #2896: Bump version. 2024-09-19 11:07:00 +01:00
Charlie Crane
6a177caadb Merged PR 544: #2871 - Add show functions to Agents
## Summary
This PR introduces a `show_history` function that can be used to view what actions have been taken by an agent over a training session. Be default, this won't show any `DONOTHING` actions.

## Test process
![image.png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/544/attachments/image.png)

## 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: #2871
2024-09-18 07:30:18 +00:00
Charlie Crane
8d3760b5a7 #2871 - Fix notebook failure 2024-09-17 16:19:43 +01:00
Nick Todd
d50c0c8911 Merged PR 538: NMNE config issues
## Summary
Update NMNE and NICObservation code to handle all four permutations of include_nmne and capture_nmne set to True/False.

## Test process
Updated existing NMNE and NICObservation tests.
All existing tests pass.

## 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

#2829

Related work items: #2829
2024-09-17 15:06:06 +00:00
Nick Todd
335ca9a02f Merged PR 546: Log the random seed used on each run
## Summary
Added changes so that the value of the random number seed is recorded in a log file when it's specified or the user asks for a RNG seed to be automatically generated.

## Test process
Updated existing RNG tests; added new test.

## 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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2879
2024-09-17 13:06:10 +00:00
Charlie Crane
3a5b75239d #2871 - Typo in Changelog 2024-09-17 12:05:40 +01:00
Czar Echavez
c589c3d3c2 Merged PR 543: #2880: fix action shape for num_ports + test
## Summary
Resolved a bug where the array for protocols is used to determine the num_ports instead of the array for ports

## Test process
Added a test that checks the shape of the RouterAddACLRule action

## 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

#2880: fix action shape for num_ports + test

Related work items: #2880
2024-09-17 09:38:05 +00:00
Charlie Crane
ccb91869c4 #2871 - Minor wording change to description in agents.rst 2024-09-17 10:17:18 +01:00
Nick Todd
67a7142221 Merge branch 'dev' into feature/2879-log-random-seed-value 2024-09-17 10:11:15 +01:00
Charlie Crane
c8f6459af6 #2871 - Changelog and documentation updates, corrected changes in Data manipulation demo notebook 2024-09-17 10:09:10 +01:00
Charlie Crane
cf9646a183 Merge branch 'dev' into feature/2871-Add_show_methods_agents 2024-09-17 09:46:27 +01:00
Charlie Crane
5d7935cde0 #2871 - Changes to notebooks following updates to action history 2024-09-17 09:39:32 +01:00
Nick Todd
078b898565 #2879: Update changelog. 2024-09-17 09:30:14 +01:00
Charlie Crane
78014cd54e Merged PR 540: Sync User Guide updates back into Dev
## Summary
Syncing Dev with release/3.3.0 following changes to the User Guide after review.

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

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] 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**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2837
2024-09-17 08:28:06 +00:00
Nick Todd
f3ca9c55c9 #2879: Update tests 2024-09-16 16:38:19 +01:00
Nick Todd
215ceaa6e8 #2879: Fix call to set_random_seed() in reset(). 2024-09-16 10:08:45 +01:00
Nick Todd
e0a1092834 #2879: Pre-commit fix. 2024-09-16 09:04:17 +01:00
Charlie Crane
5006e41546 #2871 - Updated the show_history() function to receive a list of actions to ignore when printing the history. Defaults to ignoring DONOTHING actions 2024-09-13 15:47:59 +01:00
Nick Todd
01a2c834ce #2879: Write seed value to log file. 2024-09-13 14:53:15 +01:00
Charlie Crane
f2a0eeaca2 #2871 - Updated show_history() method to use boolean 'include_nothing' for whether to include DONOTHING actions 2024-09-13 14:11:13 +01:00
Charlie Crane
7e1561924a Merged PR 542: Update arp.show() to include port_num
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

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

## Checklist
- [X] PR is linked to a **work item**
- [ ] **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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

#2456 - Minor change to arp.show() to include port number

Related work items: #2456
2024-09-13 13:01:47 +00:00
Nick Todd
08fcf1df19 #2879: Add generate_seed_value to global options. 2024-09-13 12:59:41 +01:00
Nick Todd
6ebe50c331 #2879: Reduce max seed value to comply with python random seed limit 2024-09-13 12:58:37 +01:00
Nick Todd
cd8fc6d42d #2879: Handle generate_seed_value option 2024-09-13 12:10:49 +01:00
Charlie Crane
59e1ca6615 #2456 - Merging in updates on Dev and resolving merge conflicts 2024-09-13 11:55:26 +01:00
Charlie Crane
c924b9ea46 #2871 - Initial commit of a show_history() function in AbstractAgent 2024-09-13 11:54:17 +01:00
Czar Echavez
519fb98e25 Merged PR 541: Config item that allows services and applications to return actual health states without the need to scan
## Summary
Added:
- services_requires_scan
- applications_requires_scan

To allow the agents to get the actual health state of services and applications without the need to scan

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/541?_a=files&path=/tests/unit_tests/_primaite/_game/_agent/test_observations.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
- [ ] 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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2864
2024-09-13 10:24:31 +00:00
Charlie Crane
17035be028 #2456 - Actioning review comment 2024-09-13 11:13:55 +01:00
Czar Echavez
9a2fb2a084 #2880: fix action shape for num_ports + test 2024-09-13 11:11:58 +01:00
Charlie Crane
94b30909ee #2456 - Updated Changelog 2024-09-13 10:56:12 +01:00
Charlie Crane
d8c85058ed #2456 - Minor change to arp.show() to include port number 2024-09-13 10:32:09 +01:00
Czar Echavez
454789f494 #2864: add to changelog 2024-09-13 09:34:09 +01:00
Czar Echavez
f1ff1f13cf #2864: added applications_requires_scan test 2024-09-13 09:08:44 +01:00
Czar Echavez
1f937a4c96 #2864: config not being passed correctly 2024-09-12 18:54:18 +01:00
Czar Echavez
7c26ca9d79 #2864: add configuration for services_requires_scan and applications_requires_scan 2024-09-12 16:07:14 +01:00
Czar Echavez
eb24d1270b Merged PR 529: #2842 and #2843: implement add user and disable user actions + tests
## Summary
Added actions which allow a user to be added and disabled

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/529?_a=files&path=/tests/integration_tests/game_layer/actions/test_user_account_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
- [ ] attended to any **TO-DOs** left in the code

#2842 and #2843: implement add user and disable user actions + tests

Related work items: #2842, #2843
2024-09-12 09:45:05 +00:00
Czar Echavez
8bd20275d0 #2842: fix test 2024-09-12 10:01:12 +01:00
Charlie Crane
31a820f021 Merged PR 539: ACL rules don't apply to ARP
## Summary
Updates to `router.py` to allow ARP layer-2 traffic to not be held up by ACL rules, as they now only handle layer-3 traffic.
An explicit ACL rule to permit ARP traffic is no longer needed.
Documentation updates to reflect change.

## Test process
All tests still pass.

## 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
- [X] 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: #2775
2024-09-12 08:17:45 +00:00
Charlie Crane
f908f9b23e #2775 - Actioning review comments 2024-09-11 15:50:14 +01:00
Charlie Crane
85863b1972 #2775 - Removed a print statement committed in error and updated the checks done in subject_to_acl following review 2024-09-11 15:36:51 +01:00
Charlie Crane
f95501f2a8 #2775 - Purging of more instances where the ARP acl rule is set and no longer necessary. Added a new test to show ARP is unaffected by ACL rules and actioned review comments 2024-09-11 15:12:36 +01:00
Charlie Crane
d5f1d0fda1 #2775 - Updated Changelog and bring up to date with dev 2024-09-11 11:28:27 +01:00
Charlie Crane
e9531bc392 Merge branch 'dev' into feature/2775-Refactor_Networking_Nodes 2024-09-11 11:27:26 +01:00
Charlie Crane
a2005df9f0 #2775 - Documentation updates 2024-09-11 10:56:44 +01:00
Charlie Crane
19d6fa2174 #2775 - Updated to look neater 2024-09-11 10:12:07 +01:00