Skip to content

Commit

Permalink
Add comments explaining the redfish SetVirtualMedia method
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Feb 9, 2023
1 parent ea2f334 commit aa00636
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/redfishwrapper/virtual_media.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
rf "github.com/stmcginnis/gofish/redfish"
)

// Set the boot device for the system.
// Set the virtual media attached to the system, or just eject everything if mediaURL is empty.
func (c *Client) SetVirtualMedia(ctx context.Context, kind string, mediaURL string) (ok bool, err error) {
managers, err := c.Managers(ctx)
if err != nil {
Expand Down Expand Up @@ -44,6 +44,8 @@ func (c *Client) SetVirtualMedia(ctx context.Context, kind string, mediaURL stri
}
}

// An empty mediaURL means eject everything, so if that's the case we're done. Otherwise, we
// need to insert the media.
if mediaURL != "" {
setMedia := false
for _, manager := range managers {
Expand Down

0 comments on commit aa00636

Please sign in to comment.