MCPcopy
hub / github.com/retspen/webvirtcloud / get_instance_vcpu

Method get_instance_vcpu

vrtManager/instance.py:24–31  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

22 return int(mem) / 1024
23
24 def get_instance_vcpu(self, name):
25 inst = self.get_instance(name)
26 cur_vcpu = util.get_xml_path(inst.XMLDesc(0), "/domain/vcpu/@current")
27 if cur_vcpu:
28 vcpu = cur_vcpu
29 else:
30 vcpu = util.get_xml_path(inst.XMLDesc(0), "/domain/vcpu")
31 return vcpu
32
33 def get_instance_managed_save_image(self, name):
34 inst = self.get_instance(name)

Callers

nothing calls this directly

Calls 1

get_instanceMethod · 0.80

Tested by

no test coverage detected