Documentation ¶
Overview ¶
Package mgrmodel ....
Index ¶
- func AddManagertoDB(mgr RAManager) error
- func AddTempPassword(uuid string, device *DeviceTarget) *errors.Error
- func DeleteTempPassword(deviceUUID string) *errors.Error
- func GenericSave(body []byte, table string, key string) error
- func GetAllKeysFromTable(table string) ([]string, error)
- func GetManagerByURL(url string) (string, *errors.Error)
- func GetResource(Table, key string) (string, *errors.Error)
- func GetSystemByUUID(systemUUID string) (string, *errors.Error)
- func UpdateData(key string, updateData map[string]interface{}, table string) error
- func UpdateSystem(deviceUUID string, device *DeviceTarget) *errors.Error
- type Actions
- type CommandShell
- type CreateBMCAccount
- type DeviceTarget
- type GraphicalConsole
- type Links
- type Manager
- type OdataID
- type Plugin
- type RAManager
- type Status
- type Target
- type UpdateBMCAccount
- type VirtualMediaInsert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddManagertoDB ¶
AddManagertoDB will add odimra Manager details to DB
func AddTempPassword ¶
func AddTempPassword(uuid string, device *DeviceTarget) *errors.Error
UpdateSystem fetches the System(Target Device Credentials) table details
func DeleteTempPassword ¶
func GenericSave ¶
GenericSave will save any resource data into the database
func GetAllKeysFromTable ¶
GetAllKeysFromTable fetches all keys in a given table
func GetManagerByURL ¶
GetManagerByURL fetches computer manager details by URL from database
func GetResource ¶
GetResource fetches a resource from database using table and key
func GetSystemByUUID ¶
GetSystemByUUID fetches computer system details by UUID from database
func UpdateData ¶
UpdateData will modify the current details to given changes
func UpdateSystem ¶
func UpdateSystem(deviceUUID string, device *DeviceTarget) *errors.Error
UpdateSystem fetches the System(Target Device Credentials) table details
Types ¶
type Actions ¶
type Actions struct {
Reset Target `json:"#Manager.Reset"`
}
Actions struct for Actions to perform
type CommandShell ¶
type CommandShell struct { ConnectTypesSupported []string `json:"ConnectTypesSupported"` MaxConcurrentSessions int `json:"MaxConcurrentSessions"` ServiceEnabled bool `json:"ServiceEnabled"` }
CommandShell service that manager provides.
type CreateBMCAccount ¶
type CreateBMCAccount struct { UserName string `json:"UserName" validate:"required"` Password string `json:"Password" validate:"required"` RoleID string `json:"RoleId" validate:"required"` }
CreateBMCAccount struct is to store the create BMC account request payload
type DeviceTarget ¶
type DeviceTarget struct { ManagerAddress string `json:"ManagerAddress"` Password []byte `json:"Password"` UserName string `json:"UserName"` PostBody []byte `json:"PostBody"` DeviceUUID string `json:"DeviceUUID"` PluginID string `json:"PluginID"` }
DeviceTarget is for sending the requst to south bound/plugin
func GetTarget ¶
func GetTarget(deviceUUID string) (*DeviceTarget, *errors.Error)
GetTarget fetches the System(Target Device Credentials) table details
func GetTempPassword ¶
func GetTempPassword(deviceUUID string) (*DeviceTarget, *errors.Error)
type GraphicalConsole ¶
type GraphicalConsole struct { ConnectTypesSupported []string `json:"ConnectTypesSupported"` MaxConcurrentSessions int `json:"MaxConcurrentSessions"` ServiceEnabled bool `json:"ServiceEnabled"` }
GraphicalConsole is the information about the graphical console (KVM-IP)service of the manager.
type Links ¶
type Links struct { ActiveSoftwareImage *dmtf.Link `json:"ActiveSoftwareImage,omitempty"` ManagerForChassis []*dmtf.Link `json:"ManagerForChassis,omitempty"` ManagerForServers []*dmtf.Link `json:"ManagerForServers,omitempty"` ManagerForSwitches []*dmtf.Link `json:"ManagerForSwitches,omitempty"` ManagerForManagers []*dmtf.Link `json:"ManagerForManagers,omitempty"` ManagerInChassis *dmtf.Link `json:"ManagerInChassis,omitempty"` }
Links to other Resources that are related to this Resource.
type Manager ¶
type Manager struct { OdataContext string `json:"@odata.context"` Etag string `json:"@odata.etag,omitempty"` OdataID string `json:"@odata.id"` OdataType string `json:"@odata.type"` Name string `json:"Name"` ManagerType string `json:"ManagerType"` ID string `json:"Id"` UUID string `json:"UUID"` FirmwareVersion string `json:"FirmwareVersion"` Status *Status `json:"Status,omitempty"` HostInterfaces *OdataID `json:"HostInterfaces,omitempty"` SerialInterfaces *OdataID `json:"SerialInterfaces,omitempty"` EthernetInterfaces *OdataID `json:"EthernetInterfaces,omitempty"` LogServices *dmtf.Link `json:"LogServices,omitempty"` NetworkProtocol *OdataID `json:"NetworkProtocol,omitempty"` VirtualMedia *OdataID `json:"VirtualMedia,omitempty"` CommandShell *CommandShell `json:"CommandShell,omitempty"` GraphicalConsole *GraphicalConsole `json:"GraphicalConsole,omitempty"` Links *Links `json:"Links,omitempty"` Actions *Actions `json:"Actions,omitempty"` AutoDSTEnabled bool `json:"AutoDSTEnabled,omitempty"` DateTime string `json:"DateTime,omitempty"` LastResetTime string `json:"LastResetTime,omitempty"` Manufacturer string `json:"Manufacturer,omitempty"` Model string `json:"Model,omitempty"` PartNumber string `json:"PartNumber,omitempty"` PowerState string `json:"PowerState,omitempty"` Redundancy []dmtf.Redundancy `json:"Redundancy,omitempty"` RemoteAccountService *dmtf.Link `json:"RemoteAccountService,omitempty"` RemoteRedfishServiceURI string `json:"RemoteRedfishServiceUri,omitempty"` SerialNumber string `json:"SerialNumber,omitempty"` ServiceEntryPointUUID string `json:"ServiceEntryPointUUID,omitempty"` TimeZoneName string `json:"TimeZoneName,omitempty"` Measurements []*dmtf.Link `json:"Measurements,omitempty"` Location *dmtf.Link `json:"Location,omitempty"` LocationIndicatorActive bool `json:"LocationIndicatorActive,omitempty"` RedundancyCount int `json:"Redundancy@odata.count,omitempty"` SerialConsole dmtf.SerialConsole `json:"SerialConsole,omitempty"` SparePartNumber string `json:"SparePartNumber,omitempty"` Description string `json:"Description,omitempty"` DateTimeLocalOffset string `json:"DateTimeLocalOffset,omitempty"` }
Manager struct for manager deta
type Plugin ¶
type Plugin struct { IP string Port string Username string Password []byte ID string PluginType string PreferredAuthType string }
Plugin is the model for plugin information
type RAManager ¶
type RAManager struct { ID string `json:"ManagerID"` Name string `json:"Name"` ManagerType string `json:"ManagerType"` FirmwareVersion string `json:"FirmwareVersion"` UUID string `json:"UUID"` State string `json:"State"` Description string `json:"Description"` LogServices *dmtf.Link `json:"LogServices"` Links *Links `json:"Links,omitempty"` Health string `json:"Health"` Model string `json:"Model"` PowerState string `json:"PowerState"` }
RAManager struct is to store odimra details into DB
type UpdateBMCAccount ¶
type UpdateBMCAccount struct { Password string `json:"Password,omitempty"` RoleID string `json:"RoleId,omitempty"` }
UpdateBMCAccount struct is to store the update BMC account request payload
type VirtualMediaInsert ¶
type VirtualMediaInsert struct { Image string `json:"Image" validate:"required"` Inserted bool `json:"Inserted"` WriteProtected bool `json:"WriteProtected"` Password string `json:"Password,omitempty"` TransferMethod string `json:"TransferMethod,omitempty"` TransferProtocolType string `json:"TransferProtocolType,omitempty"` UserName string `json:"UserName,omitempty"` }
VirtualMediaInsert struct is to store the insert virtual media request payload