Add support for Python 3 39/25539/18
authorRoss Brattain <ross.b.brattain@intel.com>
Mon, 5 Dec 2016 21:11:54 +0000 (16:11 -0500)
committerRoss Brattain <ross.b.brattain@intel.com>
Fri, 13 Jan 2017 02:25:04 +0000 (18:25 -0800)
commitf036e9898a69f5041f9cde02e3652c29e2de1643
tree36e5eea75811bb640bb30f442f5a3c617e945909
parent5f0b3d417244397b2d5e61c7a6ddd145f1d25046
Add support for Python 3

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>
204 files changed:
api/base.py
api/conf.py
api/database/__init__.py
api/database/models.py
api/resources/env_action.py
api/resources/release_action.py
api/resources/results.py
api/resources/samples_action.py
api/server.py
api/swagger/models.py
api/urls.py
api/utils/common.py
api/utils/daemonthread.py
api/utils/influx.py
api/views.py
ez_setup.py
requirements.txt
setup.py
tests/functional/test_cli_runner.py
tests/functional/test_cli_scenario.py
tests/functional/utils.py
tests/unit/api/utils/test_common.py
tests/unit/api/utils/test_influx.py
tests/unit/benchmark/contexts/test_dummy.py
tests/unit/benchmark/contexts/test_heat.py
tests/unit/benchmark/contexts/test_model.py
tests/unit/benchmark/contexts/test_node.py
tests/unit/benchmark/core/test_plugin.py
tests/unit/benchmark/core/test_task.py
tests/unit/benchmark/core/test_testcase.py
tests/unit/benchmark/scenarios/availability/test_attacker_baremetal.py
tests/unit/benchmark/scenarios/availability/test_attacker_general.py
tests/unit/benchmark/scenarios/availability/test_attacker_process.py
tests/unit/benchmark/scenarios/availability/test_basemonitor.py
tests/unit/benchmark/scenarios/availability/test_baseoperation.py
tests/unit/benchmark/scenarios/availability/test_baseresultchecker.py
tests/unit/benchmark/scenarios/availability/test_director.py
tests/unit/benchmark/scenarios/availability/test_monitor_command.py
tests/unit/benchmark/scenarios/availability/test_monitor_general.py
tests/unit/benchmark/scenarios/availability/test_monitor_process.py
tests/unit/benchmark/scenarios/availability/test_operation_general.py
tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
tests/unit/benchmark/scenarios/availability/test_scenario_general.py
tests/unit/benchmark/scenarios/availability/test_serviceha.py
tests/unit/benchmark/scenarios/compute/test_cachestat.py
tests/unit/benchmark/scenarios/compute/test_computecapacity.py
tests/unit/benchmark/scenarios/compute/test_cpuload.py
tests/unit/benchmark/scenarios/compute/test_cyclictest.py
tests/unit/benchmark/scenarios/compute/test_lmbench.py
tests/unit/benchmark/scenarios/compute/test_memload.py
tests/unit/benchmark/scenarios/compute/test_plugintest.py
tests/unit/benchmark/scenarios/compute/test_ramspeed.py
tests/unit/benchmark/scenarios/compute/test_unixbench.py
tests/unit/benchmark/scenarios/dummy/test_dummy.py
tests/unit/benchmark/scenarios/networking/test_iperf3.py
tests/unit/benchmark/scenarios/networking/test_netperf.py
tests/unit/benchmark/scenarios/networking/test_netperf_node.py
tests/unit/benchmark/scenarios/networking/test_netutilization.py
tests/unit/benchmark/scenarios/networking/test_networkcapacity.py
tests/unit/benchmark/scenarios/networking/test_ping.py
tests/unit/benchmark/scenarios/networking/test_ping6.py
tests/unit/benchmark/scenarios/networking/test_pktgen.py
tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
tests/unit/benchmark/scenarios/networking/test_sfc.py
tests/unit/benchmark/scenarios/networking/test_vsperf.py
tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py
tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation_noisy.py
tests/unit/benchmark/scenarios/networking/test_vtc_throughput.py
tests/unit/benchmark/scenarios/networking/test_vtc_throughput_noisy_test.py
tests/unit/benchmark/scenarios/parser/test_parser.py
tests/unit/benchmark/scenarios/storage/test_fio.py
tests/unit/benchmark/scenarios/storage/test_storagecapacity.py
tests/unit/benchmark/scenarios/storage/test_storperf.py
tests/unit/cmd/commands/test_env.py
tests/unit/common/test_httpClient.py
tests/unit/common/test_openstack_utils.py
tests/unit/common/test_template_format.py
tests/unit/common/test_utils.py
tests/unit/dispatcher/test_influxdb.py
tests/unit/dispatcher/test_influxdb_line_protocol.py
tests/unit/test_ssh.py
third_party/influxdb/influxdb_line_protocol.py
yardstick/__init__.py
yardstick/benchmark/__init__.py
yardstick/benchmark/contexts/base.py
yardstick/benchmark/contexts/dummy.py
yardstick/benchmark/contexts/heat.py
yardstick/benchmark/contexts/model.py
yardstick/benchmark/contexts/node.py
yardstick/benchmark/core/plugin.py
yardstick/benchmark/core/runner.py
yardstick/benchmark/core/scenario.py
yardstick/benchmark/core/task.py
yardstick/benchmark/core/testcase.py
yardstick/benchmark/runners/arithmetic.py
yardstick/benchmark/runners/base.py
yardstick/benchmark/runners/duration.py
yardstick/benchmark/runners/iteration.py
yardstick/benchmark/runners/sequence.py
yardstick/benchmark/scenarios/availability/actionrollbackers.py
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py
yardstick/benchmark/scenarios/availability/attacker/attacker_general.py
yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
yardstick/benchmark/scenarios/availability/director.py
yardstick/benchmark/scenarios/availability/monitor/basemonitor.py
yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
yardstick/benchmark/scenarios/availability/monitor/monitor_general.py
yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
yardstick/benchmark/scenarios/availability/operation/baseoperation.py
yardstick/benchmark/scenarios/availability/operation/operation_general.py
yardstick/benchmark/scenarios/availability/result_checker/baseresultchecker.py
yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py
yardstick/benchmark/scenarios/availability/scenario_general.py
yardstick/benchmark/scenarios/availability/serviceha.py
yardstick/benchmark/scenarios/base.py
yardstick/benchmark/scenarios/compute/cachestat.py
yardstick/benchmark/scenarios/compute/computecapacity.py
yardstick/benchmark/scenarios/compute/cpuload.py
yardstick/benchmark/scenarios/compute/cyclictest.py
yardstick/benchmark/scenarios/compute/lmbench.py
yardstick/benchmark/scenarios/compute/memload.py
yardstick/benchmark/scenarios/compute/perf.py
yardstick/benchmark/scenarios/compute/plugintest.py
yardstick/benchmark/scenarios/compute/ramspeed.py
yardstick/benchmark/scenarios/compute/unixbench.py
yardstick/benchmark/scenarios/dummy/dummy.py
yardstick/benchmark/scenarios/networking/iperf3.py
yardstick/benchmark/scenarios/networking/netperf.py
yardstick/benchmark/scenarios/networking/netperf_node.py
yardstick/benchmark/scenarios/networking/netutilization.py
yardstick/benchmark/scenarios/networking/networkcapacity.py
yardstick/benchmark/scenarios/networking/ping.py
yardstick/benchmark/scenarios/networking/ping6.py
yardstick/benchmark/scenarios/networking/pktgen.py
yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
yardstick/benchmark/scenarios/networking/sfc.py
yardstick/benchmark/scenarios/networking/sfc_openstack.py
yardstick/benchmark/scenarios/networking/vsperf.py
yardstick/benchmark/scenarios/networking/vtc_instantiation_validation.py
yardstick/benchmark/scenarios/networking/vtc_instantiation_validation_noisy.py
yardstick/benchmark/scenarios/networking/vtc_throughput.py
yardstick/benchmark/scenarios/networking/vtc_throughput_noisy.py
yardstick/benchmark/scenarios/parser/parser.py
yardstick/benchmark/scenarios/storage/fio.py
yardstick/benchmark/scenarios/storage/storagecapacity.py
yardstick/benchmark/scenarios/storage/storperf.py
yardstick/cmd/__init__.py
yardstick/cmd/cli.py
yardstick/cmd/commands/__init__.py
yardstick/cmd/commands/env.py
yardstick/cmd/commands/plugin.py
yardstick/cmd/commands/runner.py
yardstick/cmd/commands/scenario.py
yardstick/cmd/commands/task.py
yardstick/cmd/commands/testcase.py
yardstick/common/constants.py
yardstick/common/httpClient.py
yardstick/common/openstack_utils.py
yardstick/common/task_template.py
yardstick/common/template_format.py
yardstick/common/utils.py
yardstick/definitions.py
yardstick/dispatcher/__init__.py
yardstick/dispatcher/base.py
yardstick/dispatcher/file.py
yardstick/dispatcher/http.py
yardstick/dispatcher/influxdb.py
yardstick/main.py
yardstick/orchestrator/heat.py
yardstick/plot/plotter.py
yardstick/ssh.py
yardstick/vTC/apexlake/experimental_framework/__init__.py
yardstick/vTC/apexlake/experimental_framework/api.py
yardstick/vTC/apexlake/experimental_framework/benchmarking_unit.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/benchmark_base_class.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py
yardstick/vTC/apexlake/experimental_framework/benchmarks/test_benchmark.py
yardstick/vTC/apexlake/experimental_framework/common.py
yardstick/vTC/apexlake/experimental_framework/constants/framework_parameters.py
yardstick/vTC/apexlake/experimental_framework/deployment_unit.py
yardstick/vTC/apexlake/experimental_framework/heat_manager.py
yardstick/vTC/apexlake/experimental_framework/heat_template_generation.py
yardstick/vTC/apexlake/experimental_framework/packet_generators/base_packet_generator.py
yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_packet_generator.py
yardstick/vTC/apexlake/setup.py
yardstick/vTC/apexlake/tests/api_test.py
yardstick/vTC/apexlake/tests/base_packet_generator_test.py
yardstick/vTC/apexlake/tests/benchmark_base_class_test.py
yardstick/vTC/apexlake/tests/benchmarking_unit_test.py
yardstick/vTC/apexlake/tests/common_test.py
yardstick/vTC/apexlake/tests/conf_file_sections_test.py
yardstick/vTC/apexlake/tests/deployment_unit_test.py
yardstick/vTC/apexlake/tests/dpdk_packet_generator_test.py
yardstick/vTC/apexlake/tests/generates_template_test.py
yardstick/vTC/apexlake/tests/heat_manager_test.py
yardstick/vTC/apexlake/tests/instantiation_validation_bench_test.py
yardstick/vTC/apexlake/tests/instantiation_validation_noisy_bench_test.py
yardstick/vTC/apexlake/tests/multi_tenancy_throughput_benchmark_test.py
yardstick/vTC/apexlake/tests/rfc2544_throughput_benchmark_test.py
yardstick/vTC/apexlake/tests/tree_node_test.py