Clean up the DynamicVendorData constructor

There are a bunch of unused parameters in DynamicVendorData constructor
and a comment that they cannot be removed due to JsonFileVendorData. But
JsonFileVendorData does not depends on those paramters and both the
base class and JsonFileVendorData uses *args **kwargs. So it is safe to
remove the unused params.

The context field of DynamicVendorData is also removed as it is unused.
This makes the request_context parameter of the InstanceMeta
constructor also unused so that is removed.

Change-Id: Ie27fd6a5513e53903b9acd5d63038b3b484acbde
This commit is contained in:
Balazs Gibizer
2020-09-18 17:48:10 +02:00
parent 1390eecf8d
commit 450213f1f0
11 changed files with 13 additions and 31 deletions

View File

@@ -59,12 +59,7 @@ def _load_ks_session(conf):
class DynamicVendorData(vendordata.VendorDataDriver):
def __init__(self, context=None, instance=None, address=None,
network_info=None):
# NOTE(mikal): address and network_info are unused, but can't be
# removed / renamed as this interface is shared with the static
# JSON plugin.
self.context = context
def __init__(self, instance):
self.instance = instance
# We only create the session if we make a request.
self.session = None