From f32f0fe4bfb370d7336e890c0c12322d2be2d587 Mon Sep 17 00:00:00 2001 From: Neha Vadnere Date: Tue, 25 Apr 2017 00:17:44 +0530 Subject: Adding new SRIOV Standalone Context This patch adds new SRIOV context to run VNFs with - random uuid generation, - mac address generation, - getting dpdk_nic_bind path, - ssh key based authentication, - printing log messages, - added apache2 licence JIRA: YARDSTICK-480 Change-Id: Ic8317eb9e7e4ecf270091c18be4782d1299ff087 Signed-off-by: Neha Vadnere Signed-off-by: Bindya N --- yardstick/benchmark/contexts/sriov.py | 432 +++++++++++++++++++++++++++++ yardstick/benchmark/contexts/standalone.py | 54 +++- 2 files changed, 483 insertions(+), 3 deletions(-) create mode 100644 yardstick/benchmark/contexts/sriov.py (limited to 'yardstick') diff --git a/yardstick/benchmark/contexts/sriov.py b/yardstick/benchmark/contexts/sriov.py new file mode 100644 index 000000000..5dc27bfae --- /dev/null +++ b/yardstick/benchmark/contexts/sriov.py @@ -0,0 +1,432 @@ +# Copyright (c) 2016-2017 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import +import os +import yaml +import re +import time +import glob +import uuid +import random +import logging +import itertools +import xml.etree.ElementTree as ET +from yardstick import ssh +from yardstick.network_services.utils import get_nsb_option +from yardstick.network_services.utils import provision_tool +from yardstick.benchmark.contexts.standalone import StandaloneContext + +log = logging.getLogger(__name__) + +VM_TEMPLATE = """ + + vm1 + {random_uuid} + 102400 + 102400 + + + + 20 + + hvm + + + + + + + + + SandyBridge + + + + + + + + destroy + restart + restart + + /usr/bin/kvm-spice + + + + +
+ + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + + + +