From: garciadeblas Date: Thu, 1 Jun 2017 09:40:13 +0000 (+0200) Subject: Changes to fix bugs in the support of topologies of 1 socket with hyperthreading X-Git-Tag: v3.0.0rc14~11 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;ds=inline;h=refs%2Fchanges%2F15%2F1915%2F1;p=osm%2Fopenvim.git Changes to fix bugs in the support of topologies of 1 socket with hyperthreading Change-Id: If9ec1a223d7739bb63078c58171a05aec34ef2ae Signed-off-by: garciadeblas --- diff --git a/osm_openvim/host_thread.py b/osm_openvim/host_thread.py index 9fe5274..620f25c 100644 --- a/osm_openvim/host_thread.py +++ b/osm_openvim/host_thread.py @@ -518,7 +518,7 @@ class host_thread(threading.Thread): if topo == "oneSocket:hyperthreading": if vcpus % 2 != 0: return -1, 'Cannot expose hyperthreading with an odd number of vcpus' - text += self.tab() + " " % vcpus/2 + text += self.tab() + " " % (vcpus/2) elif windows_os or topo == "oneSocket": text += self.tab() + " " % vcpus else: diff --git a/osm_openvim/vim_schema.py b/osm_openvim/vim_schema.py index c48d48e..a296083 100644 --- a/osm_openvim/vim_schema.py +++ b/osm_openvim/vim_schema.py @@ -146,7 +146,7 @@ metadata_schema={ "os_type": {"type":"string"}, "os_version": {"type":"string"}, "bus": {"type":"string"}, - "topology": {"type":"string", "enum": ["oneSocket"]} + "topology": {"type":"string", "enum": ["oneSocket", "oneSocket:hyperthreading"]} } } @@ -764,4 +764,4 @@ of_port_map_new_schema = { "required": ["of_port_mapings"], "additionalProperties": False -} \ No newline at end of file +}