MCPcopy Create free account
hub / github.com/StackStorm/st2 / run

Method run

contrib/examples/actions/python-mock-create-vm.py:23–31  ·  view source on GitHub ↗
(self, cpu_cores, memory_mb, vm_name, ip)

Source from the content-addressed store, hash-verified

21
22class MockCreateVMAction(Action):
23 def run(self, cpu_cores, memory_mb, vm_name, ip):
24 eventlet.sleep(5)
25
26 data = {
27 "vm_id": "vm" + str(random.randint(0, 10000)),
28 ip: {"cpu_cores": cpu_cores, "memory_mb": memory_mb, "vm_name": vm_name},
29 }
30
31 return data

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected