Commit Graph

10765 Commits

Author SHA1 Message Date
Mike Salvatore 388b9fe4ed Agent: Add missing `return` to handle_island_api_errors() 2022-09-21 15:05:16 -04:00
Mike Salvatore 69c8d3a667 Agent: Remove errant line that sets `self._control_client = None` 2022-09-21 15:04:07 -04:00
Mike Salvatore fbb8e85b46 Agent: Pass server to InfectionMonkey._register_agent() 2022-09-21 14:56:53 -04:00
Mike Salvatore b4c8ac7242 Island: Accept any kwargs in IIslandEventQueue.publish() 2022-09-21 12:53:39 -04:00
Mike Salvatore a76273fa0d
Merge pull request #2327 from guardicore/2266-replace-IslandModeService
Replace IslandModeService with event
2022-09-21 09:25:29 -04:00
Shreya Malviya a8fb05f2b8 Island: Simplify logic in test_island_mode.py with fixtures 2022-09-21 18:53:12 +05:30
Shreya Malviya 60db495cee UT: Use MagicMock to simulate internal server error in test_island_mode_post__invalid_mode() 2022-09-21 18:43:26 +05:30
Shreya Malviya 1afafd20dd UT: Simplify some logic in test_island_mode.py's flask_client fixture 2022-09-21 18:09:13 +05:30
Shreya Malviya 10e1177ef6 Island: Remove set_simulation_mode 2022-09-21 18:08:06 +05:30
Shreya Malviya 547637d151 Island: Subscribe ISimulationRepository.set_mode to IslandEventTopic.SET_ISLAND_MODE 2022-09-21 18:08:06 +05:30
Shreya Malviya add31fe397 Island: Rename IslandModeEnum.SET_ISLAND_MODE's subscribers' arguments from 'event' to 'mode' 2022-09-21 18:07:54 +05:30
Shreya Malviya c1e15f8be5 Island: Fix docstring in set_agent_configuration_per_island_mode 2022-09-21 17:41:54 +05:30
ilija-lazoroski 18ceb6c279
Merge pull request #2322 from guardicore/2181-credential-reuse-ete
2181 credential reuse ete
2022-09-21 13:58:12 +02:00
Shreya Malviya fb2165b2e8 UT: Fix broken IslandMode tests 2022-09-21 17:20:32 +05:30
Shreya Malviya 4e0f2c89ec UT: Remove test_island_mode_service.py 2022-09-21 16:39:24 +05:30
Shreya Malviya 6933d25768 Island: Remove IslandModeService 2022-09-21 16:38:57 +05:30
Shreya Malviya bc630e86e9 Island: Remove IslandModeService from IslandMode resource 2022-09-21 16:36:44 +05:30
Shreya Malviya d9d388d41c Island: Get Island mode from simulation repository in IslandMode's GET 2022-09-21 16:32:30 +05:30
Shreya Malviya 1f96ab5ea9 Island: Extract event topic to a variable in all Island event handler subscribe functions 2022-09-21 16:26:04 +05:30
Shreya Malviya 5a96d5b570 Island: Subscribe set_simulation_mode to IslandEventTopic.SET_ISLAND_MODE 2022-09-21 16:21:59 +05:30
Shreya Malviya b4c1879bf9 Island: Add set_simulation_mode Island event handler 2022-09-21 16:20:05 +05:30
Shreya Malviya 9ce652f1a5 Island: Rename IslandEventTopic.SET_MODE -> IslandEventTopic.SET_ISLAND_MODE 2022-09-21 16:15:33 +05:30
Shreya Malviya 822d9d6eec Island: Rename set_island_mode -> set_agent_configuration_per_island_mode 2022-09-21 16:13:33 +05:30
Shreya Malviya 8b87783998 Island: Subscribe set_island_mode to IslandEventTopic.SET_MODE 2022-09-21 16:07:00 +05:30
Shreya Malviya f20f11265b Island: Add set_island_mode Island event handler 2022-09-21 16:03:03 +05:30
Shreya Malviya 67e280fd7a Island: Publish SET_MODE event in IslandMode's PUT 2022-09-21 14:38:08 +05:30
Shreya Malviya 5675724843 Island: Add SET_MODE to IslandEventTopic 2022-09-21 14:33:16 +05:30
Mike Salvatore f8777cd37d
Merge pull request #2326 from guardicore/2256-initialize-i-machine-repository
2256 initialize i machine repository
2022-09-20 15:26:37 -04:00
Mike Salvatore 183b065ae6 Island: Set island=True on IMachineRepository initialization 2022-09-20 15:11:33 -04:00
Mike Salvatore a323441ffe Island: Add Machine.island field 2022-09-20 15:09:43 -04:00
Mike Salvatore f472963b78
Merge pull request #2324 from guardicore/2292-control-channel-client-api-client
2292 control channel client api client
2022-09-20 14:47:51 -04:00
Mike Salvatore 897d1e39ac Agent: Remove debug print from handle_island_api_errors() 2022-09-20 14:45:17 -04:00
Mike Salvatore aed9022a7a Island: Register reset_machine_repository for CLEAR_SIMULATION_DATA 2022-09-20 14:34:25 -04:00
Kekoa Kaaikala 53dc34f895 Agent: Fix typo in IIslandAPIClient 2022-09-20 18:34:04 +00:00
Mike Salvatore 35025ead18 Island: Add reset_machine_repository 2022-09-20 14:33:44 -04:00
Kekoa Kaaikala 2a1396c82d Agent: Use response.json() in HTTPIslandAPIClient 2022-09-20 18:33:05 +00:00
Kekoa Kaaikala 022630ddc1 Agent: Simplify error handling in ControlChannel 2022-09-20 18:32:20 +00:00
Mike Salvatore 36142774dd Island: Initialize IMachineRepository on Island start 2022-09-20 14:27:58 -04:00
Mike Salvatore ff0a57aa93 Island: Add initialize_machine_repository() 2022-09-20 14:27:32 -04:00
Kekoa Kaaikala 417d167026 Agent: Simplify error handling in HTTPIslandAPIClient 2022-09-20 18:27:17 +00:00
Kekoa Kaaikala 1c6ca24a47 Agent: Move register_agent out of ControlChannel 2022-09-20 18:21:55 +00:00
Kekoa Kaaikala 2f5bcff631 UT: Use island_api_client fixture 2022-09-20 18:04:16 +00:00
Mike Salvatore fca3a1357e Island: Add missing return type to _build_agent_binary_repository() 2022-09-20 13:48:50 -04:00
Kekoa Kaaikala 605e6ae496 UT: Add test for get_credentials_for_propagation 2022-09-20 17:47:10 +00:00
Kekoa Kaaikala 4c3a1ba89a UT: Add test for get_config 2022-09-20 17:47:10 +00:00
Kekoa Kaaikala fd08212763 UT: Add test for should_agent_stop 2022-09-20 17:47:10 +00:00
Kekoa Kaaikala 44d8dbeb5c Island: Get rid of server param in IslandAPIClient 2022-09-20 17:46:03 +00:00
Kekoa Kaaikala 8ebcd2ea33 Island: Update register_agent errors 2022-09-20 17:46:03 +00:00
Kekoa Kaaikala 2dc4871a7d Agent: Pass IslandAPIClient to the ControlChannel 2022-09-20 17:38:53 +00:00
Kekoa Kaaikala 3e96a30a09 UT: Parametrize errors in tests 2022-09-20 17:35:57 +00:00