Function change ram and cpu on vds.
(self, cur_memory, memory, cur_vcpu, vcpu)
| 524 | "/domain/devices/graphics/@keymap") or '' |
| 525 | |
| 526 | def resize(self, cur_memory, memory, cur_vcpu, vcpu): |
| 527 | """ |
| 528 | Function change ram and cpu on vds. |
| 529 | """ |
| 530 | memory = int(memory) * 1024 |
| 531 | cur_memory = int(cur_memory) * 1024 |
| 532 | |
| 533 | xml = self._XMLDesc(VIR_DOMAIN_XML_SECURE) |
| 534 | tree = ElementTree.fromstring(xml) |
| 535 | |
| 536 | set_mem = tree.find('memory') |
| 537 | set_mem.text = str(memory) |
| 538 | set_cur_mem = tree.find('currentMemory') |
| 539 | set_cur_mem.text = str(cur_memory) |
| 540 | set_vcpu = tree.find('vcpu') |
| 541 | set_vcpu.text = vcpu |
| 542 | set_vcpu.set('current', cur_vcpu) |
| 543 | |
| 544 | new_xml = ElementTree.tostring(tree) |
| 545 | self._defineXML(new_xml) |
| 546 | |
| 547 | def get_iso_media(self): |
| 548 | iso = [] |
no test coverage detected