aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-05-02Merge "Replace nova attach volume to server with shade client."Rodolfo Alonso Hernandez5-35/+115
2018-04-30Replace nova attach volume to server with shade client.Shobhi Jain5-35/+115
Function attach_volume_to_server now uses shade client instead of nova client. JIRA: YARDSTICK-1088 Change-Id: Id00df672c2c195b5c338cbbc30ddf2742a4e4d29 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-27Add active wait functionRodolfo Alonso Hernandez3-2/+84
Added function "wait_until_true". This function will make an active wait until the predicate passed as an argument returns True. If the timeout expires, the function will raise a generic exception or a user defined one passed as an argument. This function will be used in YARDSTICK-1127. JIRA: YARDSTICK-1128 Change-Id: I9854e465ac6b586bf4be39ab4b266d5625b39e30 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-26Merge "Get HA test case results on failure"Ross Brattain5-75/+55
2018-04-26Merge "Replace nova delete keypair with shade client."Rodolfo Alonso Hernandez5-32/+92
2018-04-26Merge "Replace nova client create keypair with shade."Rodolfo Alonso Hernandez5-51/+102
2018-04-26Merge "Remove unused nova client functions."Rodolfo Alonso Hernandez1-136/+0
2018-04-26Merge "Replace nova delete instance with shade client."Rodolfo Alonso Hernandez5-32/+111
2018-04-26Merge "Replace nova create instance with shade client."Rodolfo Alonso Hernandez5-90/+202
2018-04-26Merge "Fix "os.path" mock problems during tests"Ross Brattain3-9/+5
2018-04-25Fix "os.path" mock problems during testsRoss Brattain3-9/+5
This patch removes the global mocking applied on "os.path". Change-Id: Ia18d2c90195c5408a1852792bdf05b6f0c1ad21f Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-24Bugfix: ansible can't not run without configchenjiankun1-1/+1
JIRA: YARDSTICK-1135 Ansible need ansible.cfg when run in the remote node. However the file name is wrong. Need: setup.cfg -> ansible.cfg Change-Id: Ifa674fb624ca83d90c3ac9ad3bfe148013bf8bfd Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2018-04-23Replace nova delete keypair with shade client.Shobhi Jain5-32/+92
Function delete_keypair now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I46b895748c5c44b0bf7d5b035395676ebff48d7f Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova client create keypair with shade.Shobhi Jain5-51/+102
Function create_keypair now uses shade client instead of nova client. JIRA: YARDSTICK-1088 Change-Id: I060580504d6969c5ba859ed4494082feb998d37d Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Remove unused nova client functions.Shobhi Jain1-136/+0
Following funtions are not required by shade client also not been used in any of the scenario files: *create_aggregate *create_aggregate_with_host *create_instance *add_host_to_aggregate *create_aggregate_with_host *get_availability_zones *get_availability_zone_names *remove_hosts_from_aggregate *remove_host_from_aggregate *delete_aggregate *get_image_by_name *check_status JIRA: YARDSTICK-1088 Change-Id: I7ba0fbce6aa3e636aa55581a993c1ec1b48fbead Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova delete instance with shade client.Shobhi Jain5-32/+111
Function delete_instance now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I5772a74c6dc2d103edd410042a8eaf721d1bcc5c Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova create instance with shade client.Shobhi Jain5-90/+202
Remove redundant functions: *get_instances *get_instance_status *get_instance_by_name Function create_instance_and_wait_for_active now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I766da333dabbb1b83a7b4ede4bf73567ec70eb8c Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-22Merge "MessagingConsumer accepts messages from multiple producers"Rodolfo Alonso Hernandez2-27/+32
2018-04-21Merge "Improve "Libvirt.create_snapshot_qemu" function"Rodolfo Alonso Hernandez3-18/+111
2018-04-19Merge "Update neutron delete_neutron_net function."Emma Foley4-24/+34
2018-04-19MessagingConsumer accepts messages from multiple producersRodolfo Alonso Hernandez2-27/+32
The messaging consumer now can store a list of PID of several producers. The notification handler can compare the procedence of a message from a list of PID. JIRA: YARDSTICK-1074 Change-Id: I193f83c2b471e5bf1298ac728be52533aded0c1a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-18Merge "Replace neutron create security group full with shade."Rodolfo Alonso Hernandez5-110/+170
2018-04-17fix unittest test_deploy_try_retrieve_context_does_not_existRoss Brattain1-1/+1
unittest is failing due to mock being called multiple times. I assume this is due to parallelization of tests in Jenkins somehow ====================================================================== FAIL: test_deploy_try_retrieve_context_does_not_exist (benchmark.contexts.test_heat.HeatContextTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/mock/mock.py", line 1305, in patched return func(*args, **keywargs) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/tests/unit/benchmark/contexts/test_heat.py", line 309, in test_deploy_try_retrieve_context_does_not_exist mock_path_exists.assert_called_once_with(key_filename) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/mock/mock.py", line 947, in assert_called_once_with raise AssertionError(msg) AssertionError: Expected 'exists' to be called once. Called 3 times. ---------------------------------------------------------------------- Change-Id: I696c63ef9f7943b841e2d3d533c92f18aa7044da Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-04-16Improve "Libvirt.create_snapshot_qemu" functionRodolfo Alonso Hernandez3-18/+111
Improved "Libvirt.create_snapshot_qemu" function: - Check if the base image is present in the remote host. If not, try to copy from the execution host. - Check the execution status. In case the command fails, raise an exception. JIRA: YARDSTICK-944 Change-Id: I78bd0d3ed6a1f35ed772c0d192bb240009a580ed Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-16Update neutron delete_neutron_net function.Shobhi Jain4-24/+34
Update the changes done in patch [1]. JIRA: YARDSTICK-890 [1] https://gerrit.opnfv.org/gerrit/#/c/52361/ Change-Id: Iccbf16d0a2e72919d5092366241ff41686f01a58 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-16Replace neutron create security group full with shade.Shobhi Jain5-110/+170
Function create_security_group_full now uses shade client. Remove openstack util's private 'get_security_groups', 'get_security_group_id' & 'create_security_group' functions as 'create_security_group_full' now uses 'get_security_group' & 'create_security_group' function defined in shade client library. JIRA: YARDSTICK-890 Change-Id: Ibd5b9ca9b7ce99b3e40c5dcc545f2af672ce2203 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-16Merge "Remove tool provisioning in Standalone contexts"Emma Foley2-9/+5
2018-04-16Get HA test case results on failureMiikka Koistinen5-75/+55
Now, yardstick HA test cases (which have 'sla action: monitor') do not output results if the test case SLA validation fails. This patch modifies the task runner and the serviceHA scenario so that during an SLA validation failure the test result data is captured correctly. Do similar changes in the general scenario. JIRA: YARDSTICK-1115 Change-Id: I648a8b229600c0ad089320ac3f803698f73aa800 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-04-13Add MQ consumer, producer and payload base classesRodolfo Alonso Hernandez11-0/+489
Added MessagingProducer base class. A class implementing this base class can send a cast message using the MQ service installed in the Yardstick jumphost (RabbitMQ by default, other MQ could be implemented). The producer will send messages to an specific topic. Added MessagingConsumer base class. A class implementing this base class will be able to receive any message sent by a MessagingPorducer class publishing messages in the topic subscribed. By default both Producer and Consumer "fanout" is True. That means every Consumer will create a fanout Queue attached to the MQ Exchange topic. All Consumers attached to this topic will receive the message sent by the Producer [1]. Added Payload base class. To send data through the message queue service, a Payload derived object should be created. This base class allows to define the attributes container in the class, convert the object to a dict and retrieve the object from a dict. Added a new library, "oslo.messaging", to implement the RPC client and server. [1]http://blog.thedigitalcatonline.com/blog/2013/08/21/some-tips-about-amqp-direct-exchanges/ JIRA: YARDSTICK-1074 Change-Id: I63932b5fb3de2bdc1270fc83295630a2a349e2a6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-13Merge "Bugfix: Can't get image list in API"Jing Lu5-1/+82
2018-04-12Bugfix: Can't get image list in APIchenjiankun5-1/+82
JIRA: YARDSTICK-1110 To match OpenStack Pike release, we upgrade novaclient from 7.1.1 to 9.1.1. And the client interface has changed, it no longer has nova_client.images attribute. So I use shade instead. Later will change all same issue. Change-Id: Ie4f54069d4346e44e2ad925439930504b945cbad Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2018-04-11Bug fix in using Unixbenchliyin1-1/+1
JIRA: YARDSTICK-1117 This bug will cause the error in running unixbench. "no such file named ./run" So we have to fix it. Change-Id: I141fcb5567fbb0e3df97aee677cb946a25a9788e Signed-off-by: liyin <liyin11@huawei.com>
2018-04-03[docs] update the user guide for "yardstick-operation"Emma Foley1-1/+1
* Add a new chapter: operation which shows how to use Yardstick and how to create test cases * Include details on how to reuse and keep VNFs between testcases JIRA: YARDSTICK-885 JIRA: YARDSTICK-886 Change-Id: I365152e8812427a3c54259adbc18d5ddb216d775 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-04-03[docs] Move user guide chapters to make room for new chapter.Emma Foley1-0/+37
* Increment the numbering on chapters * Fix some of the changes flagged by doc8 Change-Id: Ie03d165297671dfd50b9de339612cdc8bf00b988 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-29Merge "don't print exceptions in atexit handler"Ross Brattain1-1/+1
2018-03-29Merge "task: don't hide exceptions in Task"Ross Brattain1-6/+9
2018-03-29don't print exceptions in atexit handlerRoss Brattain1-1/+1
atexit handler calls terminate_all after the regular python execution path, and it looks like the traceback stack is None somehow. In this context log.debug("", exc_info=True) doesn't work it prints out NoneType on Python3 and causes other problems on Python2.7 remove the exc_info=True from the logging call JIRA: YARDSTICK-1107 Change-Id: Ida0a0ced7ff5e017e2f8608880e3bb531724af95 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-03-28Merge "restore Heat stack failure logs for CI"Ross Brattain2-1/+27
2018-03-28Remove tool provisioning in Standalone contextsRodolfo Alonso Hernandez2-9/+5
In both Standalone contexts, SR-IOV and DPDK, the tool provisioning must be removed. If the tool, "dpdk-devbind.py", is not in the VNF, the test should fail because this tool should be provided during the provisioning, not during the test execution. JIRA: YARDSTICK-1092 Change-Id: I212c1303fd655f151e9c0efc29aad97fe6d71d1c Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-28Merge "Replace neutron create security group rule with shade."Rex Lee2-38/+76
2018-03-27task: don't hide exceptions in TaskRoss Brattain1-6/+9
If the Task raised an exception we currently hide it and replace it with RuntimeError. This is bad. If an exception occured, then we don't have a result so re-raise the original exception. Or we could log the traceback and raise RuntimeError, but that doesn't seem to be a good idea. Sample traceback after re-raising original. Without this patch the ValueError is only written to _write_error_data 2018-03-25 22:57:56,511 yardstick.benchmark.contexts.node node.py:85 DEBUG BareMetals: [] 2018-03-25 22:57:56,511 yardstick.benchmark.contexts.node node.py:89 DEBUG Env: {} 2018-03-25 22:57:56,511 yardstick.cmd.commands.task task.py:57 INFO Task FAILED Traceback (most recent call last): File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/cmd/commands/task.py", line 54, in do_start result = Task().start(param, **kwargs) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/core/task.py", line 103, in start task_args_fnames) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/core/task.py", line 321, in _parse_tasks task_args_fnames[i] File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/core/task.py", line 558, in parse_task context.init(cfg_attrs) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/contexts/heat.py", line 131, in init server = Server(name, self, server_attrs) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/contexts/model.py", line 210, in __init__ (name, p)) ValueError: server 'trafficgen_1', placement 'pgrp2' is invalid 2018-03-25 22:57:56,512 yardstick.cmd.commands.task task.py:62 INFO Task FAILED 2018-03-25 22:57:56,662 yardstick.benchmark.runners.base base.py:124 DEBUG Terminating all runners NoneType JIRA: YARDSTICK-1102 Change-Id: I7e6fa41fc1d36f6d438a1602ab60cb41ffbee1e9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-03-27restore Heat stack failure logs for CIRoss Brattain2-1/+27
We need to see what Heat failures occured so that we can debug CI failures. The only way to do this seems to be to use the private event_utils.get_events function to query for all failures Also since we had a failure go ahead and dump the Heat template that failed. Sample output: 2018-03-25 23:50:08,765 [INFO] yardstick.orchestrator.heat heat.py:629 Creating stack 'yardstick-460ed969' START 2018-03-25 23:50:21,932 [ERROR] yardstick.orchestrator.heat heat.py:644 Resource CREATE failed: BadRequest: resources.yardstick-460ed969-xe1: Invalid input for operation: physical_network 'nosuch' unknown for flat provider network. Neutron server returns request_ids: ['req-6f981f1e-a9e2-4114-af84-1ee528aed51b'] 2018-03-25 23:50:21,933 [ERROR] yardstick.orchestrator.heat heat.py:644 BadRequest: resources.yardstick-460ed969-xe1: Invalid input for operation: physical_network 'nosuch' unknown for flat provider network. Neutron server returns request_ids: ['req-6f981f1e-a9e2-4114-af84-1ee528aed51b'] 2018-03-25 23:50:21,972 [ERROR] yardstick.orchestrator.heat heat.py:645 {'description': '\n' 'All referred generated resources are prefixed with the ' 'template\n' 'name (i.e. yardstick-460ed969).\n', 'heat_template_version': '2013-05-23', 'outputs': {'trafficgen_1.yardstick-460ed969': {'description': 'VM UUID', 'value': {'get_resource': 'trafficgen_1.yardstick-460ed969'}}, 'trafficgen_1.yardstick-460ed969-fip': {'description': 'floating ' 'ip ' JIRA: YARDSTICK-998 Change-Id: Ia8f4e5ba7e280fb9086519680d5ee90a2b442e6b Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-03-27Merge "Improve "Libvirt.virsh_destroy_vm" function"Rodolfo Alonso Hernandez2-8/+17
2018-03-27Merge "Improve "Libvirt.virsh_create_vm" function"Rodolfo Alonso Hernandez3-8/+26
2018-03-27Merge "Improve NSB Standalone XML generation"Rodolfo Alonso Hernandez6-188/+198
2018-03-27Merge "Improve OVS-DPDK setup process"Rodolfo Alonso Hernandez2-33/+58
2018-03-27Merge "Improve OVS-DPDK boot process"Rodolfo Alonso Hernandez5-165/+326
2018-03-27Replace neutron create security group rule with shade.Shobhi Jain2-38/+76
Rename create_secgroup_rule with create_security_group_rule. Function create_security_group_rule now uses shade client. JIRA: YARDSTICK-890 Change-Id: Ie0ebac67a281e55dc95c0e3e33ba43de80aba9ec Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-27Merge "Replace neutron floating ip deletion with shade."Rodolfo Alonso Hernandez5-30/+93
2018-03-27Merge "Replace neutron floating ip creation with shade."Rodolfo Alonso Hernandez5-63/+98