MCPcopy Create free account
hub / github.com/apache/cloudstack / stop

Method stop

extensions/MaaS/maas.py:201–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

199 succeed({"status": "success", "power_state": "PowerOn"})
200
201 def stop(self):
202 sysid = self.data.get("system_id")
203 if not sysid:
204 fail("system_id missing for stop")
205 self.call_maas("POST", f"/machines/{sysid}/", {"op": "power_off"})
206 succeed({"status": "success", "power_state": "PowerOff"})
207
208 def reboot(self):
209 sysid = self.data.get("system_id")

Callers

nothing calls this directly

Calls 4

call_maasMethod · 0.95
failFunction · 0.70
succeedFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected