functest.opnfv_tests.openstack.snaps.snaps_suite_builder module

Snaps test suite including openstack client tests, api tests and integration tests. add_openstack_client_tests: for connection_check add_openstack_api_tests: for api_check add_openstack_integration_tests: for snaps_smoke

functest.opnfv_tests.openstack.snaps.snaps_suite_builder.add_openstack_api_tests(suite, os_creds, ext_net_name, use_keystone=True, image_metadata=None, log_level=20)

Adds tests written to exercise all existing OpenStack APIs

Parameters:
  • suite – the unittest.TestSuite object to which to add the tests
  • os_creds – Instance of OSCreds that holds the credentials required by OpenStack
  • ext_net_name – the name of an external network on the cloud under test
  • use_keystone – when True, tests requiring direct access to Keystone are added as these need to be running on a host that has access to the cloud’s private network
  • image_metadata – dict() object containing metadata for creating an image with custom config (see YAML files in examples/image-metadata)
  • log_level – the logging level
Returns:

None as the tests will be adding to the ‘suite’ parameter object

functest.opnfv_tests.openstack.snaps.snaps_suite_builder.add_openstack_client_tests(suite, os_creds, ext_net_name, use_keystone=True, log_level=20)

Adds tests written to exercise OpenStack client retrieval

Parameters:
  • suite – the unittest.TestSuite object to which to add the tests
  • os_creds – and instance of OSCreds that holds the credentials required by OpenStack
  • ext_net_name – the name of an external network on the cloud under test
  • use_keystone – when True, tests requiring direct access to Keystone are added as these need to be running on a host that has access to the cloud’s private network
  • log_level – the logging level
Returns:

None as the tests will be adding to the ‘suite’ parameter object

functest.opnfv_tests.openstack.snaps.snaps_suite_builder.add_openstack_integration_tests(suite, os_creds, ext_net_name, use_keystone=True, flavor_metadata=None, image_metadata=None, use_floating_ips=True, netconf_override=None, log_level=20)

Adds tests written to exercise all long-running OpenStack integration tests meaning they will be creating VM instances and potentially performing some SSH functions through floatingIPs

Parameters:
  • suite – the unittest.TestSuite object to which to add the tests
  • os_creds – and instance of OSCreds that holds the credentials required by OpenStack
  • ext_net_name – the name of an external network on the cloud under test
  • use_keystone – when True, tests requiring direct access to Keystone are added as these need to be running on a host that has access to the cloud’s private network
  • image_metadata – dict() object containing metadata for creating an image with custom config (see YAML files in examples/image-metadata)
  • flavor_metadata – dict() object containing the metadata required by your flavor based on your configuration: (i.e. {‘hw:mem_page_size’: ‘large’})
  • use_floating_ips – when true, all tests requiring Floating IPs will be added to the suite
  • netconf_override – dict() containing the reconfigured network_type, physical_network and segmentation_id
  • log_level – the logging level
Returns:

None as the tests will be adding to the ‘suite’ parameter object