Update git submodules
* Update nova from branch 'master' to d03a600461db7d0fe0d6a9f522c30b890c691353 - Merge "db: Synchronize function signatures" - db: Synchronize function signatures A number of the abstract APIs in 'nova.db.api' had a different function signature to their concrete implementations in 'nova.db.sqlalchemy.api'. Correct this. Functions changed include: - action_get_by_request_id - create_context_manager - instance_add_security_group - instance_extra_update_by_uuid - instance_get_all_by_filters - instance_remove_security_group - migration_get - migration_get_by_id_and_instance - pci_device_update - service_get_minimum_version - virtual_interface_delete_by_instance - virtual_interface_get_by_instance - virtual_interface_get_by_instance_and_network To do this, the following script was used: >>> import nova.db.api as base_api >>> import nova.db.sqlalchemy.api as sqla_api >>> import collections >>> import inspect >>> for name in dir(base_api): ... fn_base = getattr(base_api, name) ... if not isinstance(fn_base, collections.Callable): ... continue ... fn_sqla = getattr(sqla_api, name, None) ... if not fn_sqla or not isinstance(fn_sqla, collections.Callable): ... print(f'missing function in nova.api.sqlalchemy.db: {name}') ... spec_base = inspect.getfullargspec(fn_base) ... spec_sqla = inspect.getfullargspec(fn_sqla) ... if spec_base != spec_sqla: ... print('mismatched function specs:') ... print(f'base: {spec_base}') ... print(f'sqla: {spec_sqla}') ... break In order for *this* to work, it was necessary to update the many decorators in 'nova.db.sqlalchemy.api' so that function signatures were preserved. This is possible by setting the signature of the wrapper to that of the wrapped function. Change-Id: Icb97a8b4e17fdbb2146ddf2729c906757c664f66 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
2c574fb264
commit
9b2f6beb84
2
nova
2
nova
|
@ -1 +1 @@
|
|||
Subproject commit e7c18ef9bf8bbada186a446e0cc9bc560f126e6f
|
||||
Subproject commit d03a600461db7d0fe0d6a9f522c30b890c691353
|
Loading…
Reference in New Issue