test/nm-service: default the devices to DISCONNETED not UNAVAILABLE

It is a little odd that client tests connect "UNAVAILABLE" devices, and
the devices return to "DISCONNECTED" after deactivation.

It differs from what happens in reality, and some client tools
(hey nm-cloud-setup) can break when they rightly assume that the
device is not ready for activation when it's "UNAVAILABLE" not
"DISCONNECTED".
This commit is contained in:
Lubomir Rintel
2025-04-10 11:07:41 +02:00
parent 548e27ef5f
commit 79b1877c02
4 changed files with 1563 additions and 1551 deletions

View File

@@ -868,7 +868,7 @@ class Device(ExportedObj):
self.activation_state_change_delay_ms = 50
self.hwaddr = hwaddr is None if "" else hwaddr
self.prp_state = NM.DeviceState.UNAVAILABLE
self.prp_state = NM.DeviceState.DISCONNECTED
if devtype == NM.DeviceType.MODEM:
udi = "/org/freedesktop/ModemManager1/Modem/0"