(self, name)
| 446 | return vname |
| 447 | |
| 448 | def get_user_instances(self, name): |
| 449 | dom = self.get_instance(name) |
| 450 | mem = util.get_xml_path(dom.XMLDesc(0), "/domain/currentMemory") |
| 451 | mem = int(mem) / 1024 |
| 452 | cur_vcpu = util.get_xml_path(dom.XMLDesc(0), "/domain/vcpu/@current") |
| 453 | if cur_vcpu: |
| 454 | vcpu = cur_vcpu |
| 455 | else: |
| 456 | vcpu = util.get_xml_path(dom.XMLDesc(0), "/domain/vcpu") |
| 457 | return {'name': dom.name(), 'status': dom.info()[0], 'uuid': dom.UUIDString(), 'vcpu': vcpu, 'memory': mem} |
| 458 | |
| 459 | def close(self): |
| 460 | """Close connection""" |
no test coverage detected