aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2017-01-19Adding vPE VNF class aligned with IETS per-deploy senariosDeepak S1-0/+331
VNF life cycle - instantiate - collect_kpi - terminate JIRA: YARDSTICK-520 Change-Id: Ied6ac79870fa35cc3dd14fd7a99b6bade3b77c81 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Adding Trex rfc2544 VNF class to initate Traffic for throughputDeepak S1-0/+285
JIRA: YARDSTICK-520 Change-Id: I1c683236a7fb946873418fb67f63500e1ba8fc91 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Adding trex trafficgen example.Deepak S1-0/+278
This patch uses trex trafficgen example to define dynamic traffic profiles and how it can be mapped to real world traffic. JIRA: YARDSTICK-492 Change-Id: Ica24957ebf43315a8d81adabd4745c27d3c7c36a Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Adding ping based sample VNF applianceDeepak S2-0/+227
This patch defines - Generic VNF APIs to test Network service --> instantiate --> collect_kpi --> run_traffic --> listen_traffic --> terminate - vnf Descriptor to map the physical NFVi topology of the Test unit. JIRA: YARDSTICK-491 Change-Id: I6b7e09972fc536977b65d8a19d635a220815e5f3 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Adding generic traffic profiles for trex traffic generatorDeepak S3-0/+637
This patch defines Generic traffic profiles - rfc2544, http etc JiRA: YARDSTICK-489 Change-Id:I0d8270b4d5f5f2d3415b98182990d8649099dbe3 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Add infrastructure to add the NFVi KPI collectionsDeepak S5-0/+489
This patches added common function to collect NFVi KPIs for given usecases - Core KPIs like memory/LLC/IPC etc - OVS stats - memory stats etc. JIRA: YARDSTICK-488 Change-Id: Iab41146392efc47b7313b1846a67728a44d0f1d6 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Introducing Generic framework to do pre-deployment VNF & Network service testingDeepak S7-0/+790
This patch introduces the framework which is aligned with ETSI-TST001 This patch adds: 1. NetworkServiceTestCase introduces following functions --> setup --> Verify if infrastructure mapping can meet topology --> Load VNF models --> Fill traffic profile with information from topology --> Provision VNFs --> Run experiment (traffic) --> run -> Yardstick calls run() at intervals defined in the yaml and produces timestamped samples --> teardown --> Stop VNFs 2. TrafficProfile is a generic class to get traffic profile for a given testcase and select the traffic generator for testcase. 3. QueueFileWrapper is a class to send/recive cmds to vnf 4. GenericVNF is a generic class to instantiate VNF 5. GenericTrafficGen is a generic class to run/listen/verify traffic. JIRA: YARDSTICK-483 Change-Id: Ic453c917d34dcb508a7f3afb459011da85f6402e Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Generic helper function to provision and get path from configDeepak S1-0/+62
This patch adds, generic helper function to provision the tools and get required fields from yardstick.conf v2: Added unit tests to keep test coverage :) JIRA: YARDSTICK-484 Change-Id: Id6701924e3488c7f38f29c82e55c27fba67c0d76 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Introducing the collector to subscribe/publish the KPIs for yardstick plotDeepak S4-0/+68
v2: Added unit tests to keep test coverage :) JIRA: YARDSTICK-482 Change-Id: I9281b00a4b619cc04550cb623c027ee5765c4974 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Introducing Standalone context for running test in non-managed environment.Deepak S1-0/+116
This patch introduces standalone virtualization context to deploy/undeploy NFVi infrastructure to run the VNF Supported NFVi Type: - vswitch - ovs - ovs-dpdk - sr-iov - testpmd - linuxbridge This patches inits the function stubs to enable the standalone context. Actual deploy/undeploy code will be added in later check-in v2: Added unit tests to keep test coverage :) JIRA: YARDSTICK-479 Change-Id: I6ab3ac3335f40eabc4efb0af7d5addc20c122d65 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Merge "Verify stdin data before doing encodeutils safe_encode"Kubi1-2/+5
2017-01-19Merge "Bugfix: context not found for server ''node1.LF''"Kubi1-1/+2
2017-01-19Bugfix: context not found for server ''node1.LF''chenjiankun1-1/+2
JIRA: YARDSTICK-540 We are adding dynamically generated suffix to server name in the previous patch. But in that patch we just change the 'target', 'host' in nodes, but not 'node1', 'node2' ... This patch will change all this. Change-Id: Ic7c82c323dea24a40f1fe30871603d30c2689f67 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-19Merge "Re-factor Node.py to use better python inbuilt functions"Kubi1-21/+35
2017-01-19Merge "Add unittest framework for Yardstick API"Jing Lu1-0/+2
2017-01-19Verify stdin data before doing encodeutils safe_encodeDeepak S1-2/+5
Process running via ssh can return "None" or emtpy data from the application. To avoid encodutils raise NoneType issue. Check the data before encode. JIRA: YARDSTICK-539 Change-Id: I7e86e6a17c0adc95d41714f6fec463dfadc2b81b Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Re-factor Node.py to use better python inbuilt functionsDeepak S1-21/+35
1. don't use sys.exit() to exit when there is an exception, it will hide the underlying error 2. use the Abstract Base Classes for type checking. 3. don't have to build list, can use next JIRA: YARDSTICK-541 Change-Id: Id4485acb21e7e02bbc22d3e689cbf0699363098a Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-17Add unittest framework for Yardstick APIchenjiankun1-0/+2
JIRA: YARDSTICK-538 Currently it is hard to test API, So I add a base class as flask document do. In this framework I will mock a temp sqlite database and a server. Change-Id: If881233cb22655617c07ad018201b8ee08492d06 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-16Use """ to replace ''' in docstringchenjiankun61-243/+243
JIRA: YARDSTICK-525 For consistency, we always use """triple double quotes""" around docstrings. Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-12Add support for Python 3Ross Brattain122-383/+702
Porting to Python3 using Openstack guidelines: https://wiki.openstack.org/wiki/Python3 This passes unittests on Python 3.5 and passes opnfv_smoke suite Updates: use six for urlparse and urlopen fix exception.message attribute removal run unittests on python3 use unitest.mock on python 3 fix open mock for vsperf fix float division by using delta/eplison comparison use unicode in StringIO use plugin/sample_config.yaml relative path from test case fixed apexlake unittests upgraded to mock 2.0.0 to match python3 unittest.mock features fixed flake8 issues implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes() implement safe unicode encode/decode with oslo_utils.encodeutils heat: convert pub key file from bytes to unicode pkg_resources returns raw bytes, in python3 we have to decode this to utf-8 unicode so JSON can encode it for heat template JIRA: YARDSTICK-452 Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-12heat: fix key_uuid formatRoss Brattain2-8/+16
The .format() won't work, since it can't slice the uuid We have to convert the uuid to string before we slice it. I thought .format() would implicitly call __str__() before applying width, but that is not the case. 'files/yardstick_key-{:.{width}}'.format(self.key_uuid, width=8)) We also need to define a constant short uuid lenght, we can't hardcode the length to 8 everywhere. Create a helper function to standardize the generation of the short key uuid and use that helper function everywhere Change-Id: I59e051bfe697587e967f93f5b8f209e0e7daa5c7 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-11Merge "associate an uuid to yardstick_key and yardstick_key.pub"Rex Lee2-10/+16
2017-01-10associate an uuid to yardstick_key and yardstick_key.pubJingLu52-10/+16
JIRA: YARDSTICK-527 This work is to support yardstick parallel tasks in the future. Currently, the RSA key we generated and used to access the VM is named 'yardstick_key'. If more than two tasks are running paralleled, the later 'yardstick_key' will cover the former. We want associate an uuid to identify differnets for each tasks. So the key files won't conflict. The first 8 digits will be used, as there is no need to used a full-length uuid. Change-Id: If8eaf47ae527cf9b3bd50f37ab3051fbdccf5f03 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-01-10Merge "Yardstick framework concurrent support"Jing Lu1-1/+28
2017-01-10Merge "Add API to get the status of async task"Jing Lu3-15/+65
2017-01-10Add API to get the status of async taskchenjiankun3-15/+65
JIRA: YARDSTICK-526 Currently there are many API run a task using sub thread. But we don't know the status of this task. So we need to offer a API to query the status of this task. Change-Id: I8d2cc558750bf9270aed4a7abb8bf35d17894d83 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-10Merge "subprocess.call para stdout=PIPE is risky"Rex Lee1-2/+4
2017-01-09Yardstick framework concurrent supportchenjiankun1-1/+28
JIRA: YARDSTICK-528 Currently yardstick framework can not support run the same test case at the same time. But actually we need to support it. The reason why framework can't support it is that openstack do not allow to create stack with the same name. So I use the task_id to make the stack different. Change-Id: I9e853793650066dfc56606464f7826f330a1401c Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-30Split Yardstick CLI with Yardstick core logicchenjiankun12-763/+956
JIRA: YARDSTICK-511 We need to unify yardstick entry. Now the solution is using CLI call API as nova do. This is the first step: coupling the yardstick core logic from CLI. Moving the core logic to yardstick/benchmark/core and the CLI using a object to call yardstick core logic. Change-Id: I84f10d2134635880c281cc63212a8533f2dd7d4e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-30Merge "Yardstick Plugin: add support for ssh login using key"Jing Lu1-25/+51
2016-12-30Merge "BugFix: correct Copyright info in openstack_utils.py"Jing Lu1-1/+0
2016-12-28Yardstick Plugin: add support for ssh login using keyJingLu51-25/+51
JIRA: YARDSTICK-442 Change-Id: I4736e8cb8331d7a74c8c9946e21edd791b0c8ba9 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-27BugFix: correct Copyright info in openstack_utils.pyJingLu51-1/+0
JIRA:YARDSTICK-513 the copyright info in openstack_utils.py is not accurate. (yardstick: this file is copied from rally and slightly modified) this line should be deleted. Change-Id: I6cf8205ee6b142ae87b268829e5ac7454239dd0d Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-26Use ConfigParser to write yardstick.confchenjiankun1-2/+16
JIRA: YARDSTICK-474 Currently, I use file.write() method to write config in yardstick.conf. But it is not recommended. So I change to use ConfigParser to write config in yardstick.conf Change-Id: Ia789cf09296afd5d1507bcf99f165378bf87c591 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-24Merge "Bugfix: the load_image.sh script will load a image with the same name"Jing Lu1-0/+2
2016-12-22Bugfix: the load_image.sh script will load a image with the same namechenjiankun1-0/+2
JIRA: YARDSTICK-471 Currently, if we execute the load_image.sh and the openstack already have this image in the cloud,this script will load another image with the same name. This will make yardstick run error. So I clean this related images before loading. Change-Id: If5b985ef9b2e890aa10453810fac36867d320a06 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-20ssh: don't quote ~ in remotepathsRoss Brattain1-6/+10
~ is not expanded in double quotes, so we have a dilemma. We need to quote in order to preserve filenames with spaces, but we have to make sure we don't quote the ~ so it can be expanded. To resolve this we use a regex to search for tidle-prefixes and excluded them from quotes. Added unittests for the cases: path with tilde path with space path with tilde and space see bash man page for details of tidle expansion Tilde Expansion If a word begins with an unquoted tilde character (`~'), all of the characters preceding the first unquoted slash (or all characters, if there is no unquoted slash) are considered a tilde-prefix. If none of the characters in the tilde-prefix are quoted, the characters in the tilde-prefix following the tilde are treated as a possible login name. If this login name is the null string, the tilde is replaced with the value of the shell parameter HOME. If HOME is unset, the home directory of the user executing the shell is substituted instead. Otherwise, the tilde-prefix is replaced with the home directory associated with the specified login name. JIRA: YARDSTICK-501 Change-Id: I324be20aba0dbd50434fbd8081685c598ebd8a84 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-21subprocess.call para stdout=PIPE is riskyRyan.RCS1-2/+4
1.In 'def run' function of parser.py file, subprocess.call parameter stdout= subprocess.PIPE is risky, so I changed the function from 'call' to 'popen' 2.updated sample/tosca.ymal because the version of that file is old. JIRA: YARDSTICK-473 Change-Id: Ie242e77eed6fdc2849394a3f170e40a0dd2be632 Signed-off-by: Ryan.RCS <lihainong@huawei.com>
2016-12-20BugFix: remotepath cannot be foundJingLu51-3/+3
JIRA: YARDSTICK-501 An redundant pair of quotation in ssh.py causes remotepath cannot be found. Change-Id: I2df8ab59830fd28d8ad8882a93a8efbd4d1f7cb7 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-15Merge "Add support for OpenSrack Newton"Rex Lee2-23/+105
2016-12-13Add support for OpenSrack NewtonJingLu52-23/+105
JIRA: YARDSTICK-410 This patch uses keystoneauth1.session to initialize the client for Heat The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. Change-Id: Ie6287b50a36cf03950fa1174791df826e9bdafd3 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-13Merge "ssh.py: add flag to request for a pseudo terminal (pty) for ssh ↵Rex Lee1-3/+9
connection"
2016-12-12Merge "Increase Ping scenario ssh timeout limit to 600 seconds"Rex Lee1-1/+1
2016-12-12Merge "use context manager for stdin files and use _put_file_shell"Rex Lee25-121/+126
2016-12-12Merge "Add support for Storperf job status"Rex Lee1-28/+27
2016-12-08ssh.py: add flag to request for a pseudo terminal (pty) for ssh connectionDeepak S1-3/+9
For some VNFs we may want to send periodic commands, for example to print statistics etc. When you open a SSH connection, request a pseudo terminal (pty) which allows passing of control characters to the connection. JIRA: YARDSTICK-453 Change-Id: Ibfd4164e745f005d0e29f6efdc63076e1e220b60 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2016-12-05use context manager for stdin files and use _put_file_shellRoss Brattain25-121/+126
requires https://gerrit.opnfv.org/gerrit/#/c/25183/ use new ssh method _put_file_shell to upload files. We have to use _put_file_shell because we rely on ~/ path expansions. Eventually we should move to remote absolute paths so we can use sftp upload. For ssh.execute() replace open() with context manager context managers were invented partly to control freeing resources. Opening files without closing them will leak file descriptors. The old standard method for closing files: f = open('data.txt') try: data = f.read() finally: f.close() was replaced with a context manager with open('data.txt') as f: data = f.read() Reference: Raymond Hettinger's Pycon 2013 presentation: https://speakerdeck.com/pyconslides/transforming-code-into-beautiful-idiomatic-python-by-raymond-hettinger-1 Video: https://youtu.be/OSGv2VnC0go?t=2522 Always use context managers for files Update: rebased now that _put_file_shell was merged Change-Id: Iabfc0e43aa3b7766d7c658115e13d21c31efb2a9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-05Bugfix: create yardstick.conf file failed due to wrong config file pathchenjiankun1-1/+1
JIRA: YARDSTICK-446 now the yardstick dispatcher config path is set to /etc/yardstick/config.yaml which is wrong. I will change it to /etc/yardstick/yardstick.conf Change-Id: I4cd5436bf64f3b764f6bb102eff3443e765fffe9 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-05Merge "argsAlreadyParsedError: arguments already parsed: cannot register CLI ↵Rex Lee1-12/+14
option"
2016-12-05Merge "fix SSH object examples to use correct context manager form"Rex Lee1-8/+13