Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS-1729; Add BiosConfigURL #104

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions condition/bios_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package condition

import (
"encoding/json"
"net/url"

"github.com/google/uuid"
)
Expand Down Expand Up @@ -32,6 +33,12 @@ type BiosControlTaskParameters struct {
//
// Required: true
Action BiosControlAction `json:"action"`

// The URL for the bios configuration settings file.
// Needed for BiosControlAction.SetConfig
//
// Required: false
BiosConfigURL *url.URL `json:"bios_config_url,omitempty"`
}

func (p *BiosControlTaskParameters) Unmarshal(r json.RawMessage) error {
Expand All @@ -50,10 +57,11 @@ func (p *BiosControlTaskParameters) MustJSON() []byte {
return byt
}

func NewBiosControlTaskParameters(assetID uuid.UUID, action BiosControlAction) *BiosControlTaskParameters {
func NewBiosControlTaskParameters(assetID uuid.UUID, action BiosControlAction, configURL *url.URL) *BiosControlTaskParameters {
return &BiosControlTaskParameters{
AssetID: assetID,
Action: action,
AssetID: assetID,
Action: action,
BiosConfigURL: configURL,
}
}

Expand Down
Loading