Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
There are multiple issues wiht YAML loading.
1. Jinja2 renders None values as a string 'None'. This is not valid YAML
we need to render None values to '~' or 'null' which is the native YAML
None value.
2. Jinja2 renders dict and lists that contain unicode with
u'foo' values. This is not value YAML syntax.
Because we are serializing dict and lists into YAML, we
need to encode them as valid YAML. We can override Jinja2 finalize to
use yaml.dump to dump inline YAML.
We use yaml.safe_dump(elem, default_flow_style=True).replace('\n', '')
to generate valid single-line YAML dict and list values.
But this problem highlights the general difficulties with templating and
loading files.
We could avoid this Python->Jinja2->YAML->Python issue by directly
injecting the list or dict after the YAML is loaded.
I'm not sure of the real utility of these templates.
3. On Python 2 YAML loader is rendering all strings
as unicode. This does not work for Trex because Trex is broken
and badly coded. Trex does type checking against str() which
is different for Python 2 and Python 3.
The default YAML loader will return native string types, str() or unicode()
for Python 2 and Python 3 respectively.
The bad Trex codes is in convert_val:
https://github.com/cisco-system-traffic-generator/trex-core/blob/master/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py#L674
def convert_val (val):
if is_integer(val):
return val
if type(val) == str:
return ipv4_str_to_num (is_valid_ipv4(val))
raise CTRexPacketBuildException(-11,("init val invalid %s ") % val );
This code is doing type(val) == str. This is bad and broken.
We can't fix Trex, so we have to render all strings as native str() types
The bug here was that the Heat template loader template_format.py
was overriding the global YAML loader to always return unicode.
We don't want this global override.
To fix this we have to use local subclasses of the yaml.SafeLoader
class.
But in order to dynamically subclass from CSafeLoader or SafeLoader
we have to use the type() builtin to define a new class at runtime.
Once we have new classes defined, we can safely isolate different
YAML constructors and return unicode or not depending on the case.
To be consistent we implement a new yaml_loader.py module to centralize
all non-Heat template yaml loading to ensure correct uncode/str
conversion
Change-Id: Iebf9cf78fbda390977c390436b0869e7bbf503eb
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
iteritems is not supported in Python 3
we have to use items()
Change-Id: Ib923dfea4220eeab311949c9f6f420fef378e98a
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Change-Id: I8d7cea75aa864c37a058a154a38c9828ea5da434
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Change-Id: I81e119deec36ae90749c2eb1d555f75475ce2474
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|
|
|
|
|
|
|
|
Change-Id: Id8901aabef402d5743e2575e275b5a57046e897c
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|
|
Change-Id: If021ed0f099c81492fd7509317efc31f020e6d18
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Change-Id: I3b353c5887db0ebbe33e37db505e72b85167b54e
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
|
|
|
|
Change-Id: I8d6b9bed24c9afa4be54296515e6aa91e84fe650
Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
flake8 warns about indent
Change-Id: Ib7a57dcb8462de24a2ccb1fdbc60db995cc60d33
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
test_instantiate_panic fails randomly sometimes
in Jenkins, the test doesn't really do anything
useful, so remove it
Change-Id: Ia44ebbe778b812ae1b4660d64e88bf029fed3701
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
Problem:
Running Vsperf in Tgen mode is supported but the integration is not complete at the code level
i.e. not ready-to-use, and dpdk loopback is not supported inside the VM.
Solution:
(1) Completely automates VM image generation and supports 1G huge pages.
(2) Adds a new test scenario VsperfDPDK for testpmd based loopback inside the VM.
Update 1-2: Fixed "line too long" issues not reported by local run_tests.sh (why?)
Update 3: Per comment change to use SSH.from_node() and add unit test cases
Update 4: Add more unit test cases for coverage and ready the code for merge
JIRA: YARDSTICK-661
Change-Id: Iea3014d4c83e1b0c079019a4ed27771d40a7eed8
Signed-off-by: Jing Zhang <jing.c.zhang@nokia.com>
|
|
Note: This patch should be merger to stable branch.
Change-Id: I7f07a7c367fc387494f2313143a300fef85a8fd1
Signed-off-by: JingLu5 <lvjing5@huawei.com>
|
|
|
|
Change-Id: I3639ab84ab5b9e802e1bbd23674b0fbda46fdc66
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
PROX was added to samplevnf project
https://git.opnfv.org/samplevnf/tree/VNFs/DPPD-PROX
JIRA: YARDSTICK-638
Change-Id: If9875b1130c6bed87deb8720b0d8b28ede9289d9
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
JIRA: YARDSTICK-784
Currently we have yardstick report in GUI.
But if users do not use GUI, they can't see this report.
So we need generate a report each task.
After run each test case, we can see report:
http://ip:port/report/report.html
Change-Id: Ic76cf57f55aa6680b91272e210135136f0225373
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
Change-Id: I3df6bc606f2ac78baf611aee22b9247f6f9d5136
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Traceback (most recent call last):
File "/opt/nsb_bin/yardstick_venv/lib/python2.7/site-packages/yardstick-0.1.dev0-py2.7.egg/yardstick/cmd/commands/task.py", line 54, in do_start
result = Task().start(param, **kwargs)
File "/opt/nsb_bin/yardstick_venv/lib/python2.7/site-packages/yardstick-0.1.dev0-py2.7.egg/yardstick/benchmark/core/task.py", line 148, in start
self._do_output(output_config, result)
File "/opt/nsb_bin/yardstick_venv/lib/python2.7/site-packages/yardstick-0.1.dev0-py2.7.egg/yardstick/benchmark/core/task.py", line 227, in _do_output
dispatchers = DispatcherBase.get(output_config)
File "/opt/nsb_bin/yardstick_venv/lib/python2.7/site-packages/yardstick-0.1.dev0-py2.7.egg/yardstick/dispatcher/base.py", line 46, in get
for out_type in config['DEFAULT']['dispatcher']]
File "/opt/nsb_bin/yardstick_venv/lib/python2.7/site-packages/yardstick-0.1.dev0-py2.7.egg/yardstick/dispatcher/base.py", line 38, in get_cls
raise RuntimeError("No such dispatcher_type %s" % dispatcher_type)
RuntimeError: No such dispatcher_type Http # setup multiple dipatcher with comma deperted e.g. file
Change-Id: I497d0d9ce7fdb7ea2913af6ebeb4bb9008344fed
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|
|
import the AnsibleCommon class to execute Ansible playbooks
Update node context support to use AnsibleCommon
needs unittests
We must call ansible-playbook as an executable, so we must create temp
files for inventory, and for the playbooks.
AnsibleCommon has evolved to be quite flexible, it auto-generates the
inventory from the context['nodes'] and generates groups from the node
Role.
We also support either a single playbook filename, or a list of
filenames.
If given a list we dynamically generate a playbook that includes the
other playbooks.
We support adding any number of extra_vars using a temp JSON file.
Also designed to be extended by subclassing.
Change-Id: I5bd0a2b4547feaadd70b7e2b8801f19371b99df0
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
The class name is IxiaTrafficGen
Change-Id: Ie18be44c7b58d50f13e9a5df50afa3e02fc0cce3
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
JIRA: YARDSTICK-783
This patch is used for updating the configuration file of opnfv grafana
dashboard for kvmfornfv packet forwarding to publish the results of new
test cases added as part of kvmfornfv daily job.
Also used for updating the config file of opnfv grafana dashboard for
kvmfornfv cyclictest test cases to correct the alias colours.
Change-Id: I34aa155e2782e58147e55f974134673a892eb93b
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
|
|
Change-Id: If6f672a2cbe218a20e3d8f3d093d31f6887d7ca3
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-775
We have GUI now, but we can't see real time log in GUI view.
So I add real time log view in GUI.
Change-Id: Ie83f327ef0a94302afa6b3def764fec6ef5818d1
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
|
|
|
|
|
|
JIRA: YARDSTICK-771
Change-Id: Ibcd2228505d341feb09b0d477e5f4ed6062c1e89
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
|
|
|
|
|
|
JIRA: YARDSTICK-781
This patch adds some common openstack opertation scenarios
Change-Id: I3de7dbb30eaebac4feebcf07dd6a0d2bdcf428d9
Signed-off-by: JingLu5 <lvjing5@huawei.com>
|
|
Change-Id: I598f6f98f94f70334139966cc170832c90ea9aa6
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
Change-Id: I32ca166cd6d818b57bbcfaf7c7e5a65b7147ba8d
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Change-Id: I0f5555a1674a5ecb7e2afb508d495b7872c90757
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
JIRA: YARDSTICK-781
This patch adds some common openstack opertation scenarios
Change-Id: I9e84a8894fe9b9c1754a45a0ddfdf93739164b9a
Signed-off-by: JingLu5 <lvjing5@huawei.com>
|
|
|
|
|
|
|
|
|