functest.opnfv_tests.sdn.odl.odl module¶
Define classes required to run ODL suites.
It has been designed for any context. But helpers are given for running test suites in OPNFV environment.
- Example:
- $ python odl.py
-
class
functest.opnfv_tests.sdn.odl.odl.
ODLParser
¶ Bases:
object
Parser to run ODL test suites.
-
parse_args
(argv=None)¶ Parse arguments.
It can call sys.exit if arguments are incorrect.
- Returns:
- the arguments from cmdline
-
-
class
functest.opnfv_tests.sdn.odl.odl.
ODLTests
(**kwargs)¶ Bases:
xtesting.core.robotframework.RobotFramework
ODL test runner.
-
basic_suite_dir
= u'/src/odl_test/csit/suites/integration/basic'¶
-
default_suites
= [u'/src/odl_test/csit/suites/integration/basic', u'/src/odl_test/csit/suites/openstack/neutron']¶
-
neutron_suite_dir
= u'/src/odl_test/csit/suites/openstack/neutron'¶
-
odl_test_repo
= u'/src/odl_test'¶
-
odl_variables_file
= u'/src/odl_test/csit/variables/Variables.robot'¶
-
run
(**kwargs)¶ Run suites in OPNFV environment
It basically checks env vars to call main() with the keywords required.
- Args:
- kwargs: Arbitrary keyword arguments.
- Returns:
- EX_OK if all suites ran well. EX_RUN_ERROR otherwise.
-
run_suites
(suites=None, **kwargs)¶ Run the test suites
It has been designed to be called in any context. It requires the following keyword arguments:
- odlusername,
- odlpassword,
- osauthurl,
- neutronurl,
- osusername,
- osprojectname,
- ospassword,
- odlip,
- odlwebport,
- odlrestconfport.
- Here are the steps:
- set all RobotFramework_variables,
- create the output directories if required,
- get the results in output.xml,
- delete temporary files.
- Args:
- kwargs: Arbitrary keyword arguments.
- Returns:
- EX_OK if all suites ran well. EX_RUN_ERROR otherwise.
-
classmethod
set_robotframework_vars
(odlusername='admin', odlpassword='admin')¶ Set credentials in csit/variables/Variables.robot.
- Returns:
- True if credentials are set. False otherwise.
-
-
functest.opnfv_tests.sdn.odl.odl.
main
()¶ Entry point