Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit f450bb7

Browse files
author
Yohann Leon
committed
Add recue action to devices
1 parent c2af27a commit f450bb7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

packet/Device.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ def reboot(self):
7979
"devices/%s/actions" % self.id, type="POST", params=params
8080
)
8181

82+
def rescue(self):
83+
params = {"type": "rescue"}
84+
return self.manager.call_api(
85+
"devices/%s/actions" % self.id, type="POST", params=params
86+
)
87+
8288
def ips(self):
8389
return self.manager.list_device_ips(self.id)
8490

test/test_packet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def test_device_actions(self):
108108
self.assertIsNone(device.power_off())
109109
self.assertIsNone(device.power_on())
110110
self.assertIsNone(device.reboot())
111+
self.assertIsNone(device.rescue())
111112

112113
def test_update_device(self):
113114
hostname = "updated hostname"

0 commit comments

Comments
 (0)