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

Commit 7e6b45f

Browse files
authored
Merge pull request #59 from obynio/add-rescue
Add rescue action to devices
2 parents c2af27a + 4fa0d8e commit 7e6b45f

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
@@ -107,6 +107,7 @@ def test_device_actions(self):
107107
device = self.manager.get_device("9dec7266")
108108
self.assertIsNone(device.power_off())
109109
self.assertIsNone(device.power_on())
110+
self.assertIsNone(device.rescue())
110111
self.assertIsNone(device.reboot())
111112

112113
def test_update_device(self):

0 commit comments

Comments
 (0)