2020-07-29 00:13:37 +01:00
|
|
|
BASH: str = "bash"
|
2020-06-23 17:35:11 +01:00
|
|
|
ETHTOOL: str = "ethtool"
|
2022-06-01 19:12:20 +01:00
|
|
|
IP: str = "ip"
|
2020-06-23 17:35:11 +01:00
|
|
|
MOUNT: str = "mount"
|
2022-06-01 19:12:20 +01:00
|
|
|
NFTABLES: str = "nft"
|
2020-06-23 17:35:11 +01:00
|
|
|
OVS_VSCTL: str = "ovs-vsctl"
|
2022-06-01 19:12:20 +01:00
|
|
|
SYSCTL: str = "sysctl"
|
|
|
|
TC: str = "tc"
|
2020-09-09 18:27:06 +01:00
|
|
|
TEST: str = "test"
|
2022-06-01 19:12:20 +01:00
|
|
|
UMOUNT: str = "umount"
|
|
|
|
VCMD: str = "vcmd"
|
|
|
|
VNODED: str = "vnoded"
|
2020-06-23 17:11:37 +01:00
|
|
|
|
2023-04-13 23:48:02 +01:00
|
|
|
COMMON_REQUIREMENTS: list[str] = [
|
2020-07-29 00:13:37 +01:00
|
|
|
BASH,
|
|
|
|
ETHTOOL,
|
|
|
|
IP,
|
|
|
|
MOUNT,
|
2022-06-01 19:12:20 +01:00
|
|
|
NFTABLES,
|
2020-07-29 00:13:37 +01:00
|
|
|
SYSCTL,
|
|
|
|
TC,
|
2020-09-09 18:27:06 +01:00
|
|
|
TEST,
|
2022-06-01 19:12:20 +01:00
|
|
|
UMOUNT,
|
|
|
|
VCMD,
|
|
|
|
VNODED,
|
2020-07-29 00:13:37 +01:00
|
|
|
]
|
2023-04-13 23:48:02 +01:00
|
|
|
OVS_REQUIREMENTS: list[str] = [OVS_VSCTL]
|
2020-07-18 19:56:48 +01:00
|
|
|
|
|
|
|
|
2023-04-13 23:48:02 +01:00
|
|
|
def get_requirements(use_ovs: bool) -> list[str]:
|
2020-07-18 19:56:48 +01:00
|
|
|
"""
|
|
|
|
Retrieve executable requirements needed to run CORE.
|
|
|
|
|
|
|
|
:param use_ovs: True if OVS is being used, False otherwise
|
|
|
|
:return: list of executable requirements
|
|
|
|
"""
|
|
|
|
requirements = COMMON_REQUIREMENTS
|
|
|
|
if use_ovs:
|
|
|
|
requirements += OVS_REQUIREMENTS
|
|
|
|
return requirements
|