diff options
author | ahothan <ahothan@cisco.com> | 2019-05-28 16:13:43 -0700 |
---|---|---|
committer | ahothan <ahothan@cisco.com> | 2019-05-29 09:39:48 -0700 |
commit | cdbb08859533a4c3e698735ab2ee98d2532aa1c8 (patch) | |
tree | 1bf8709b5e708bbbc31e717ae777fc94b1cf0638 /nfvbench/compute.py | |
parent | 7e9ef3835fdc7dc95c42e32fc4d0f804e90efac5 (diff) |
NFVBENCH-136 Add support for multiqueue for PVP/PVVP chains3.3.0
Change-Id: Ia6bc2b1f97ecdf1d94206f9cda46e62910eb6546
Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/compute.py')
-rw-r--r-- | nfvbench/compute.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nfvbench/compute.py b/nfvbench/compute.py index 556ade4..84e3774 100644 --- a/nfvbench/compute.py +++ b/nfvbench/compute.py @@ -95,6 +95,24 @@ class Compute(object): return True + def image_multiqueue_enabled(self, img): + """Check if multiqueue property is enabled on given image.""" + try: + return img['hw_vif_multiqueue_enabled'] == 'true' + except KeyError: + return False + + def image_set_multiqueue(self, img, enabled): + """Set multiqueue property as enabled or disabled on given image.""" + cur_mqe = self.image_multiqueue_enabled(img) + LOG.info('Image %s hw_vif_multiqueue_enabled property is "%s"', + img.name, str(cur_mqe).lower()) + if cur_mqe != enabled: + mqe = str(enabled).lower() + self.glance_client.images.update(img.id, hw_vif_multiqueue_enabled=mqe) + img['hw_vif_multiqueue_enabled'] = mqe + LOG.info('Image %s hw_vif_multiqueue_enabled property changed to "%s"', img.name, mqe) + # Create a server instance with name vmname # and check that it gets into the ACTIVE state def create_server(self, vmname, image, flavor, key_name, |