Commit 980b1276 authored by Eric Zheng's avatar Eric Zheng

merge new changes from upstream

parents ae6da143 831b32a6
0.122 (2021-06-29)
==================
* promise/plugin: Fix check_socket_listening promise
0.121 (2021-06-24)
==================
* qemuqmpclient: Support qemu 5.x+
0.120 (2021-06-23) 0.120 (2021-06-23)
================== ==================
......
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '0.120' version = '0.122'
name = 'slapos.toolbox' name = 'slapos.toolbox'
long_description = open("README.rst").read() + "\n" long_description = open("README.rst").read() + "\n"
......
...@@ -30,7 +30,8 @@ class RunPromise(GenericPromise): ...@@ -30,7 +30,8 @@ class RunPromise(GenericPromise):
if path or abstract or not port: if path or abstract or not port:
self.logger.error(ADDRESS_USAGE) self.logger.error(ADDRESS_USAGE)
return return
family, _, _, _, addr = socket.getaddrinfo(host, port)[0] # type of port must be int or str, unicode is not accepted.
family, _, _, _, addr = socket.getaddrinfo(host, int(port))[0]
else: else:
if bool(path) == bool(abstract): if bool(path) == bool(abstract):
self.logger.error(ADDRESS_USAGE) self.logger.error(ADDRESS_USAGE)
......
...@@ -530,7 +530,9 @@ class QemuQMPWrapper(object): ...@@ -530,7 +530,9 @@ class QemuQMPWrapper(object):
current_memdev_list = self._send({ "execute": "query-memdev" }, retry=5) current_memdev_list = self._send({ "execute": "query-memdev" }, retry=5)
for memdev in current_memdev_list['return']: for memdev in current_memdev_list['return']:
cleanup_memdev_id_dict[memdev['id']] = '' # qemu 5.x+ reports init memory static memory as pc.ram
if memdev['id'] != 'pc.ram':
cleanup_memdev_id_dict[memdev['id']] = ''
for dimm in current_dimm_list['return']: for dimm in current_dimm_list['return']:
current_size += dimm['data']['size'] current_size += dimm['data']['size']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment