@@ -25,6 +25,14 @@ const (
2525 ManufacturerHPE Manufacturer = "HPE"
2626)
2727
28+ type SettingAttributeValueTypes string
29+
30+ const (
31+ TypeInteger SettingAttributeValueTypes = "integer"
32+ TypeString SettingAttributeValueTypes = "string"
33+ TypeEnumerations SettingAttributeValueTypes = "enumeration"
34+ )
35+
2836// BMC defines an interface for interacting with a Baseboard Management Controller.
2937type BMC interface {
3038 // PowerOn powers on the system.
@@ -98,22 +106,6 @@ type BMC interface {
98106 WaitForServerPowerState (ctx context.Context , systemUUID string , powerState redfish.PowerState ) error
99107}
100108
101- type Manufacturer string
102-
103- const (
104- ManufacturerDell Manufacturer = "Dell Inc."
105- ManufacturerLenovo Manufacturer = "Lenovo"
106- ManufacturerHPE Manufacturer = "HPE"
107- )
108-
109- type SettingAttributeValueTypes string
110-
111- const (
112- TypeInteger SettingAttributeValueTypes = "integer"
113- TypeString SettingAttributeValueTypes = "string"
114- TypeEnumerations SettingAttributeValueTypes = "enumeration"
115- )
116-
117109type OEMManagerInterface interface {
118110 GetOEMBMCSettingAttribute (attributes []string ) (redfish.SettingsAttributes , error )
119111 GetBMCPendingAttributeValues () (redfish.SettingsAttributes , error )
@@ -122,6 +114,19 @@ type OEMManagerInterface interface {
122114 UpdateBMCAttributesApplyAt (attrs redfish.SettingsAttributes , applyTime common.ApplyTime ) error
123115}
124116
117+ type OEMInterface interface {
118+ GetUpdateRequestBody (
119+ parameters * redfish.SimpleUpdateParameters ,
120+ ) * oem.SimpleUpdateRequestBody
121+ GetUpdateTaskMonitorURI (
122+ response * http.Response ,
123+ ) (string , error )
124+ GetTaskMonitorDetails (
125+ ctx context.Context ,
126+ taskMonitorResponse * http.Response ,
127+ ) (* redfish.Task , error )
128+ }
129+
125130type Entity struct {
126131 // ID uniquely identifies the resource.
127132 ID string `json:"Id"`
@@ -312,19 +317,6 @@ func NewOEMManager(ooem *redfish.Manager, service *gofish.Service) (OEMManagerIn
312317 return OEMManager , nil
313318}
314319
315- type OEMInterface interface {
316- GetUpdateRequestBody (
317- parameters * redfish.SimpleUpdateParameters ,
318- ) * oem.SimpleUpdateRequestBody
319- GetUpdateTaskMonitorURI (
320- response * http.Response ,
321- ) (string , error )
322- GetTaskMonitorDetails (
323- ctx context.Context ,
324- taskMonitorResponse * http.Response ,
325- ) (* redfish.Task , error )
326- }
327-
328320func NewOEM (manufacturer string , service * gofish.Service ) (OEMInterface , error ) {
329321 var oemintf OEMInterface
330322 switch manufacturer {
0 commit comments