add qmpstatus to status url

This commit is contained in:
deflax 2018-04-07 16:21:07 +03:00
parent 9558b90bd2
commit bab37c7cf4

View file

@ -59,7 +59,6 @@ def create(json):
scsihw='virtio-scsi-pci',
scsi0='file=lvm:' + image_name + ',discard=on',
net0='virtio=8A:32:CD:E4:EE:11,bridge=' + json['net0if'] + ',tag=' + str(phy_id),
args='-kernel /tmp/linux -initrd /tmp/initrd.gz -append "preseed/url=https://www.datapoint.bg/static/datapoint.seed debian-installer/allow_unauthenticated_ssl=true locale=en_US.UTF-8 debian/priority=critical vga=normal debian-installer/keymap=en console-keymaps-at/keymap=en console-setup/layoutcode=en_US FRONTEND_BACKGROUND=original"',
description=description)
except Exception as e:
print(e)
@ -173,7 +172,8 @@ def status(json):
#slave_name = proxobject.cluster.status.get()[0]['name']
ioconfig.logger.info('%s[%s]> status of %s %s (%s)' % (vm_owner, slave_name, unit_type, phy_id, vm_host))
if unit_type == 'kvm':
result = proxobject.nodes(slave_name).qemu(phy_id).status.current.get()
statusquery = proxobject.nodes(slave_name).qemu(phy_id).status.current.get()
result = str(statusquery['qmpstatus'])
if unit_type == 'lxc':
result = proxobject.nodes(slave_name).lxc(phy_id).status.current.get()
return result