avocado_i2n.vmnet.node module¶
VMNode object for the vmnet utility.
SUMMARY¶
Copyright: Intra2net AG
CONTENTS¶
This class wraps up the functionality shared among the interfaces of the same platform like session management, etc.
INTERFACE¶
- class avocado_i2n.vmnet.node.VMNode(platform: VM, ephemeral: bool = False)[source]¶
Bases:
objectGet the vmnode class - a collection of interfaces sharing the same platform.
- property interfaces: dict[str, VMInterface]¶
Get a collection of interfaces the vm node represents.
- property ephemeral: bool¶
Check if the vm node is ephemeral.
returns: whether the vm node is ephemeral (spawned in a network).
- property platform: VM | None¶
Get a reference to the virtual machine object whose network configuration is represented by the vm node.
- property name: str | None¶
Get a proxy reference to the vm name.
- property params: Params¶
Get a proxy reference to the vm params.
Note
this is just a shallow copy to preserve the hierarchy: network level params = test level params -> vmnode level params = test object params -> interface level params = rarely used outside of the vm network
- property remote_sessions: list[RemoteSession] | None¶
Get a proxy reference to the vm sessions.
- property last_session: RemoteSession | None¶
Get a pointer to the last created vm session.
Used to facilitate the frequent access to a single session.
- check_interface(condition: Callable[[VMInterface], bool]) VMInterface | None[source]¶
Check whether one of node’s interfaces satisfies a boolean condition.
- Parameters:
condition – condition to try each interface on
- Returns:
the first interface satisfying the provided criteria or None