Shreya Malviya
554a180fbd
Common: Create CustomPBAConfiguration using pydantic
2022-09-02 12:05:07 +05:30
Mike Salvatore
765ce858fb
Agent: Rename IAgentRepository -> IAgentBinaryRepository
...
PR #2239
2022-09-01 19:03:37 -04:00
Mike Salvatore
453f45e403
Merge pull request #2232 from guardicore/2218-get-network-interfaces
...
2218 get network interfaces
2022-08-31 15:54:13 -04:00
Kekoa Kaaikala
a954df3ed8
Agent: Replace get_local_network_interfaces
...
Replaced get_local_network_interfaces() with get_network_interfaces()
2022-08-31 19:25:42 +00:00
Mike Salvatore
973a82e087
Merge branch 'machine-repository' into develop
...
PR #2228
2022-08-31 10:54:54 -04:00
Mike Salvatore
ba7dab26d7
Island: Refactor how Machine objects are managed by IMachineRepository
...
- Replace `create_machine()` with `get_new_id()`
- Replace `update_machine()` with `upsert_machine()`
Benefits:
The repository doesn't store Machine objects that only have the ID
populated (unless that is the caller's desire).
Upsert instead of update allows the interface to be more permissive.
2022-08-31 10:17:20 -04:00
Kekoa Kaaikala
b10327af5c
Agent: Register agent interfaces
2022-08-30 15:36:30 +00:00
Mike Salvatore
4cbefedad2
Merge pull request #2222 from guardicore/2135-use-ipaddress
...
2135 use ipaddress
2022-08-30 10:04:21 -04:00
Kekoa Kaaikala
70a9251c5b
Agent: Fix type hints
2022-08-30 13:44:32 +00:00
Mike Salvatore
81128a4842
Island: Don't use Field() for simple defaults in Machine
2022-08-30 09:34:17 -04:00
Mike Salvatore
b538842e84
Island: Remove display_name from MongoMachineRepository._find_one()
2022-08-30 09:32:47 -04:00
Kekoa Kaaikala
fedfe4e45d
Agent: Use str(interface) instead of building string
2022-08-30 11:58:57 +00:00
Kekoa Kaaikala
e6663747eb
Agent: Use IPv4Interface's string
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
2b55c35a65
Agent: Use str() instead of .compressed
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
01c508e248
Agent: Replace NetworkInterface with IPv4Interface
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
f31ba824c6
UT: Fix tests
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
d8beba17fd
Agent: Update NetworkInterface to be IPv4Interface
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
75ba889f57
Agent: Fix typing issues
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
06ae6a8b90
Project: Add ipaddress types for mypy
2022-08-30 11:36:51 +00:00
Mike Salvatore
bf5e54ebc9
Island: Raise RemovalError from IMachineRepository.reset()
2022-08-30 07:34:20 -04:00
Mike Salvatore
383cfdfefe
Island: Rename `id_` parameter to `machine_id` in IMachineRepository
2022-08-30 07:30:41 -04:00
Mike Salvatore
0adf9d8467
Island: Add MongoMachineRepository
2022-08-30 05:03:47 -04:00
Mike Salvatore
1383332d33
Merge branch 'machine-model-defaults' into machine-repository
2022-08-29 20:31:44 -04:00
Mike Salvatore
5713d1c99b
UT: Add test_hardware_id_default()
2022-08-29 20:30:07 -04:00
Mike Salvatore
ac1cda40a8
Island: Add default value for Machine.hostname
2022-08-29 20:27:57 -04:00
Mike Salvatore
5d51b40475
Island: Add default value for Machine.operating_system_version
2022-08-29 20:26:11 -04:00
Mike Salvatore
3e2244cd62
UT: Add test_operating_system_default_value()
2022-08-29 20:26:11 -04:00
Mike Salvatore
40601b955c
Island: Add default value for Machine.network_interfaces
2022-08-29 20:26:05 -04:00
Mike Salvatore
da8ed9e6db
Island: Fix ICredentialsRepository import in MongoCredentialsRepository
2022-08-29 19:35:04 -04:00
Mike Salvatore
10d8d8e756
Island: Use MONGO_OBJECT_ID_KEY in MongoCredentialsRepository
2022-08-29 19:32:40 -04:00
Mike Salvatore
bf6125dd55
Island: Add MONGO_OBJECT_ID_KEY
2022-08-29 19:31:35 -04:00
Mike Salvatore
3eda8d640d
Island: Export IMachineRepository from repository package
2022-08-29 19:27:17 -04:00
Mike Salvatore
da752e041b
Project: Exclude vulture_allowlist.py from mypy checks
2022-08-29 19:27:17 -04:00
Mike Salvatore
eb3fe21b11
Island: Redefine IMachineRepository
2022-08-29 19:27:14 -04:00
Mike Salvatore
4c03c8aae9
Island: Import TypeAlias from typing_extensions
2022-08-29 19:13:23 -04:00
Mike Salvatore
c73a29c1b7
Common: Import TypeAlias from typing_extensions
2022-08-29 19:13:03 -04:00
Mike Salvatore
e98086e3d1
Project: Exclude vulture_allowlist.py from mypy checks
2022-08-29 15:46:29 -04:00
Mike Salvatore
6b083ca61b
Island: Remove superfluous "pass" from repository.errors
2022-08-29 15:15:49 -04:00
Mike Salvatore
1de552ea94
Island: Add UnknownRecordError to repository.errors
2022-08-29 15:14:42 -04:00
Mike Salvatore
694cdca883
Island: Make Machine.operating_system Optional
2022-08-29 15:00:45 -04:00
Mike Salvatore
ebcfe5a9fc
Island: Add docstrings to Machine
2022-08-29 14:35:45 -04:00
Mike Salvatore
43a53112fc
Island: Use monkey_island.cc.models.Machine in IMachineRepository
2022-08-29 14:35:10 -04:00
Mike Salvatore
cff363597a
Common: Annotate HardwareID as a TypeAlias
2022-08-29 14:34:28 -04:00
Mike Salvatore
b1f15b59f7
Common: Ignore arg-type error in DIContainer.register()
2022-08-29 14:28:48 -04:00
Mike Salvatore
599676c496
Project: Add mypy configuration to pyproject.toml
2022-08-29 14:16:43 -04:00
Mike Salvatore
4662dd8bed
Island: Annotate MachineID as a TypeAlias
...
See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
2022-08-29 13:50:12 -04:00
Ilija Lazoroski
1deb03b6d7
Island: Fix type annotation in AWSService
2022-08-29 12:46:34 -04:00
Ilija Lazoroski
6adacf702e
Island: Don't drop collections that starts with "config"
...
Fixes #2210
PR #2227
2022-08-29 12:46:20 -04:00
Mike Salvatore
4af38f6e8a
Project: Add .DS_Store to .gitignore
2022-08-29 12:32:15 -04:00
Mike Salvatore
797c2ea294
Merge branch 'v1.13.0-documentation-updates' into documentation-updates
2022-08-29 12:30:36 -04:00