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

Method stop

tools/marvin/marvin/lib/base.py:771–781  ·  view source on GitHub ↗

Stop the instance

(self, apiclient, forced=None)

Source from the content-addressed store, hash-verified

769 return
770
771 def stop(self, apiclient, forced=None):
772 """Stop the instance"""
773 cmd = stopVirtualMachine.stopVirtualMachineCmd()
774 cmd.id = self.id
775 if forced:
776 cmd.forced = forced
777 apiclient.stopVirtualMachine(cmd)
778 response = self.getState(apiclient, VirtualMachine.STOPPED)
779 if response[0] == FAIL:
780 raise Exception(response[1])
781 return
782
783 def reboot(self, apiclient, forced=None):
784 """Reboot the instance"""

Callers

nothing calls this directly

Implementers 2

VMEntityVOengine/schema/src/main/java/org/apache
VMInstanceVOengine/schema/src/main/java/com/cloud/

Calls 2

getStateMethod · 0.95
stopVirtualMachineMethod · 0.65

Tested by

no test coverage detected