Pick up InstanceMetadata changes

The InstanceMetadata constructor has been updated by
Ie27fd6a5513e53903b9acd5d63038b3b484acbde. The "request_context"
parameters was dropped, so we have to stop passing it.

Change-Id: I80bc28f57862f420c9da01839fbfa00902f45da0
This commit is contained in:
Lucian Petrut 2020-10-26 13:37:45 +02:00
parent e7021d221a
commit c57ac7aab5
2 changed files with 2 additions and 3 deletions

View File

@ -764,7 +764,7 @@ class VMOps(object):
inst_md = instance_metadata.InstanceMetadata(
instance, content=injected_files, extra_md=extra_md,
network_info=network_info, request_context=context)
network_info=network_info)
configdrive_path_iso = self._pathutils.get_configdrive_path(
instance.name, constants.DVD_FORMAT, rescue=rescue)

View File

@ -1175,8 +1175,7 @@ class VMOpsTestCase(test_base.HyperVBaseTestCase):
mock_InstanceMetadata.assert_called_once_with(
mock_instance, content=[mock.sentinel.FILE],
extra_md={'admin_pass': mock.sentinel.PASSWORD},
network_info=mock.sentinel.NET_INFO,
request_context=self.context)
network_info=mock.sentinel.NET_INFO)
mock_get_configdrive_path.assert_has_calls(
expected_get_configdrive_path_calls)
mock_ConfigDriveBuilder.assert_called_with(