Skip to content

Commit bf6a353

Browse files
committed
Add supported image formats from driver driver_info
This patch allows to read the field "supported_image_formats" from the DRIVER_INFO dict. For example you can add: DRIVER_INFO = { ... 'supported_image_formats': ['qcow2', 'raw', 'vhd'] } Signed-off-by: Guillaume <[email protected]>
1 parent a948ac9 commit bf6a353

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ def sr_get_driver_info(driver_info):
419419
for option in driver_info['configuration']:
420420
options.append({'key': option[0], 'description': option[1]})
421421
results['configuration'] = options
422+
# add supported image formats if any
423+
results["supported_image_formats"] = driver_info.get("supported_image_formats", [])
422424
return xmlrpc.client.dumps((results, ), "", True)
423425

424426

0 commit comments

Comments
 (0)