1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

resize disk image option added

This commit is contained in:
Jan Krcmar 2015-11-24 08:53:13 +00:00
parent 8f2f95e128
commit 04f3a76c05
3 changed files with 39 additions and 2 deletions

View file

@ -524,7 +524,7 @@ class wvmInstance(wvmConnect):
return util.get_xml_path(self._XMLDesc(VIR_DOMAIN_XML_SECURE),
"/domain/devices/graphics/@keymap") or ''
def resize(self, cur_memory, memory, cur_vcpu, vcpu):
def resize(self, cur_memory, memory, cur_vcpu, vcpu, disks=[]):
"""
Function change ram and cpu on vds.
"""
@ -542,6 +542,11 @@ class wvmInstance(wvmConnect):
set_vcpu.text = vcpu
set_vcpu.set('current', cur_vcpu)
for disk in disks:
source_dev = disk['path']
vol = self.get_volume_by_path(source_dev)
vol.resize(disk['size_new'])
new_xml = ElementTree.tostring(tree)
self._defineXML(new_xml)