Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ jobs:
if: startsWith(matrix.os, 'ubuntu') && matrix.additional-sys-deps

- name: Install Nox
# argcomplete >= 3.6 uses Python 3.10 union-type syntax. Keep the
# nox CLI importable on the Python 3.9 matrix jobs while allowing
# newer jobs to use the unconstrained latest version.
run: python -m pip install nox toml "argcomplete<3.6; python_version < '3.10'"
# argcomplete 3.7.1 evaluates PEP 604 unions at import time on Python 3.9.
run: python -m pip install nox toml "argcomplete!=3.7.1; python_version < '3.10'"
if: matrix.nox-session

- name: Run Nox
Expand Down
17 changes: 17 additions & 0 deletions lisa/sut_orchestrator/openvmm/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ class DevicePassthroughContext:
requested_count: int = 0


@dataclass
class SharedTapNetworkContext:
tap_host_cidr: str = ""
address_mode: str = ""
reference_count: int = 0
bridge_created: bool = False
dnsmasq_pid_file: str = ""
dnsmasq_lease_file: str = ""
input_rules_added: List[str] = field(default_factory=_new_str_list)


@dataclass
class NodeContext:
vm_name: str = ""
Expand All @@ -67,6 +78,7 @@ class NodeContext:
tap_input_rules_added: List[str] = field(default_factory=_new_str_list)
tap_dnsmasq_pid_file: str = ""
tap_dnsmasq_lease_file: str = ""
shared_tap_network_key: str = ""
effective_network: Optional[OpenVmmNetworkSchema] = None
process_id: str = ""
command_line: str = ""
Expand All @@ -81,12 +93,17 @@ class OpenVmmHostContext:
default_factory=_new_str_dict
)
active_bridge_netfilter_count: int = 0
bridge_netfilter_lock: RLock = field(default_factory=RLock)
ssh_forwarding_lock: RLock = field(default_factory=RLock)
artifact_copy_lock: Lock = field(default_factory=Lock)
artifact_cache: Dict[str, str] = field(default_factory=_new_str_dict)
device_pool_lock: Lock = field(default_factory=Lock)
device_pool: Optional[Any] = None
device_pool_config_key: str = ""
tap_network_lock: RLock = field(default_factory=RLock)
shared_tap_networks: Dict[str, SharedTapNetworkContext] = field(
default_factory=dict
)


def get_node_context(node: Node) -> NodeContext:
Expand Down
Loading
Loading