Skip to content

Commit b2bde00

Browse files
committed
api: Update OVF ToConfigSpec to handled unknown types
This patch updates the ToConfigSpec function in the `ovf` package to handle unknown resource types and subtypes. There is now a strict option that may be used to return errors on unknown types/subtypes, otherwise they are ignored. Signed-off-by: akutz <[email protected]>
1 parent a958b25 commit b2bde00

File tree

9 files changed

+1452
-495
lines changed

9 files changed

+1452
-495
lines changed

object/virtual_device_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ func (l VirtualDeviceList) FindCdrom(name string) (*types.VirtualCdrom, error) {
661661
}
662662

663663
// CreateCdrom creates a new VirtualCdrom device which can be added to a VM.
664-
func (l VirtualDeviceList) CreateCdrom(c *types.VirtualIDEController) (*types.VirtualCdrom, error) {
664+
func (l VirtualDeviceList) CreateCdrom(c types.BaseVirtualController) (*types.VirtualCdrom, error) {
665665
device := &types.VirtualCdrom{}
666666

667667
l.AssignController(device, c)

0 commit comments

Comments
 (0)