Skip to content

Commit

Permalink
config/dell.go: Add SetSystemConfiguration to set SystemConfiguration…
Browse files Browse the repository at this point in the history
… properties
  • Loading branch information
splaspood committed Mar 20, 2024
1 parent 4503c24 commit 878882b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ type dellComponent struct {
type dellComponentAttribute struct {
XMLName xml.Name `xml:"Attribute"`
Name string `xml:"Name,attr" json:"Name"`
SetOnImport bool `json:"SetOnImport,omitempty"`
Comment string `json:"Comment,omitempty"`
SetOnImport bool `xml:"SetOnImport,omitempty" json:"SetOnImport,omitempty"`
Comment string `xml:"Comment,omitempty" json:"Comment,omitempty"`
Value string `xml:",chardata" json:"Value"`
}

Expand All @@ -56,6 +56,12 @@ func NewDellVendorConfigManager(configFormat string) (VendorConfigManager, error
return dell, nil
}

func (cm *dellVendorConfig) SetSystemConfiguration(model, servicetag, timestamp string) {
cm.ConfigData.SystemConfiguration.Model = model
cm.ConfigData.SystemConfiguration.ServiceTag = servicetag
cm.ConfigData.SystemConfiguration.TimeStamp = timestamp
}

// FindComponent locates an existing DellComponent if one exists in the ConfigData, if not
// it creates one and returns a pointer to that.
func (cm *dellVendorConfig) FindComponent(fqdd string) (c *dellComponent) {
Expand Down

0 comments on commit 878882b

Please sign in to comment.