Problem/Opportunity
PR #217 adds a networkController (networkControlClass) with a single wake() (Wake-on-LAN) method. In review, @TB-1993 noted this class is the natural home for general network-switch interaction, not just wake:
I was thinking the networkController class would be where we would implement interacting with different network switches. So users could look up MAC addresses, IPs, enable/disable ports, firewalls etc.
WoL is kept as the first, focused capability so #217 can land; this issue tracks growing the seam.
Proposed Solution
Extend networkControlClass (device network: block) into a small facade over network/switch operations, dispatched by type: like the power modules, e.g.:
- Reachability:
isReachable() / waitForOnline(timeout) / waitForOffline() (pairs with wake(); deviceClass.pingTest() already offers ICMP).
- Address discovery:
getMacAddress() / getIpAddress() (ARP/neighbour table or DHCP lease).
- Managed switch / port control: enable/disable a port, PoE toggle, VLAN; optionally firewall rules — driven by a switch-specific
networkModules/ backend.
Each capability is optional per backend (a wol module only implements wake()), following the module-per-type pattern established by powerModules/.
Acceptance Criteria
networkControlClass exposes additional network verbs beyond wake(), each backed by a networkModules/ implementation selected by type.
- Unsupported verbs degrade with a clear error rather than
AttributeError.
- At least one managed-switch backend and the reachability helpers are implemented with examples.
Additional Notes
Problem/Opportunity
PR #217 adds a
networkController(networkControlClass) with a singlewake()(Wake-on-LAN) method. In review, @TB-1993 noted this class is the natural home for general network-switch interaction, not just wake:WoL is kept as the first, focused capability so #217 can land; this issue tracks growing the seam.
Proposed Solution
Extend
networkControlClass(devicenetwork:block) into a small facade over network/switch operations, dispatched bytype:like the power modules, e.g.:isReachable()/waitForOnline(timeout)/waitForOffline()(pairs withwake();deviceClass.pingTest()already offers ICMP).getMacAddress()/getIpAddress()(ARP/neighbour table or DHCP lease).networkModules/backend.Each capability is optional per backend (a
wolmodule only implementswake()), following the module-per-typepattern established bypowerModules/.Acceptance Criteria
networkControlClassexposes additional network verbs beyondwake(), each backed by anetworkModules/implementation selected bytype.AttributeError.Additional Notes