aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-02-06KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk scenarios.KalyanReddy2-0/+100
This patch implements test suites for kvmfornfv os-nosdn-kvm_ovs_dpdk-ha and os-nosdn-kvm_ovs_dpdk-noha scenarios. Change-Id: Ia7b17dda262df5d81cac87372b70510192044a40 Co-Authored-By: Navya <b.navya4@tcs.com> Signed-off-by: KalyanReddy <reddyx.gundarapu@intel.com>
2017-02-06nfvi: disable failing AMQP unittestRoss Brattain2-27/+11
Failures: test_connect (network_services.nfvi.test_collectd.TestAmqpConsumer) ... ERROR:pika.adapters.base_connection:Connection to 1.1.1.1:5672 failed: timeout WARNING:pika.connection:Could not connect, 0 attempts left ERROR:pika.callback:Calling <bound method SelectConnection._on_connection_error of <pika.adapters.select_connection.SelectConnection object at 0x7fe7e2333710>> for "0:_on_connection_error" failed Traceback (most recent call last): File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py27/local/lib/python2.7/site-packages/pika/callback.py", line 236, in process callback(*args, **keywords) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py27/local/lib/python2.7/site-packages/pika/connection.py", line 1265, in _on_connection_error self.params.connection_attempts) AMQPConnectionError: Connection to 1.1.1.1:5672 failed: timeout ok Firstly, 1.1.1.1 is not an approriate fake address, use 127.0.0.1 so we don't try to connect to anything external But 127.0.0.1 won't work anyway, so disable test_connect replace 152.16.0.0 with 172.16.0.0 Remove network_services.nfvi.test_resource.TestResourceProfile since it also fails due to same error Remove test_amqp_collect_nfvi_kpi_exception Change-Id: I00bb1729658e18b4651129661ad9dd9c0dedcf37 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-06Fix: network_services: decode stdout instead of encodeRoss Brattain1-1/+1
Fixes unittest on Python 3 stdout is bytes, so we need to decode bytes to unicode using utf-8 bytes.decode(); str.encode() Change-Id: I4b19d237139f338a648d04aa44cd4f199bb901c3 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-26Merge "Add infrastructure to add the NFVi KPI collections"Kubi8-0/+820
2017-01-26Merge "Adding sample yardstick.conf & pod files to help describe the topology"Kubi2-0/+82
2017-01-26Merge "Introducing Generic framework to do pre-deployment VNF & Network ↵Kubi19-0/+2035
service testing"
2017-01-25Merge "basic tox.ini for python 2.7 and python 3 unittests"Kubi1-0/+22
2017-01-24Merge "Generic helper function to provision and get path from config"Rex Lee2-0/+119
2017-01-23Merge "Record task status if running via CLI"Rex Lee5-48/+39
2017-01-20Record task status if running via CLIchenjiankun5-48/+39
JIRA: YARDSTICK-542 Currently we do not record task status when using CLI to run task. So I add this function. If status=0, task is not done. if status=1, task is done. if status=2, there is an error. Change-Id: Ib9b3c8abd233909c04f792115199250419fa8d7a Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-20Create API to get a list of all test caseschenjiankun50-211/+366
JIRA: YARDSTICK-456 Currently we do not have a API to get a list of all test cases; Currently the test case info is from the comment; So I create a API to get a list of all test cases; And create a 'description' attribute to record info of a test case; And use the CLI call this API; Change-Id: Ife800600446683664097835c7b9f11899c85771d Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-20Merge "Bugfix:can not run a test suite if not under yardstick root path"Jing Lu2-16/+22
2017-01-20Merge "Bugfix: task_id parameter from API can not pass to yardstick core"Jing Lu1-1/+1
2017-01-19basic tox.ini for python 2.7 and python 3 unittestsRoss Brattain1-0/+22
Nothing fancy for now, just call run_tests.sh If we want to expand we could add pep8, coverage to tox. See dovetail tox.ini for example Change-Id: I8b5897779ed9622dd1b38612cb393fc214ec6300 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-19Add infrastructure to add the NFVi KPI collectionsDeepak S8-0/+820
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-19Adding sample yardstick.conf & pod files to help describe the topologyDeepak S2-0/+82
JIRA: YARDSTICK-487 Change-Id:I23dabcf6b4b7d49b8eb0f18778cddd50a1195a05 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Introducing Generic framework to do pre-deployment VNF & Network service testingDeepak S19-0/+2035
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 S2-0/+119
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 S8-0/+178
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 S4-0/+494
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: command "openstack image list" failed"Jing Lu1-1/+1
2017-01-19Bugfix: command "openstack image list" failedchenjiankun1-1/+1
JIRA: YARDSTICK-537 Now the openstackclient version is set to 3.3.0, but it cannot support osc-lib 1.3.0 whose version is automatic set. So I set openstackclient version to 3.7.0 and osc-lib version to 1.2.0 Change-Id: If4ccd517f6a572f6c463270596d0e1019ba9a1e6 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
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"Kubi2-23/+37
2017-01-19Merge "Add unittest framework for Yardstick API"Jing Lu9-4/+73
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 S2-23/+37
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-18Merge "Use """ to replace ''' in docstring"Rex Lee61-243/+243
2017-01-17Add unittest framework for Yardstick APIchenjiankun9-4/+73
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-17Bugfix: command "openstack image list" failedchenjiankun1-1/+2
JIRA: YARDSTICK-537 Now the openstackclient version is set to 3.3.0, but it cannot support osc-lib 1.3.0 whose version is automatic set. So I set openstackclient version to 3.3.0 and osc-lib version to 1.3.0 Change-Id: Ia480feb3621be97a4a97bb027685cc438e01c53e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-17Merge "Adding python package requirement for VNF testing."Jing Lu1-0/+2
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-16Merge "remove failing influx testcases"Kubi1-29/+0
2017-01-14Bugfix:can not run a test suite if not under yardstick root pathchenjiankun2-16/+22
JIRA: YARDSTICK-530 Currently we can not run a test suite if we are not in yardstick root path. The reason is that the file in test suite config file use relative path. So I change it to absolute path when run. Change-Id: I62758bc67f466ac794d339b597562b3be05574fb Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-12Add support for Python 3Ross Brattain204-778/+1402
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 Brattain3-8/+42
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-11remove failing influx testcasesRoss Brattain1-29/+0
when influx was refactored these test cases must not have been removed > influx._write_data(measurement, field, timestamp, tags) E AttributeError: 'module' object has no attribute '_write_data' Change-Id: I78814266fae04bd3b0bc06fe1fe41317ba8aced4 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-11Bugfix: task_id parameter from API can not pass to yardstick corechenjiankun1-1/+1
JIRA: YARDSTICK-531 Now in API entry the task_id parameter will not pass to yardstick core. I fix it by pass task_id to yardstick.benchmark.core.task.start() method. Change-Id: I66439660ff116d83104e5ba4f040106ca73142e6 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-11Merge "Create API to run test suite"Rex Lee7-1/+142
2017-01-11Merge "associate an uuid to yardstick_key and yardstick_key.pub"Rex Lee3-11/+31
2017-01-10Create API to run test suiteJingLu57-1/+142
JIRA: YARDSTICK-475 This API will be used to run test suite files in the test/opnfv/test_suites directory Change-Id: I208edf9abed62fd6436de988ac85bfe99c4d01bd Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-01-10associate an uuid to yardstick_key and yardstick_key.pubJingLu53-11/+31
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 Lu14-46/+287
2017-01-10Add API to get the status of async taskchenjiankun14-46/+287
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 "Record test case names when run a task using API"Rex Lee7-66/+85
2017-01-10Merge "subprocess.call para stdout=PIPE is risky"Rex Lee2-131/+135
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>