Documentation
¶
Index ¶
- Constants
- func CollectCollection(get func(string), links []string)
- func CollectList(get func(string), c Client, link string) error
- func ConstructError(statusCode int, b []byte) error
- func GetCollectionObjects[T any, PT interface{ ... }](c Client, uri string) ([]*T, error)
- func GetObject[T any, PT interface{ ... }](c Client, uri string) (*T, error)
- func GetObjects[T any, PT interface{ ... }](c Client, uris []string) ([]*T, error)
- type ActionTarget
- type ApplyTime
- type Client
- type Collection
- type CollectionError
- type ContactInfo
- type DayOfWeek
- type DurableNameFormat
- type ElectricalContext
- type Entity
- func (e *Entity) DisableEtagMatch(b bool)
- func (e *Entity) Get(c Client, uri string, payload interface{}) error
- func (e *Entity) GetClient() Client
- func (e *Entity) Patch(uri string, payload interface{}) error
- func (e *Entity) Post(uri string, payload interface{}) error
- func (e *Entity) PostWithResponse(uri string, payload interface{}) (*http.Response, error)
- func (e *Entity) SetClient(c Client)
- func (e *Entity) SetETag(tag string)
- func (e *Entity) StripEtagQuotes(b bool)
- func (e *Entity) Update(originalEntity, updatedEntity reflect.Value, allowedUpdates []string) error
- type ErrExtendedInfo
- type Error
- type Filter
- type FilterOption
- type Health
- type Identifier
- type IndicatorLED
- type Link
- type Links
- type LinksCollection
- type Location
- type LocationType
- type MaintenanceWindow
- type Message
- type MonthOfYear
- type OperationApplyTime
- type OperationApplyTimeSupport
- type Operations
- type Orientation
- type PartLocation
- type PhysicalContext
- type PhysicalSubContext
- type Placement
- type PostalAddress
- type PreferredApplyTime
- type Protocol
- type RackUnits
- type Reference
- type ReferenceableMember
- type Resource
- type ResourceCollection
- type Schedule
- type SchemaObject
- type Settings
- type State
- type Status
- type TestAPICall
- type TestClient
- func (c *TestClient) CapturedCalls() []TestAPICall
- func (c *TestClient) Delete(url string) (*http.Response, error)
- func (c *TestClient) DeleteWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) Get(url string) (*http.Response, error)
- func (c *TestClient) GetWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) Patch(url string, payload interface{}) (*http.Response, error)
- func (c *TestClient) PatchWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) Post(url string, payload interface{}) (*http.Response, error)
- func (c *TestClient) PostMultipart(url string, payload map[string]io.Reader) (*http.Response, error)
- func (c *TestClient) PostMultipartWithHeaders(url string, payload map[string]io.Reader, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) PostWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) Put(url string, payload interface{}) (*http.Response, error)
- func (c *TestClient) PutWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
- func (c *TestClient) Reset()
Constants ¶
const DefaultServiceRoot = "/redfish/v1/"
DefaultServiceRoot is the default path to the Redfish service endpoint.
Variables ¶
This section is empty.
Functions ¶
func CollectCollection ¶ added in v0.14.0
CollectCollection will retrieve a collection of entitied from the Redfish service when you already have the set of individual links in the collection.
func CollectList ¶ added in v0.14.0
CollectList will retrieve a collection of entities from the Redfish service.
func ConstructError ¶ added in v0.6.0
ConstructError tries to create error if body is defined as redfish spec
func GetCollectionObjects ¶ added in v0.19.0
func GetCollectionObjects[T any, PT interface { *T SchemaObject }](c Client, uri string) ([]*T, error)
func GetObject ¶ added in v0.19.0
func GetObject[T any, PT interface { *T SchemaObject }](c Client, uri string) (*T, error)
GetObject retrieves an API object from the service.
func GetObjects ¶ added in v0.19.0
func GetObjects[T any, PT interface { *T SchemaObject }](c Client, uris []string) ([]*T, error)
GetObject retrieves an API object from the service.
Types ¶
type ActionTarget ¶ added in v0.16.0
type ActionTarget struct {
Target string
}
ActionTarget is contains the target endpoint for object Actions.
type ApplyTime ¶
type ApplyTime string
ApplyTime is when to apply a change.
const ( // ImmediateApplyTime shall be used to indicate the values within the // Settings resource are applied immediately. ImmediateApplyTime ApplyTime = "Immediate" // OnResetApplyTime shall be used to indicate the values within the // Settings resource are applied when the system or service is reset. OnResetApplyTime ApplyTime = "OnReset" // AtMaintenanceWindowStartApplyTime shall be used to indicate the values // within the Settings resource are applied during the maintenance window // specified by the MaintenanceWindowStartTime and // MaintenanceWindowDurationInSeconds properties. A service may perform // resets during this maintenance window. AtMaintenanceWindowStartApplyTime ApplyTime = "AtMaintenanceWindowStart" // InMaintenanceWindowOnResetApplyTime shall be used to indicate the // values within the Settings resource are applied during the maintenance // window specified by the MaintenanceWindowStartTime and // MaintenanceWindowDurationInSeconds properties, and if a reset occurs // within the maintenance window. InMaintenanceWindowOnResetApplyTime ApplyTime = "InMaintenanceWindowOnReset" )
type Client ¶
type Client interface {
Get(url string) (*http.Response, error)
GetWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
Post(url string, payload interface{}) (*http.Response, error)
PostWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
PostMultipart(url string, payload map[string]io.Reader) (*http.Response, error)
PostMultipartWithHeaders(url string, payload map[string]io.Reader, customHeaders map[string]string) (*http.Response, error)
Patch(url string, payload interface{}) (*http.Response, error)
PatchWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
Put(url string, payload interface{}) (*http.Response, error)
PutWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
Delete(url string) (*http.Response, error)
DeleteWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
}
Client is a connection to a Redfish service.
type Collection ¶
type Collection struct {
Name string `json:"Name"`
ItemLinks []string
MembersNextLink string `json:"Members@odata.nextLink,omitempty"`
}
Collection represents a collection of entity references.
func GetCollection ¶
func GetCollection(c Client, uri string) (*Collection, error)
GetCollection retrieves a collection from the service.
func (*Collection) UnmarshalJSON ¶
func (c *Collection) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a collection from the raw JSON.
type CollectionError ¶ added in v0.11.0
CollectionError is used for collecting errors when working with collections
func NewCollectionError ¶ added in v0.11.0
func NewCollectionError() *CollectionError
NewCollectionError gets you a new *CollectionError it's useful for collecting and formatting errors that occur when fetching a collection
func (*CollectionError) Empty ¶ added in v0.11.0
func (cr *CollectionError) Empty() bool
func (*CollectionError) Error ¶ added in v0.11.0
func (cr *CollectionError) Error() string
type ContactInfo ¶
type ContactInfo struct {
// ContactName shall contain the name of a person or
// organization to contact for information about this resource.
ContactName string
// EmailAddress shall contain the email address for a person
// or organization to contact for information about this resource.
EmailAddress string
// PhoneNumber shall contain the phone number for a person
// or organization to contact for information about this resource.
PhoneNumber string
}
ContactInfo is used to obtain more information from an individual or organization responsible for this resource.
type DayOfWeek ¶
type DayOfWeek string
DayOfWeek is Days of the Week.
const ( // MondayDayOfWeek Monday. MondayDayOfWeek DayOfWeek = "Monday" // TuesdayDayOfWeek Tuesday. TuesdayDayOfWeek DayOfWeek = "Tuesday" // WednesdayDayOfWeek Wednesday. WednesdayDayOfWeek DayOfWeek = "Wednesday" // ThursdayDayOfWeek Thursday. ThursdayDayOfWeek DayOfWeek = "Thursday" // FridayDayOfWeek Friday. FridayDayOfWeek DayOfWeek = "Friday" // SaturdayDayOfWeek Saturday. SaturdayDayOfWeek DayOfWeek = "Saturday" // SundayDayOfWeek Sunday. SundayDayOfWeek DayOfWeek = "Sunday" // EveryDayOfWeek shall be the only member in the array. EveryDayOfWeek DayOfWeek = "Every" )
type DurableNameFormat ¶
type DurableNameFormat string
DurableNameFormat indicates the type of durable name.
const ( // NAADurableNameFormat shall be a hexadecimal representation of the Name Address // Authority structure as defined in the T11 Fibre Channel - Framing and Signaling // - 3 (FC-FS-3) specification. NAADurableNameFormat DurableNameFormat = "NAA" // IQNDurableNameFormat shall be in the iSCSI Qualified Name format as defined // in RFC 3720 and RFC 3721. IQNDurableNameFormat DurableNameFormat = "iQN" // FCWWNDurableNameFormat shall be a hexadecimal representation of the World // Wide Name format as defined in the T11 Fibre Channel Physical and Signaling // Interface Specification. FCWWNDurableNameFormat DurableNameFormat = "FC_WWN" // UUIDDurableNameFormat shall be the hexadecimal representation of the Universal // Unique Identifier as defined in the International Telecom Union's OSI networking // and system aspects - Naming, Addressing and Registration Specification. UUIDDurableNameFormat DurableNameFormat = "UUID" // EUIDurableNameFormat shall be the hexadecimal representation of the IEEE-defined // 64-bit Extended Unique Identifier as defined in the IEEE's Guidelines for // 64-bit Global Identifier (EUI-64) Specification. EUIDurableNameFormat DurableNameFormat = "EUI" // NQNDurableNameFormat shall be in the NVMe Qualified Name format as defined // in the NVN Express over Fabric Specification. NQNDurableNameFormat DurableNameFormat = "NQN" // NSIDDurableNameFormat shall be in the NVM Namespace Identifier format as // defined in the NVN Express Specification. NSIDDurableNameFormat DurableNameFormat = "NSID" )
type ElectricalContext ¶ added in v0.15.0
type ElectricalContext string
ElectricalContext is the combination of current-carrying conductors.
const ( // The circuits that share the L1 current-carrying conductor. Line1ElectricalContext ElectricalContext = "Line1" // The circuit formed by L1 and L2 current-carrying conductors. Line1ToLine2ElectricalContext ElectricalContext = "Line1ToLine2" // The circuit formed by L1 and neutral current-carrying conductors. Line1ToNeutralElectricalContext ElectricalContext = "Line1ToNeutral" // The circuit formed by L1, L2, and neutral current-carrying conductors. Line1ToNeutralAndL1L2ElectricalContext ElectricalContext = "Line1ToNeutralAndL1L2" // The circuits that share the L2 current-carrying conductor. Line2ElectricalContext ElectricalContext = "Line2" // The circuit formed by L2 and L3 current-carrying conductors. Line2ToLine3ElectricalContext ElectricalContext = "Line2ToLine3" // The circuit formed by L2 and neutral current-carrying conductors. Line2ToNeutralElectricalContext ElectricalContext = "Line2ToNeutral" // The circuit formed by L1, L2, and Neutral current-carrying conductors. Line2ToNeutralAndL1L2ElectricalContext ElectricalContext = "Line2ToNeutralAndL1L2" // The circuits formed by L2, L3, and neutral current-carrying conductors. Line2ToNeutralAndL2L3ElectricalContext ElectricalContext = "Line2ToNeutralAndL2L3" // The circuits that share the L3 current-carrying conductor. Line3ElectricalContext ElectricalContext = "Line3" // The circuit formed by L3 and L1 current-carrying conductors. Line3ToLine1ElectricalContext ElectricalContext = "Line3ToLine1" // The circuit formed by L3 and neutral current-carrying conductors. Line3ToNeutralElectricalContext ElectricalContext = "Line3ToNeutral" // The circuit formed by L3, L1, and neutral current-carrying conductors. Line3ToNeutralAndL3L1ElectricalContext ElectricalContext = "Line3ToNeutralAndL3L1" // The circuit formed by two current-carrying conductors. LineToLineElectricalContext ElectricalContext = "LineToLine" // The circuit formed by a line and neutral current-carrying conductor. LineToNeutralElectricalContext ElectricalContext = "LineToNeutral" // The grounded current-carrying return circuit of current-carrying conductors. NeutralElectricalContext ElectricalContext = "Neutral" // The circuit formed by all current-carrying conductors. TotalElectricalContext ElectricalContext = "Total" )
type Entity ¶
type Entity struct {
// ODataID is the location of the resource.
ODataID string `json:"@odata.id"`
// ID uniquely identifies the resource.
ID string `json:"Id"`
// Name is the name of the resource or array element.
Name string `json:"Name"`
// contains filtered or unexported fields
}
Entity provides the common basis for all Redfish and Swordfish objects.
func (*Entity) DisableEtagMatch ¶ added in v0.15.0
Disable Etag Match header from being sent by the client.
func (*Entity) Get ¶ added in v0.14.0
Get performs a Get request against the Redfish service and save etag
func (*Entity) GetClient ¶ added in v0.15.0
GetClient get the API client connection to use for accessing this entity.
func (*Entity) Patch ¶ added in v0.14.0
Patch performs a Patch request against the Redfish service with etag
func (*Entity) Post ¶ added in v0.14.0
Post performs a Post request against the Redfish service with etag
func (*Entity) PostWithResponse ¶ added in v0.16.0
PostWithResponse performs a Post request against the Redfish service with etag, returning the response from the service. Callers should make sure to call `resp.Body.Close()` when done with the response.
func (*Entity) SetClient ¶
SetClient sets the API client connection to use for accessing this entity.
func (*Entity) StripEtagQuotes ¶ added in v0.15.0
Set stripEtagQuotes to enable/disable strupping etag quotes
type ErrExtendedInfo ¶ added in v0.6.0
type ErrExtendedInfo struct {
// Indicating a specific error or message (not to be confused with the HTTP status code).
// This code can be used to access a detailed message from a message registry.
MessageID string `json:"MessageId"`
// A human readable error message indicating the semantics associated with the error.
// This shall be the complete message, and not rely on substitution variables.
Message string
// An optional array of strings representing the substitution parameter values for the message.
// This shall be included in the response if a MessageId is specified for a parameterized message.
MessageArgs []string
// An optional string representing the severity of the error.
Severity string
// An optional string describing recommended action(s) to take to resolve the error.
Resolution string
}
ErrExtendedInfo is for redfish ExtendedInfo error response TODO: support RelatedProperties
type Error ¶ added in v0.6.0
type Error struct {
// An integer that represents the status code returned by the API
HTTPReturnedStatusCode int `json:"-"`
// A string indicating a specific MessageId from the message registry.
Code string `json:"code"`
// A human readable error message corresponding to the message in the message registry.
Message string `json:"message"`
// An array of message objects describing one or more error message(s).
ExtendedInfos []ErrExtendedInfo `json:"@Message.ExtendedInfo"`
// contains filtered or unexported fields
}
Error is redfish error response object for HTTP status codes different from 200, 201 and 204
type Filter ¶ added in v0.15.0
type Filter string
func (*Filter) ClearFilter ¶ added in v0.15.0
func (e *Filter) ClearFilter()
func (*Filter) SetFilter ¶ added in v0.15.0
func (e *Filter) SetFilter(opts ...FilterOption)
type FilterOption ¶ added in v0.15.0
type FilterOption func(*Filter)
func WithSkip ¶ added in v0.15.0
func WithSkip(skipNum int) FilterOption
func WithTop ¶ added in v0.15.0
func WithTop(topNum int) FilterOption
type Health ¶
type Health string
Health indicates the health of a resource.
const ( // OKHealth indicates the health is normal. OKHealth Health = "OK" // WarningHealth indicates a condition exists that requires attention. WarningHealth Health = "Warning" // CriticalHealth indicates a critical condition exists that requires // immediate attention. CriticalHealth Health = "Critical" )
type Identifier ¶
type Identifier struct {
// DurableName indicates the world wide, persistent name of the resource.
DurableName string
// DurableNameFormat
DurableNameFormat DurableNameFormat
}
Identifier shall contain any additional identifiers of a resource.
type IndicatorLED ¶
type IndicatorLED string
IndicatorLED represents LED indicator states
const ( // UnknownIndicatorLED indicates the state of the Indicator LED cannot be // determined. UnknownIndicatorLED IndicatorLED = "Unknown" // LitIndicatorLED indicates the Indicator LED is lit. LitIndicatorLED IndicatorLED = "Lit" // BlinkingIndicatorLED indicates the Indicator LED is blinking. BlinkingIndicatorLED IndicatorLED = "Blinking" // OffIndicatorLED indicates the Indicator LED is off. OffIndicatorLED IndicatorLED = "Off" )
type Link ¶
type Link string
Link is an OData link reference
func (*Link) UnmarshalJSON ¶
UnmarshalJSON unmarshals a Link
type LinksCollection ¶
type LinksCollection struct {
ODataCount int `json:"@odata.count"`
Count int `json:"Members@odata.count"`
Members Links `json:"Members"`
}
LinksCollection contains links to other entities
func (LinksCollection) ToStrings ¶
func (l LinksCollection) ToStrings() []string
ToStrings will extract the URI for all linked entities.
type Location ¶
type Location struct {
// AltitudeMeters is the altitude of the resource in meters.
AltitudeMeters int
// Contacts is used to obtain more information from an individual or
// organization responsible for this resource.
Contacts []ContactInfo
// Info shall represent the location of the resource.
Info string
// InfoFormat shall represent the format of the Info property.
InfoFormat string
// Latitude shall be the latitude of the resource specified
// in degrees using a decimal format and not minutes or seconds.
Latitude float32
// Longitude shall be the longitude of the resource specified in degrees
// using a decimal format and not minutes or seconds.
Longitude float32
// PartLocation is used to indicate the location within the Placement.
PartLocation PartLocation
// Placement shall be a place within the addressed location.
Placement Placement
// PostalAddress shall be a postal address of the resource.
PostalAddress PostalAddress
}
Location shall describe the location of a resource.
type LocationType ¶
type LocationType string
LocationType shall name the type of location in use.
const ( // SlotLocationType shall be used to indicate the type of PartLocation is // of type slot. SlotLocationType LocationType = "Slot" // BayLocationType shall be used to indicate the type of PartLocation is // of type bay. BayLocationType LocationType = "Bay" // ConnectorLocationType shall be used to indicate the type of // PartLocation is of type connector. ConnectorLocationType LocationType = "Connector" // SocketLocationType shall be used to indicate the type of PartLocation // is of type socket. SocketLocationType LocationType = "Socket" )
type MaintenanceWindow ¶
type MaintenanceWindow struct {
// MaintenanceWindowDurationInSeconds shall
// indicate the end of the maintenance window as the number of seconds
// after the time specified by the MaintenanceWindowStartTime property.
MaintenanceWindowDurationInSeconds int
// MaintenanceWindowStartTime shall
// indicate the date and time as to when the service is allowed to start
// applying the requested settings or operation as part of a maintenance
// window.
MaintenanceWindowStartTime string
}
MaintenanceWindow shall indicate if a given resource has a maintenance window assignment for applying settings or operations. Other resources may reference this object in order to convey a common control surface for the configuration of the maintenance window.
type Message ¶
type Message struct {
Entity
// Message shall contain an optional human readable message.
Message string
// MessageArgs shall contain the message substitution
// arguments for the specific message referenced by the MessageID and
// shall only be included if the MessageID is present. Number and
// integer type arguments shall be converted to strings.
MessageArgs []string
// MessageID shall be a key into message registry as described in the
// Redfish specification.
MessageID string `json:"MessageId"`
// RelatedProperties shall contain an array of JSON
// Pointers indicating the properties described by the message, if
// appropriate for the message.
RelatedProperties []string
// Resolution shall contain an override of the
// Resolution of the message in message registry, if present.
Resolution string
// Severity is The value of this property shall be the severity of the
// error, as defined in the Status section of the Redfish specification.
Severity string
}
Message is This type shall define a Message as described in the Redfish specification.
func GetMessage ¶
GetMessage will get a Message instance from the service.
type MonthOfYear ¶
type MonthOfYear string
MonthOfYear is Months of the year.
const ( // JanuaryMonthOfYear January. JanuaryMonthOfYear MonthOfYear = "January" // FebruaryMonthOfYear February. FebruaryMonthOfYear MonthOfYear = "February" // MarchMonthOfYear March. MarchMonthOfYear MonthOfYear = "March" // AprilMonthOfYear April. AprilMonthOfYear MonthOfYear = "April" // MayMonthOfYear May. MayMonthOfYear MonthOfYear = "May" // JuneMonthOfYear June. JuneMonthOfYear MonthOfYear = "June" // JulyMonthOfYear July. JulyMonthOfYear MonthOfYear = "July" // AugustMonthOfYear August. AugustMonthOfYear MonthOfYear = "August" // SeptemberMonthOfYear September. SeptemberMonthOfYear MonthOfYear = "September" // OctoberMonthOfYear October. OctoberMonthOfYear MonthOfYear = "October" // NovemberMonthOfYear November. NovemberMonthOfYear MonthOfYear = "November" // DecemberMonthOfYear December. DecemberMonthOfYear MonthOfYear = "December" // EveryMonthOfYear shall be the only member in the array. EveryMonthOfYear MonthOfYear = "Every" )
type OperationApplyTime ¶
type OperationApplyTime string
OperationApplyTime is when to perform the application.
const ( // ImmediateOperationApplyTime shall be used to indicate the requested // Create, Delete, or Action operation is applied immediately. ImmediateOperationApplyTime OperationApplyTime = "Immediate" // OnResetOperationApplyTime shall be used to indicate the requested // Create, Delete, or Action operation is applied when the system or // service is reset. OnResetOperationApplyTime OperationApplyTime = "OnReset" // AtMaintenanceWindowStartOperationApplyTime shall be used to indicate // the requested Create, Delete, or Action operation is applied during // the maintenance window specified by the MaintenanceWindowStartTime and // MaintenanceWindowDurationInSeconds properties. A service may perform // resets during this maintenance window. AtMaintenanceWindowStartOperationApplyTime OperationApplyTime = "AtMaintenanceWindowStart" // InMaintenanceWindowOnResetOperationApplyTime shall be used to indicate // the requested Create, Delete, or Action operation is applied during // the maintenance window specified by the MaintenanceWindowStartTime and // MaintenanceWindowDurationInSeconds properties, and if a reset occurs // within the maintenance window. InMaintenanceWindowOnResetOperationApplyTime OperationApplyTime = "InMaintenanceWindowOnReset" )
type OperationApplyTimeSupport ¶
type OperationApplyTimeSupport struct {
// MaintenanceWindowDurationInSeconds shall
// be the same as the MaintenanceWindowDurationInSeconds property found
// in the MaintenanceWindow structure on the MaintenanceWindowResource.
// This property shall be required if the SupportedValues property
// contains AtMaintenanceWindowStart or InMaintenanceWindowOnReset.
MaintenanceWindowDurationInSeconds int
// MaintenanceWindowResource shall be a
// reference to a resource that contains the @Redfish.MaintenanceWindow
// property which governs this resource. This property shall be required
// if the SupportedValues property contains AtMaintenanceWindowStart or
// InMaintenanceWindowOnReset.
MaintenanceWindowResource string
// MaintenanceWindowStartTime shall be the
// same as the MaintenanceWindowStartTime property found in the
// MaintenanceWindow structure on the MaintenanceWindowResource. This
// property shall be required if the SupportedValues property contains
// AtMaintenanceWindowStart or InMaintenanceWindowOnReset.
MaintenanceWindowStartTime string
// SupportedValues shall indicate the types
// of apply times the client is allowed request when performing a Create,
// Delete, or Action operation.
SupportedValues []OperationApplyTime
}
OperationApplyTimeSupport shall specify the support a service has for a client to request a specific apply time of a Create, Delete, or Action operation of a given resource.
type Operations ¶
type Operations struct {
// AssociatedTask shall be a reference to a resource of type Task that
// represents the task associated with the operation.
AssociatedTask string
// OperationName shall be a string of the name of the operation.
OperationName string
// PercentageComplete shall be an integer of the percentage of the
// operation that has been completed.
PercentageComplete int
}
Operations shall describe a currently running operation on the resource.
type Orientation ¶
type Orientation string
Orientation shall name the orientation for the location type ordering in determining the LocationOrdinalValue.
const ( // FrontToBackOrientation shall be used to specify the ordering for // LocationOrdinalValue is front to back. FrontToBackOrientation Orientation = "FrontToBack" // BackToFrontOrientation shall be used to specify the ordering for // LocationOrdinalValue is back to front. BackToFrontOrientation Orientation = "BackToFront" // TopToBottomOrientation shall be used to specify the ordering for // LocationOrdinalValue is top to bottom. TopToBottomOrientation Orientation = "TopToBottom" // BottomToTopOrientation shall be used to specify the ordering for // LocationOrdinalValue is bottom to top. BottomToTopOrientation Orientation = "BottomToTop" // LeftToRightOrientation shall be used to specify the ordering for // LocationOrdinalValue is left to right. LeftToRightOrientation Orientation = "LeftToRight" // RightToLeftOrientation shall be used to specify the ordering for // LocationOrdinalValue is right to left. RightToLeftOrientation Orientation = "RightToLeft" )
type PartLocation ¶
type PartLocation struct {
// LocationOrdinalValue shall be the number that represents the location of
// the part based on the LocationType. LocationOrdinalValue shall be
// measured based on the Orientation value starting with 0.
LocationOrdinalValue int
// LocationType shall be a LocationType enumeration literal indicating the
// type of rack units in use.
LocationType LocationType
// Orientation is used by the LocationOrdinalValue property.
Orientation Orientation
// Reference shall be a Reference enumeration literal indicating the general
// location within the unit of the part.
Reference Reference
// ServiceLabel shall be the label assigned for service at the part location.
ServiceLabel string
}
PartLocation is used to indicate the location within the Placement.
type PhysicalContext ¶
type PhysicalContext string
PhysicalContext is the physical location.
const ( // RoomPhysicalContext The room. RoomPhysicalContext PhysicalContext = "Room" // IntakePhysicalContext The air intake point(s) or region of the chassis. IntakePhysicalContext PhysicalContext = "Intake" // ExhaustPhysicalContext The air exhaust point(s) or region of the chassis. ExhaustPhysicalContext PhysicalContext = "Exhaust" // LiquidInletPhysicalContext The liquid inlet point of the chassis. LiquidInletPhysicalContext PhysicalContext = "LiquidInlet" // LiquidOutletPhysicalContext The liquid outlet point of the chassis. LiquidOutletPhysicalContext PhysicalContext = "LiquidOutlet" // FrontPhysicalContext The front of the chassis. FrontPhysicalContext PhysicalContext = "Front" // BackPhysicalContext The back of the chassis. BackPhysicalContext PhysicalContext = "Back" // UpperPhysicalContext The upper portion of the chassis. UpperPhysicalContext PhysicalContext = "Upper" // LowerPhysicalContext The lower portion of the chassis. LowerPhysicalContext PhysicalContext = "Lower" // CPUPhysicalContext A Processor (CPU). CPUPhysicalContext PhysicalContext = "CPU" // CPUSubsystemPhysicalContext The entire Processor (CPU) subsystem. CPUSubsystemPhysicalContext PhysicalContext = "CPUSubsystem" // GPUPhysicalContext A Graphics Processor (GPU). GPUPhysicalContext PhysicalContext = "GPU" // GPUSubsystemPhysicalContext The entire Graphics Processor (GPU) // subsystem. GPUSubsystemPhysicalContext PhysicalContext = "GPUSubsystem" // FPGAPhysicalContext A Field Programmable Gate Array (FPGA). FPGAPhysicalContext PhysicalContext = "FPGA" // AcceleratorPhysicalContext An Accelerator. AcceleratorPhysicalContext PhysicalContext = "Accelerator" // ASICPhysicalContext An ASIC device, such as networking chip or a chipset // component. ASICPhysicalContext PhysicalContext = "ASIC" // BackplanePhysicalContext A backplane within the chassis. BackplanePhysicalContext PhysicalContext = "Backplane" // SystemBoardPhysicalContext The system board (PCB). SystemBoardPhysicalContext PhysicalContext = "SystemBoard" // PowerSupplyPhysicalContext A power supply. PowerSupplyPhysicalContext PhysicalContext = "PowerSupply" // PowerSubsystemPhysicalContext The entire power subsystem. PowerSubsystemPhysicalContext PhysicalContext = "PowerSubsystem" // VoltageRegulatorPhysicalContext A voltage regulator device. VoltageRegulatorPhysicalContext PhysicalContext = "VoltageRegulator" // RectifierPhysicalContext A rectifier device. RectifierPhysicalContext PhysicalContext = "Rectifier" // StorageDevicePhysicalContext A storage device. StorageDevicePhysicalContext PhysicalContext = "StorageDevice" // NetworkingDevicePhysicalContext A networking device. NetworkingDevicePhysicalContext PhysicalContext = "NetworkingDevice" // ComputeBayPhysicalContext Within a compute bay. ComputeBayPhysicalContext PhysicalContext = "ComputeBay" // StorageBayPhysicalContext Within a storage bay. StorageBayPhysicalContext PhysicalContext = "StorageBay" // NetworkBayPhysicalContext Within a networking bay. NetworkBayPhysicalContext PhysicalContext = "NetworkBay" // ExpansionBayPhysicalContext Within an expansion bay. ExpansionBayPhysicalContext PhysicalContext = "ExpansionBay" // PowerSupplyBayPhysicalContext Within a power supply bay. PowerSupplyBayPhysicalContext PhysicalContext = "PowerSupplyBay" // MemoryPhysicalContext A memory device. MemoryPhysicalContext PhysicalContext = "Memory" // MemorySubsystemPhysicalContext The entire Memory subsystem. MemorySubsystemPhysicalContext PhysicalContext = "MemorySubsystem" // ChassisPhysicalContext The entire chassis. ChassisPhysicalContext PhysicalContext = "Chassis" // FanPhysicalContext A fan. FanPhysicalContext PhysicalContext = "Fan" // CoolingSubsystemPhysicalContext The entire cooling (air and liquid) // subsystem. CoolingSubsystemPhysicalContext PhysicalContext = "CoolingSubsystem" // MotorPhysicalContext A motor. MotorPhysicalContext PhysicalContext = "Motor" // TransformerPhysicalContext A Transformer. TransformerPhysicalContext PhysicalContext = "Transformer" // ACUtilityInputPhysicalContext An AC Utility Input. ACUtilityInputPhysicalContext PhysicalContext = "ACUtilityInput" // ACStaticBypassInputPhysicalContext An AC Static Bypass Input. ACStaticBypassInputPhysicalContext PhysicalContext = "ACStaticBypassInput" // ACMaintenanceBypassInputPhysicalContext An AC Maintenance Bypass Input. ACMaintenanceBypassInputPhysicalContext PhysicalContext = "ACMaintenanceBypassInput" // DCBusPhysicalContext A DC Bus. DCBusPhysicalContext PhysicalContext = "DCBus" // ACOutputPhysicalContext An AC Output. ACOutputPhysicalContext PhysicalContext = "ACOutput" // ACInputPhysicalContext An AC Input. ACInputPhysicalContext PhysicalContext = "ACInput" // A battery. BatteryPhysicalContext PhysicalContext = "Battery" // A circuit board. BoardPhysicalContext PhysicalContext = "Board" // A pump. PumpPhysicalContext PhysicalContext = "Pump" // A transceiver. TransceiverPhysicalContext PhysicalContext = "Transceiver" // A trusted module. TrustedModulePhysicalContext PhysicalContext = "TrustedModule" )
type PhysicalSubContext ¶
type PhysicalSubContext string
PhysicalSubContext is the physical subcontext.
const ( // InputPhysicalSubContext The input. InputPhysicalSubContext PhysicalSubContext = "Input" // OutputPhysicalSubContext The output. OutputPhysicalSubContext PhysicalSubContext = "Output" )
type Placement ¶
type Placement struct {
// AdditionalInfo is used to describe a location that cannot be conveyed
// with other properties defined for the Placement object.
AdditionalInfo string
// Rack shall be the name of the rack within a row.
Rack string
// RackOffset is the vertical location of the item in the rack. Rack offset
// units shall be measured from bottom to top starting with 0.
RackOffset int
// RackOffsetUnits shall be a RackUnit enumeration literal indicating the
// type of rack units in use.
RackOffsetUnits RackUnits
// Row shall be the name of the row.
Row string
}
Placement shall describe a location within a resource. Examples include a shelf in a rack.
type PostalAddress ¶
type PostalAddress struct {
// AdditionalCode shall conform the requirements of the ADDCODE field as
// defined in RFC5139.
AdditionalCode string
// AdditionalInfo is used to provide additional information.
AdditionalInfo string
// Building is used to locate the resource.
Building string
// City is used to name a city, township, or shi (JP).
City string
// Community shall conform to the requirements of the PCN field
// as defined in RFC5139. The value shall be a postal community name.
Community string
// Country shall conform the requirements of the Country
// field as defined in RFC5139.
Country string
// District is used to name a county, parish, gun (JP), or district
// (IN).
District string
// Division is used to name a city division, borough, city district,
// ward, chou (JP).
Division string
// Floor is used to provide a floor designation.
Floor string
// GPSCoords shall conform the requirements of the ADDCODE
// field as defined in RFC5139. The value shall be the GPS coordinates of
// the location. If furnished, this shall be expressed in the format
// '[-][nn]n.nnnnnn, [-][nn]n.nnnnn', i.e. two numbers, either positive
// or negative, with six decimal places of precision, comma-separated.
GPSCoords string
// HouseNumber shall conform the requirements of the HNO
// field as defined in RFC5139. It is the numeric portion of the house
// number.
HouseNumber int
// HouseNumberSuffix is used to provide a suffix to a house number, (F,
// B, 1/2).
HouseNumberSuffix string
// Landmark is used to identify a landmark or vanity address.
Landmark string
// LeadingStreetDirection is used to name a leading street direction, (N,
// W, SE).
LeadingStreetDirection string
// Location is used to provide additional information.
Location string
// Name is the name of this resource.
Name string
// Neighborhood is used to name a neighborhood or block.
Neighborhood string
// POBox shall conform the requirements of the POBOX field
// as defined in RFC5139. The value shall be a Post office box (P.O.
// box).
POBox string
// PlaceType shall conform the requirements of the PLC field
// as defined in RFC5139. Examples include: office, residence,...).
PlaceType string
// PostalCode shall conform the requirements of the PC field
// as defined in RFC5139. The value shall be a Postal code (or zip code).
PostalCode string
// Road shall conform the requirements of the RD field as
// defined in RFC5139. The value designates a primary road or street.
Road string
// RoadBranch shall conform the requirements of the RDBR
// field as defined in RFC5139. The value shall be a Post office box
// (P.O. box)road branch.
RoadBranch string
// RoadPostModifier shall conform the requirements of the
// POM field as defined in RFC5139. (Extended).
RoadPostModifier string
// RoadPreModifier shall conform the requirements of the PRM
// field as defined in RFC5139. (Old, New).
RoadPreModifier string
// RoadSection shall conform the requirements of the RDSEC
// field as defined in RFC5139. The value shall be a road section.
RoadSection string
// RoadSubBranch shall conform the requirements of the
// RDSUBBR field as defined in RFC5139.
RoadSubBranch string
// Room is used to locate the resource within the unit.
Room string
// Seat shall conform the requirements of the SEAT field as
// defined in RFC5139. The value shall be a name or number of a Seat
// (desk, cubicle, workstation).
Seat string
// Street is used to name a street.
Street string
// StreetSuffix is used to name a street suffix.
StreetSuffix string
// Territory is used to name a territory, state, region, province, or
// prefecture within a country.
Territory string
// TrailingStreetSuffix is used to name a trailing street suffix.
TrailingStreetSuffix string
// Unit is used to locate the resource.
Unit string
}
PostalAddress shall describe a postal address for a resource. For more information see RFC5139. Depending on use, the instance may represent a past, current, or future location.
type PreferredApplyTime ¶
type PreferredApplyTime struct {
// ApplyTime shall indicate the preference
// on to when to apply the values in this Settings resource.
ApplyTime ApplyTime
// MaintenanceWindowDurationInSeconds shall
// indicate the end of the maintenance window as the number of seconds
// after the time specified by the MaintenanceWindowStartTime property.
// This property shall be required if the ApplyTime property is specified
// as AtMaintenanceWindowStart or InMaintenanceWindowOnReset.
MaintenanceWindowDurationInSeconds int
// MaintenanceWindowStartTime shall
// indicate the date and time as to when the service is allowed to start
// applying the future configuration as part of a maintenance window.
// This property shall be required if the ApplyTime property is specified
// as AtMaintenanceWindowStart or InMaintenanceWindowOnReset.
MaintenanceWindowStartTime string
}
PreferredApplyTime shall be specified by client in a request to indicate its preference on when to apply the values in this Settings resource.
type Protocol ¶
type Protocol string
Protocol is the communication protocol.
const ( // PCIeProtocol shall mean that this device conforms to the PCI-SIG PCI // Express Base Specification. PCIeProtocol Protocol = "PCIe" // AHCIProtocol shall mean that this device conforms to the Intel // Advanced Host Controller Interface Specification. AHCIProtocol Protocol = "AHCI" // UHCIProtocol shall mean that this device conforms to the Intel // Universal Host Controller Interface Specification, Enhanced Host // Controller Interface Specification, or the Extensible Host Controller // Interface specification. UHCIProtocol Protocol = "UHCI" // SASProtocol shall mean that this device conforms to the T10 SAS // Protocol Layer Specification. SASProtocol Protocol = "SAS" // SATAProtocol shall mean that this device conforms to the Serial ATA // International Organization Serial ATA Specification. SATAProtocol Protocol = "SATA" // USBProtocol shall mean that this device conforms to the USB // Implementers Forum Universal Serial Bus Specification. USBProtocol Protocol = "USB" // NVMeProtocol shall mean that this device conforms to the Non-Volatile // Memory Host Controller Interface Specification Specification. NVMeProtocol Protocol = "NVMe" // FCProtocol shall mean that this device conforms to the T11 Fibre // Channel Physical and Signaling Interface Specification. FCProtocol Protocol = "FC" // ISCSIProtocol shall mean that this device conforms to the IETF // Internet Small Computer Systems Interface (iSCSI) Specification. ISCSIProtocol Protocol = "iSCSI" // FCoEProtocol shall mean that this device conforms to the T11 FC-BB-5 // Specification. FCoEProtocol Protocol = "FCoE" // FCPProtocol shall indicate the INCITS 481: Information technology - // Fibre Channel Protocol for SCSI. The Fibre Channel SCSI Protocol. FCPProtocol Protocol = "FCP" // FICONProtocol shall indicate the (ANSI FC-SB-3 Single-Byte Command // Code Sets-3 Mapping Protocol for the Fibre Channel(FC) protocol. // FICON (FIbre CONnection) is the IBM proprietary name for this // protocol. FICONProtocol Protocol = "FICON" // NVMeOverFabricsProtocol shall mean that this device conforms to the // NVM Express over Fabrics Specification. NVMeOverFabricsProtocol Protocol = "NVMeOverFabrics" // SMBProtocol shall mean that this device conforms to the Microsoft // Server Message Block Protocol. SMBProtocol Protocol = "SMB" // NFSv3Protocol shall mean that this device conforms to the Network File // System protocol as defined by RFC 1813. NFSv3Protocol Protocol = "NFSv3" // NFSv4Protocol shall mean that this device conforms to the Network File // System protocol as defined by RFC 3010 or RFC 5661. NFSv4Protocol Protocol = "NFSv4" // HTTPProtocol shall mean that this device conforms to the Hypertext // Transfer protocol as defined by RFC 2068 or RFC 2616. HTTPProtocol Protocol = "HTTP" // HTTPSProtocol shall mean that this device conforms to the Hypertext // Transfer protocol as defined by RFC 2068 or RFC 2616 utilizing // Transport Layer Security as specified by RFC 5246 or RFC 6176. HTTPSProtocol Protocol = "HTTPS" // FTPProtocol shall mean that this device conforms to the File Transfer // protocol as defined by RFC 114. FTPProtocol Protocol = "FTP" // SFTPProtocol shall mean that this device conforms to the File Transfer // protocol as defined by RFC 114 utilizing Transport Layer Security as // specified by RFC 5246 or RFC 6176. SFTPProtocol Protocol = "SFTP" // IWARPProtocol shall mean that this device conforms to the iWARP // protocol as defined by RFC 5042 utilizing Transport Layer mechanisms // as specified by RFC 5043 or RFC 5044. IWARPProtocol Protocol = "iWARP" // RoCEProtocol shall mean that this device conforms to the RDMA over // Converged Ethernet protocol as defined by the Infiniband Architecture // Specification. RoCEProtocol Protocol = "RoCE" // RoCEv2Protocol shall mean that this device conforms to the RDMA over // Converged Ethernet version 2 protocol as defined by the Infiniband // Architecture Specification. RoCEv2Protocol Protocol = "RoCEv2" // I2CProtocol shall mean that this device conforms to the NXP // Semiconductors I2C-bus Specification. I2CProtocol Protocol = "I2C" // OEMProtocol shall mean that this device conforms to an OEM specific // architecture and additional information may be included in the OEM // section. OEMProtocol Protocol = "OEM" )
type Reference ¶
type Reference string
Reference shall name the reference for the part location.
const ( // TopReference shall be used to specify the part location is in the top // of the unit. TopReference Reference = "Top" // BottomReference shall be used to specify the part location is in the // bottom of the unit. BottomReference Reference = "Bottom" // FrontReference shall be used to specify the part location is in the // front of the unit. FrontReference Reference = "Front" // RearReference shall be used to specify the part location is in the // rear of the unit. RearReference Reference = "Rear" // LeftReference shall be used to specify the part location is in the // left of the unit. LeftReference Reference = "Left" // RightReference shall be used to specify the part location is in the // right of the unit. RightReference Reference = "Right" // MiddleReference shall be used to specify the part location is in the // middle of the unit. MiddleReference Reference = "Middle" )
type ReferenceableMember ¶
type ReferenceableMember struct {
// ODataID is the odata identifier.
ODataID string `json:"@odata.id"`
// MemberId shall uniquely identify the member within the collection.
MemberID string
}
ReferenceableMember array members can be referenced using the value returned in the @odata.id property which may or may not be a dereferenceable URL. The @odata.id of this entity shall be the location of this element within an Item.
type Resource ¶
type Resource struct {
Entity
// ODataContext is the odata context.
ODataContext string `json:"@odata.context"`
// ODataType is the odata type.
ODataType string `json:"@odata.type"`
// Description provides a description of this resource.
Description string
}
Resource is the base type for resources and referenceable members.
type ResourceCollection ¶
type ResourceCollection struct {
// ODataContext is the odata context.
ODataContext string `json:"@odata.context"`
// ODataID is the odata identifier.
ODataID string `json:"@odata.id"`
// ODataType is the odata type.
ODataType string `json:"@odata.type"`
// Description provides a description of this resource.
Description string
// Name is the name of this resource
Name string
// Oem is The value of this string shall be of the format for the
// reserved word *Oem*.
OEM string `json:"Oem"`
}
ResourceCollection is
type Schedule ¶
type Schedule struct {
// EnabledDaysOfMonth is Days of month when scheduled occurrences are
// enabled, for enabled days of week and months of year. If the array
// contains a single value of zero, or if the property is not present,
// all days of the month shall be enabled.
EnabledDaysOfMonth []int
// EnabledDaysOfWeek is Days of the week when scheduled occurrences are
// enabled. If not present, all days of the week shall be enabled.
EnabledDaysOfWeek []DayOfWeek
// EnabledIntervals shall be an ISO 8601 conformant interval specifying when
// occurrences are enabled.
EnabledIntervals []string
// EnabledMonthsOfYear is Months of year when scheduled occurrences are
// enabled, for enabled days of week and days of month. If not present,
// all months of the year shall be enabled.
EnabledMonthsOfYear []MonthOfYear
// InitialStartTime shall be a date and time of day on which the initial
// occurrence is scheduled to occur.
InitialStartTime string
// Lifetime shall be a Redfish Duration describing the time after
// provisioning when the schedule expires.
Lifetime string
// MaxOccurrences is Maximum number of scheduled occurrences.
MaxOccurrences int
// RecurrenceInterval shall be a Redfish Duration describing the time until
// the next occurrence.
RecurrenceInterval string
}
Schedule is used to Schedule a series of occurrences.
type SchemaObject ¶ added in v0.19.0
type Settings ¶
type Settings struct {
// ETag shall be the ETag of the resource to which the settings were
// applied, after the application. This is here so that the client can check
// it against the ETag of the current resource to see if any other changes
// have also happened to the resource.
ETag string
// MaintenanceWindowResource shall be a
// reference to a resource that contains the @Redfish.MaintenanceWindow
// property which governs this resource. This property should be
// supported if the SupportedApplyTimes property contains
// AtMaintenanceWindowStart or InMaintenanceWindowOnReset.
MaintenanceWindowResource string
// Messages shall be an array of messages
// associated with the task.
Messages []Message
// SettingsObject shall be the URI of the resource to which a client must do
// a PUT or PATCH in order to modify this resource.
SettingsObject Link
// SupportedApplyTimes is A service shall advertise its applytime
// capabilities using this property as to when a Setting resource can be
// applied.
SupportedApplyTimes []ApplyTime
// Time shall indicate the time that the settings object was applied to the
// resource.
Time string
}
Settings shall describe any attributes of a resource.
type State ¶
type State string
State indicates the known state of the resource, such as if it is enabled.
const ( // EnabledState indicates this function or resource has been enabled. EnabledState State = "Enabled" // DisabledState State indicates this function or resource has been disabled. DisabledState State = "Disabled" // StandbyOfflineState indicates this function or resource is enabled, // but awaiting an external action to activate it. StandbyOfflineState State = "StandbyOffline" // StandbySpareState indicates this function or resource is part of a // redundancy set and is awaiting a failover or other external action to // activate it. StandbySpareState State = "StandbySpare" // InTestState indicates this function or resource is undergoing testing. InTestState State = "InTest" // StartingState indicates this function or resource is starting. StartingState State = "Starting" // AbsentState indicates this function or resource is not present or not // detected. AbsentState State = "Absent" // but cannot be used. UnavailableOfflineState State = "UnavailableOffline" // DeferringState indicates the element will not process any commands but // will queue new requests. DeferringState State = "Deferring" // QuiescedState indicates the element is enabled but only processes a // restricted set of commands. QuiescedState State = "Quiesced" // UpdatingState indicates the element is updating and may be unavailable // or degraded. UpdatingState State = "Updating" )
type Status ¶
type Status struct {
Health Health `json:"Health"`
HealthRollup Health `json:"HealthRollup"`
State State `json:"State"`
}
Status describes the status and health of a resource and its children.
type TestAPICall ¶ added in v0.5.0
type TestAPICall struct {
// Action is the REST action (GET, PUT, etc) of the call
Action string
// URL is the URL to send to
URL string
// Payload is the string representation of the payload
Payload string
// CustomHeaders is the Map that holds customer HTTP headers
CustomHeaders map[string]string
}
TestAPICall captures the arguments to one of the API calls.
type TestClient ¶ added in v0.5.0
type TestClient struct {
// CustomReturnForActions can be used to define custom
// return for actions, valid keys are:
// http.MethodGet, http.MethodPost, http.MethodPut,
// http.MethodPatch and http.MethodDelete.
// For each key it is possible to define a list of
// returns (in the order they should be returned).
CustomReturnForActions map[string][]interface{}
// contains filtered or unexported fields
}
TestClient is a mock client to use for unit testing some of the function calls and actions that would normally need to connect with a host.
func (*TestClient) CapturedCalls ¶ added in v0.5.0
func (c *TestClient) CapturedCalls() []TestAPICall
CapturedCalls gets all calls that were made through this instance
func (*TestClient) Delete ¶ added in v0.5.0
func (c *TestClient) Delete(url string) (*http.Response, error)
Delete performs a Delete request against the Redfish service.
func (*TestClient) DeleteWithHeaders ¶ added in v0.10.0
func (c *TestClient) DeleteWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
DeleteWithHeaders performs a Delete request against the Redfish service.
func (*TestClient) Get ¶ added in v0.5.0
func (c *TestClient) Get(url string) (*http.Response, error)
Get performs a GET request against the Redfish service.
func (*TestClient) GetWithHeaders ¶ added in v0.10.0
func (c *TestClient) GetWithHeaders(url string, customHeaders map[string]string) (*http.Response, error)
GetWithHeaders performs a GET request against the Redfish service.
func (*TestClient) Patch ¶ added in v0.5.0
func (c *TestClient) Patch(url string, payload interface{}) (*http.Response, error)
Patch performs a Patch request against the Redfish service.
func (*TestClient) PatchWithHeaders ¶ added in v0.10.0
func (c *TestClient) PatchWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
PatchWithHeaders performs a Patch request against the Redfish service.
func (*TestClient) Post ¶ added in v0.5.0
func (c *TestClient) Post(url string, payload interface{}) (*http.Response, error)
Post performs a Post request against the Redfish service.
func (*TestClient) PostMultipart ¶ added in v0.10.0
func (c *TestClient) PostMultipart(url string, payload map[string]io.Reader) (*http.Response, error)
PostMultipart performs a Post request against the Redfish service.
func (*TestClient) PostMultipartWithHeaders ¶ added in v0.10.0
func (c *TestClient) PostMultipartWithHeaders(url string, payload map[string]io.Reader, customHeaders map[string]string) (*http.Response, error)
PostMultipartWithHeaders performs a Post request against the Redfish service.
func (*TestClient) PostWithHeaders ¶ added in v0.10.0
func (c *TestClient) PostWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
PostWithHeaders performs a Post request against the Redfish service.
func (*TestClient) Put ¶ added in v0.5.0
func (c *TestClient) Put(url string, payload interface{}) (*http.Response, error)
Put performs a Put request against the Redfish service.
func (*TestClient) PutWithHeaders ¶ added in v0.10.0
func (c *TestClient) PutWithHeaders(url string, payload interface{}, customHeaders map[string]string) (*http.Response, error)
PutWithHeaders performs a Put request against the Redfish service.
func (*TestClient) Reset ¶ added in v0.5.0
func (c *TestClient) Reset()
Reset resets the captured information for this mock client.