nova/nova/tests/functional/libvirt
Stephen Finucane 7ae1a10913 functional: Remove 'api' parameter
Pretty much every test case in 'nova.tests.functional' defines an 'api'
attribute, and many define an 'admin_api' attribute. We can pull these
from the class rather than explicitly passing them to helpers. Rework
things so this happens.

Note that the bulk of the changes here are in the
'nova/tests/functional/integrated_helpers.py' file. The rest of the
changes were auto-generated using the following script (my sed-fu is
non-existent):

  $ cd nova/tests/functional
  $ python3
  >>> import glob
  >>> import re
  >>> pattern = r'_state_change\((\n\s+)?self\.(admin_)?api,\s+'
  >>> replace = r'_state_change(\1'
  >>> for path in glob.glob('*.py') + glob.glob('*/*.py'):
  ...     with open(path) as fh:
  ...         data = fh.read()
  ...     new = re.sub(pattern, replace, data, flags=re.MULTILINE)
  ...     if new != data:
  ...         with open(path, 'w') as fh:
  ...             fh.write(new)
  ...
  >>> quit()

(ditto for the other substitutions)

Some manual fixups were required after, which pre-commit highlighted :)

Change-Id: I8c96b337f32148f8f5899c9b87af331b1fa41424
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-12-06 15:35:33 +00:00
..
__init__.py tests: introduce a NUMAServersTest class 2015-04-16 11:43:53 -04:00
base.py Helper to start computes with different HostInfos 2019-11-12 10:03:58 -05:00
integrated_helpers.py Extract new base class for provider usage functional tests 2019-08-21 15:06:20 +01:00
test_numa_servers.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_pci_sriov_servers.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_report_cpu_traits.py Always trait the compute node RP with COMPUTE_NODE 2019-10-21 11:33:58 -05:00
test_reshape.py libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Ussuri" 2019-11-21 15:07:25 +01:00
test_rt_servers.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_shared_resource_provider.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_vpmem.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00