aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking/ping6.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-15Convert SLA asserts to raisesMiikka Koistinen1-7/+6
This commit converts Python assertions to a custom exception in all places where SLA validation is checked with an assertion. This commit also fixes all emerged pylint errors. JIRA: YARDSTICK-966 Change-Id: If771ed03b2cbc0a43a57fcfb9293f18740b3ff80 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2017-04-11standardize ssh authRoss Brattain1-14/+1
we need to be following defautl paramiko rules, first use pkey, then key_filenames (autodetecting ~/.ssh/ keys), then password We have too much boilerplate redudant code everywhere, we need to standardize on a factory function that takes a node dict. Using Python3 ChainMap we can layer overrides and defaults. VNF descriptors have to default key_filename, password to Python None. The only way to do this is to omit key values if the variable is not defined, this way the dict will not have the value and it will default to Python None Add python2 chainmap backport Updated unittest mocking to use ssh.SSH.from_node Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-16Use """ to replace ''' in docstringchenjiankun1-1/+1
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 Brattain1-0/+1
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>
2016-12-05use context manager for stdin files and use _put_file_shellRoss Brattain1-18/+15
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-11-14Merge "bugfix: ipv6 should log in controller node to setup"Kubi1-4/+14
2016-11-10add option to connect to non-standard ssh portRoss Brattain1-2/+4
not all enviroments have port 22 enabled for SSH. In particular for network isolation NAT and port forwarding may be used. example pod.yaml: nodes: - ip: 10.2.45.145 name: node1 password: '' role: Controller ssh_port: 5000 user: root - ip: 10.2.45.145 name: node2 password: '' role: Controller ssh_port: 5001 user: root - ip: 10.2.45.145 name: node3 password: '' role: Controller ssh_port: 5002 user: root JIRA: YARDSTICK-407 Change-Id: I8f9d6e388f31d291dd15cb900d7f71f347e41ef6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-09bugfix: ipv6 should log in controller node to setuprexlee87761-4/+14
JIRA: YARDSTICK-363 Change-Id: Ic1f2ab98425512014d746a997b7356d3490c6b33 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-09-28ipv6 test case to de-coupling to fuel/compassrexlee87761-41/+43
JIRA: YARDSTICK-358 1. plan to support fuel first 2. apex/joid situation will be taken care of in another patch Change-Id: Ia9293a2e925d874cc6182e975f563d92fb91a2c7 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-09-20bugfix: ipv6 testcase ping6 command wrongrexlee87761-2/+2
JIRA: YARDSTICK-355 Change-Id: Ib05318d03aaba1c86dd386f6d375d8d2cffa11ef Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-09-13add ping6 parametersMatthewLi1-1/+11
JIRA: YARDSTICK-315 1) make packetsize workable 2) add ping_count parameter Change-Id: Ice2235fc5744b94df6a3f981c23159ca8280d876 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-01-19support os+odl for ipv6kubi1-8/+32
As we known, the network of os+odl scenario is still not available. so this patch still need to do more debug work. however, Jan 19th is code freeze day, i think a good way is to merge it at first when os+odl become available, i will do rest debug work and fix it Change-Id: I518f759069e74d2e57e40b52dfecaef4b4d26a02 Signed-off-by: kubi <jean.gaoliang@huawei.com>
2016-01-16modify sc lab pod yaml as real configurekubi1-0/+6
Change-Id: I6587794b7206cb3d5f13b6c448670d1c97ecd596 Signed-off-by: kubi <jean.gaoliang@huawei.com>
2016-01-15fix some bug in ipv6 to make it run in cikubi1-11/+73
JIRA:YARDSTICK-187 Change-Id: Ia15d17afdef145f7b230a8a4d25a61eed5cdfd76 Signed-off-by: kubi <jean.gaoliang@huawei.com>
2016-01-13Fix flake8 errorsJo¶rgen Karlsson1-2/+2
Change-Id: I14f21092f5e97abf0629a92a27062846a6d3130b JIRA:- Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2016-01-08support for ipv6kubi1-0/+119
JIRA:YARDSTICK-187 Change-Id: I1cecd400b4449a09d22d43f4a42e889f00dd4fe7 Signed-off-by: kubi <jean.gaoliang@huawei.com>