Skip to content

Commit e620e45

Browse files
committed
CinderFixture: Return a driver_type of fake within connection_info
Previously the attachment info returned by the fixture would incorrectly list the driver_type outside of the connection_info dict [1][2]. This changes moves it within the connection_info dict and updates the type to `fake` for use by the libvirt driver that provides a compatible volume driver [3] for use in our functional tests. [1] https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=create-attachment-detail#id407 [2] https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=update-an-attachment-detail#id411 [3] https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/virt/libvirt/volume/volume.py#L171-L184 Change-Id: I73ff0a7508d9f8f6f3d498be13f6f7c505b05e5c
1 parent 1b26ec4 commit e620e45

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

nova/tests/fixtures.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,11 +2575,16 @@ def fake_attachment_update(_self, context, attachment_id, connector,
25752575
_attachment['connector'].get('host')))
25762576
attachment['connector'] = connector
25772577
LOG.info('Updating volume attachment: %s', attachment_id)
2578-
attachment_ref = {'driver_volume_type': 'fake_type',
2579-
'id': attachment_id,
2580-
'connection_info': {'data':
2581-
{'foo': 'bar',
2582-
'target_lun': '1'}}}
2578+
attachment_ref = {
2579+
'id': attachment_id,
2580+
'connection_info': {
2581+
'driver_volume_type': 'fake',
2582+
'data': {
2583+
'foo': 'bar',
2584+
'target_lun': '1'
2585+
}
2586+
}
2587+
}
25832588
if attachment_id == self.SWAP_ERR_ATTACH_ID:
25842589
# This intentionally triggers a TypeError for the
25852590
# instance.volume_swap.error versioned notification tests.

0 commit comments

Comments
 (0)