Skip to content

Commit

Permalink
Handle updating video settings from libvirt configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewJohn committed May 16, 2023
1 parent 44f6a56 commit 82e0ab2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libvirt/resource_libvirt_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,16 @@ func resourceLibvirtDomainRead(ctx context.Context, d *schema.ResourceData, meta
return addrs
}

var videoConfigs []map[string]interface{}
for _, videoConfigDef := range domainDef.Devices.Videos {
VideoConfig := map[string]interface{}{
"type": videoConfigDef.Model.Type,
"vram": int(videoConfigDef.Model.VRam),
}
videoConfigs = append(videoConfigs, VideoConfig)
}
d.Set("video", videoConfigs)

var netIfaces []map[string]interface{}
for i, networkInterfaceDef := range domainDef.Devices.Interfaces {
// we need it to read old values
Expand Down

0 comments on commit 82e0ab2

Please sign in to comment.