Handle bmc option in device image upload

This update handles the new option bmc in the device image upload
command.

TEST PLAN:
PASS: Verify BMC image can be uploaded in DC system

Partial-Bug: 1951602
Depends-On: https://review.opendev.org/c/starlingx/config/+/818568

Change-Id: I4ef7e83051f1e4679f9fc9f9601a8e2a0a52ef27
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
Teresa Ho 2021-11-19 10:35:14 -05:00
parent 7398c99877
commit adac8fb6d7
2 changed files with 2 additions and 1 deletions

View File

@ -788,7 +788,7 @@ class SysinvClient(base.DriverBase):
:param: device_image_file the file to upload
:param: fields can be: 'bitstream_type', 'pci_vendor', 'pci_device',
'bitstream_id', 'key_signature', 'revoke_key_id', 'name',
'description', 'image_version', 'retimer_included', 'uuid
'description', 'image_version', 'bmc', 'retimer_included', 'uuid'
"""
return self.sysinv_client.device_image.upload(device_image_file,
**fields)

View File

@ -102,6 +102,7 @@ def determine_image_fields(image):
'name',
'description',
'image_version',
'bmc',
'retimer_included']
fields = dict((k, str(v)) for (k, v) in vars(image).items()
if k in field_list and not (v is None))