aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2017-07-17Merge "test_tg_rfc2544_trex: speedup unittest, set time.sleep(0)"Ross Brattain1-4/+5
2017-07-17test_tg_rfc2544_trex: speedup unittest, set time.sleep(0)Ross Brattain1-4/+5
Change-Id: I6fdae629bdbd45cba715a838c41613b914a3abcb Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-17test_delete_all_calls_delete: fix delete mockRoss Brattain1-4/+6
we need to mock HeatStack.delete() before we instantiate otherwise we can't reach the instantiated objects delete() method we need to patch the class so we patch all instances Change-Id: I36f9476dcfb83e2d583c5a9f72dc27fce57258eb Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-16test_heat: don't waste 2 seconds in unittestRoss Brattain1-12/+2
remove duration checks and test with sleep 0 Change-Id: I22516cde56ac3a02358ca9c3e652cead10580d76 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-17Merge "test_attacker_baremetal: don't run local commands"Ross Brattain1-14/+12
2017-07-17Merge "Kubernetes (k8s) support"Jing Lu3-0/+294
2017-07-17Merge "add network info to topology"Rex Lee6-214/+596
2017-07-17Kubernetes (k8s) supportchenjiankun3-0/+294
JIRA: YARDSTICK-682 We decide to support k8s in E release. We need to discuss with openretriver team and then rewrite the ping test case under k8s as the first step. Change-Id: I3f81ebca8de5c1f3a8b7d42581cd7342dc320239 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-13test_attacker_baremetal: don't run local commandsRoss Brattain1-14/+12
these tests were failing to mock subprocess.check_output and thus were trying to run sudo commands on the local system. This is dangerous. Add the subprocess mock. Also mock the LOG object so we don't print bogus Runtime error tracebacks in the unittest logs when we test assertRaises() Change-Id: I01535f9952fbd95ce2f5972b641c51ff836e7e8c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_monitor_command: mock LOG so we don't output errorRoss Brattain1-2/+6
Don't print fake tracebacks to the unittest logs Change-Id: I8a468b8c6566f02be88a9dd222567c14c66b0956 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-14Merge "Add API to get environments"Rex Lee1-0/+13
2017-07-14Merge "test_monitor_multi: speedup unittests, sleep less"Ross Brattain1-1/+1
2017-07-14Merge "test_storperf: speedup unittest, use time.sleep(0)"Ross Brattain1-2/+2
2017-07-13add network info to topologyRoss Brattain6-214/+596
we need to know which network each port is connected to so we can find VLAN or VXLAN ID. To do this we implement a new method for Contexts, Context.get_network(). This method is similar to Context.get_server(), it searches for a given network name in all the contexts. From this we generate a context_cfg["networks"] dict that stores all the network info for the nodes in the scenario. Then when we generate the topology for VNFD, we can lookup a given network by the vld_id and get the network_type, segmentation_id, etc. Then if we need to for example generated traffic on a given VLAN or VXLAN, we have this info available. Define default nd_route_tbl for ACL VNF we need default empty nd_route_tbl for IPv6 route. Change-Id: I9f9cfbd6acabeb4ae4675ca7354390efa57b29e7 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-07-13test_monitor_multi: speedup unittests, sleep lessRoss Brattain1-1/+1
Change-Id: I306e8e5525c3722179a5321988cad76190b93951 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_storperf: speedup unittest, use time.sleep(0)Ross Brattain1-2/+2
Change-Id: I3923d75c1ae7974c7803b0ad6997a5ad0fece11d Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13test_vpe_vnf: speedup unittest, mock timeRoss Brattain1-19/+25
Change-Id: I046fae81c23555573df7d9e2e80995499062cf38 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-13Add API to get environmentschenjiankun1-0/+13
JIRA: YARDSTICK-716 API: /api/v2/yardstick/environments METHOD: GET Change-Id: I46b7fb2b143fe76b6a0edbf1ecc8281187b85918 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-13Merge "NSBperf: fix bad sigint handler"Ross Brattain1-1/+1
2017-07-12NSBperf: fix bad sigint handlerRoss Brattain1-1/+1
This is why we don't do things at module import time. when we import this module it makes a bad sigint handler. Only load signal handlers at runtime. Also fix handler to take *args, **kwargs. Unittest failures: > time.sleep(0.01) E TypeError: handler() takes 0 positional arguments but 2 were given Change-Id: I4296a4bdef0e5f4d58b0503dcbc834f3bef0feeb Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-12test_nstat: decrease sleep time for unittestRoss Brattain1-3/+3
there is no reason to sleep for a whole minute during unittest Change-Id: I206229bcaa7a50af1859f7b04e521955bb6217d4 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-12Merge "Yardstick API architecture improvement"Rex Lee2-41/+23
2017-07-11Yardstick API architecture improvementchenjiankun2-41/+23
JIRA: YARDSTICK-710 Since we have the plan to upload api v2 and gui. We need to add put and delete method. So the architecture need to be improved. Change-Id: Ie20a79c26ef6c581897ce4e63980fa2895b162d2 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-10Change storperf target IPJingLu52-4/+4
As compass in master use OpenStack Ansible, the former IP "192.168.200.1" for Huawei pod-1 has been deprecated. Change-Id: Ia60885b36abec3455db2aa2939afbe2ef8bd79f5 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-10Merge "Yardstick install storperf update"Jing Lu2-1/+5
2017-07-07Yardstick install storperf updateJingLu52-1/+5
JIRA: YARDSTICK-702 Sicnce StorPerf has switched to use docker-compose to start container suite. The way Yardstick install storperf should also be updated. Change-Id: Idee05703b8ae5cd03bc214f598f56c8ac05ca755 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-07-06Merge "move flatten dict key to common utils"Kubi6-42/+51
2017-07-06move flatten dict key to common utilsrexlee87766-42/+51
So it can easily be used by other testcase to unify result JIRA: YARDSTICK-702 Change-Id: Id4fde38a9a0c2a87a6c870bdb7b0c8f3a3b371ac Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-07-06Merge "Blacklist TC011 from suites with ODL"Jing Lu5-0/+10
2017-07-05Merge "unify pod keywork so api can easily used"Kubi52-126/+172
2017-07-05Merge "Use "OS_INSECURE" variable as the insecure mode indicator"Kubi2-2/+2
2017-07-03Yardstick: Aarch64 jenkins slave supportAlexandru Nemes2-4/+12
Change-Id: I2d58c38d75fc1fe036769340e9fb02932f543510 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
2017-07-03Blacklist TC011 from suites with ODLAlexandru Nemes5-0/+10
In deployments with ODL, security groups behave badly because of an IPv6 rule that causes IPv4 packets to be incorrectly routed. This is described in: https://jira.opnfv.org/browse/ARMBAND-61 As a consequence, Yardstick TC011 fails because iperf cannot create a connection. The proposed solution is to temporarily comment out TC011 from test suites with ODL. As mentioned here, security groups support for IPv6 is partial: artifacts.opnfv.org/ipv6/docs/gapanalysis/gap-analysis-odl-boron.html On nosdn deployments this issue is not reproducing and the test runs ok. JIRA: ARMBAND-269 Change-Id: Id5fede27262c21d777ec8e9988941643d16f9417 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
2017-07-03Merge "Set TEST_DB_URL for storperf"Jing Lu1-0/+1
2017-06-30unify pod keywork so api can easily usedrexlee877652-126/+172
JIRA: YARDSTICK-695 Change-Id: I826cb2ea07949b1eaae4df4cb77175ec8f5df89b Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-06-30Use "OS_INSECURE" variable as the insecure mode indicatorJingLu52-2/+2
Now we use "OS_CACERT" as the insecure mode indicator, it is better to use "OS_INSECURE". Change-Id: I1406193e27510390b4b8fd8f4751d8361560172f Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-30Change prepareYardstickEnv to prepare_env and add log infochenjiankun3-27/+2
JIRA: YARDSTICK-697 Currently the action in env like prepareYardstickEnv, createGrafanaContainer, createInfluxDBContainer, this is not python style. So I do some change: prepareYardstickEnv->prepare_env createGrafanaContainer->create_grafana createInfluxDBContainer->create_influxdb And also add some log info in env_action. Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-27Set TEST_DB_URL for storperfJingLu51-0/+1
JIRA: YARDSTICK-692 add the URL for the test results DB to the storperd_admin-rc TEST_DB_URL=http://testresults.opnfv.org/test/api/v1 Also, add metadata JSON to the POST to /job API when creating the job: Change-Id: Ib950f759d80e707bc49d9015bc120d985051f131 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-26Bugfix: remove double quote around SECURE variableJingLu52-17/+17
JIRA: YARDSTICK-689 This patch remove the double quote around the SECURE varibale as it may cause the fowllowing error: $ openstack "${SECURE}" image list openstack: ' image list' is not an openstack command. See 'openstack --help'. Did you mean one of these? access token create address scope create address scope delete address scope list address scope set address scope show aggregate add host aggregate create ... Change-Id: Ibb22e85b3dd89b0e3b62821bd5ebe4f155886ffc Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-24Merge "Yardstick output format unified"Jing Lu3-21/+20
2017-06-22Merge "Acquire NSB specific data from Heat."Ross Brattain3-77/+409
2017-06-22Merge "HA testcase improvement"Kubi3-17/+31
2017-06-22Merge "bugfix: storperf timeout in ci"Kubi1-0/+2
2017-06-22HA testcase improvementJingLu53-17/+31
This patch improve HA test case in the following aspects: 1. the "GeneralHA" type now will check if the target service process in the controller node. 2. support ignore server certificate 3. add debug log for recovering service failed 4. improve method to kill keystone process Change-Id: I9ae7ab54391fe41d5d7f3e4951a7ac2e3ba75968 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-06-22bugfix: storperf timeout in cirexlee87761-0/+2
JIRA: YARDSTICK-680 Change-Id: Ie405187b8ab085a9e4f40a7e7e7e661c94e83630 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-06-22Yardstick output format unifiedchenjiankun3-21/+20
JIRA: YARDSTICK-658 Currently the yardstick have three dispatcher: file, influxdb, mongodb. (influxdb using API to get result and mongodb using testAPI to get result) But their output format is different. It is hard to use. In this patch, make all dispatchers using the same data source. And make the output format of file and influxdb unified. As for mongodb, since it is related to testAPI, so I make it push data every test case. The unified output format is: http://paste.openstack.org/show/610125/ Change-Id: I854ac4f03e6f904469b07b0c924c7d850545ae5b Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-20Acquire NSB specific data from Heat.Edward MacGillivray3-77/+409
First we add mac_address, subnet_cidr to Heat template outputs Then we convert those into a form for NSB and add vld_id. NSB also requires PCI Bus ID, kernel driver and dpdk_port_num. We get this by ssh-ing into instance and dumping sysfs We also need to fix allow for ssh key auth, and implement relative path file loading so NSB can find all its YAML files JIRA: YARDSTICK-580 Change history: don't hide heat create tracebacks we need tracebacks for debug vnf_generic: add task_path to scenario so we can load relative paths for vnf_generic we want to be able to load yaml relative to the task path For example: traffic_profile: ../../traffic_profiles/fixed.yaml topology: ping_tg_topology.yaml # TODO: look in relative path where the tc.yaml is found These need to be relative to samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml Add a scenario["task_path"] entry heat: log actual exception vnf_generic: replace list with set and iterate over values() some general refactors to remove redundact lookups and type conversions heat: provide mac_address, device_id and network_id from outputs We may need more information to dynamically determine test topology. Towards this end return more info in the heat template. We can return mac_address, device_id and network_id. Once we have this info we can add it to the context_cfg as an interfaces dict. add sample vnf ping multi-network test this test requires 3 network, one for mgmt and the other two for NSB traffic tests We have to make sure we don't use DPDK on mgmt interface because DPDK unbinds the driver heat: convert networks to OrderedDict so we can lookups networks as well as iterate over them in consisitent order heat: and vld_id to networks for vnf_generic vnf_generic uses vld_id Virtual Link Descriptor ID to identify interfaces Add the key to the networks dict and store in Networks object implement relative path file loading in vnf_generic in multiple places we need to load a file relative to the task path, so add open_relative_file_path and modify load_vnf_model to include the scenario_cfg parameter so we have access to task_path DRAFT: heat timeout support Heat stack in CI job failed due to some Nova issue. But then apparently yardstick kept running and took 180mins to timeout https://build.opnfv.org/ci/view/bottlenecks/job/bottlenecks-compass-posca_stress_ping-baremetal-daily-master/16/console We can add a Heat create timeout and fail faster if there is an error. The question is how long should we wait for a Heat stack to deploy. We can set a default and allow override in the heat context config, if users make complicated stacks heat: get netmask and gateway from heat outputs we have do some tricky business with finding the subnet cidr and converting it into netmask vnf_generic: get vpci, driver and dpdk_port_num use a big old find command to dump all the sysfs netdev info nicely. This was re-used from autotest FCoE tests. r"""find /sys/devices/pci* -type d -name net -exec sh -c '{ grep -sH ^ \ +$1/ifindex $1/address $1/operstate $1/device/vendor $1/device/device \ +$1/device/subsystem_vendor $1/device/subsystem_device ; \ +printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \ +' sh \{\}/* \; This finds all PCI devices that are network devices, then dumps all the relevant info using /bin/sh. Then we parse this into a 'netdevs' dict inside the node_dict and also convert into VNF fields we need. vnf_generic: set node name for kpis node is a dict, so we have to use node_name vnfdgen: we CANNOT use TaskTemplate.render because it does not allow for missing variables, we need to allow password for key_filename to be undefined remove default ssh password hack, once rendering is fixed add new example tc_external_ping_heat_context Change-Id: If1fe0c1a2ab0a5be17e40790a66f28f706fa44d6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-06-20Configure Yardstick flavor to give more RAM to ARM instancesAlexandru Nemes1-1/+1
Yardstick TC005 fails with errors that indicate low memory conditions: "fio: error while loading shared libraries: librbd.so.1: cannot map zero-fill pages" Changing the yardstick flavor to give 1024MB of RAM instead of 512MB made this test case work. JIRA: ARMBAND-275 Change-Id: I2193802082c28edb20004964d2df3780eb5eccb7 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
2017-06-08Merge "Fix configuration error in TC025"Ross Brattain1-1/+8
2017-06-07Bugfix: load_image will move image file if image already exist in ↵chenjiankun1-6/+0
/home/opnfv/images JIRA: YARDSTICK-678 Currently if yardstick-image exist in /home/opnfv/images, load_image.sh script will not build image, but this script will remove it. We should not remove the image file which user offer. Change-Id: I74ff6717606ff1dd9eacde4142e62d3923394baa Signed-off-by: chenjiankun <chenjiankun1@huawei.com>