redfishutils

package
v0.0.0-...-b8e83fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
	// contains filtered or unexported fields
}

MockClient is a fake Redfish client for unit testing.

func NewClient

func NewClient(nodeName string, redfishURL string, insecure bool, useProxy bool, username string,
	password string) (*MockClient, error)

NewClient returns a mocked Redfish client in order to test functions that use the Redfish client without making any Redfish API calls.

func (*MockClient) EjectVirtualMedia

func (m *MockClient) EjectVirtualMedia(ctx context.Context) error

EjectVirtualMedia provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("EjectVirtualMedia").Return(<return values>)

    err := client.EjectEphemeralVirtualMedia(<args>)

func (*MockClient) NodeID

func (m *MockClient) NodeID() string

NodeID provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("NodeID").Return(<return values>)

    err := client.NodeID()

func (*MockClient) NodeName

func (m *MockClient) NodeName() string

NodeName provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("NodeName").Return(<return values>)

    err := client.NodeName()

func (*MockClient) RebootSystem

func (m *MockClient) RebootSystem(ctx context.Context) error

RebootSystem provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("RebootSystem").Return(<return values>)

    err := client.RebootSystem(<args>)

func (*MockClient) RemoteDirect

func (m *MockClient) RemoteDirect(ctx context.Context, isoURL string) error

RemoteDirect mocks remote client interface

func (*MockClient) SetBootSourceByType

func (m *MockClient) SetBootSourceByType(ctx context.Context) error

SetBootSourceByType provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("SetBootSourceByType").Return(<return values>)

    err := client.SetBootSourceByType(<args>)

func (*MockClient) SetVirtualMedia

func (m *MockClient) SetVirtualMedia(ctx context.Context, isoPath string) error

SetVirtualMedia provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("SetVirtualMedia").Return(<return values>)

    err := client.SetVirtualMedia(<args>)

func (*MockClient) SystemPowerOff

func (m *MockClient) SystemPowerOff(ctx context.Context) error

SystemPowerOff provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("SystemPowerOff").Return(<return values>)

    err := client.SystemPowerOff(<args>)

func (*MockClient) SystemPowerOn

func (m *MockClient) SystemPowerOn(ctx context.Context) error

SystemPowerOn provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("SystemPowerOn").Return(<return values>)

    err := client.SystemPowerOn(<args>)

func (*MockClient) SystemPowerStatus

func (m *MockClient) SystemPowerStatus(ctx context.Context) (power.Status, error)

SystemPowerStatus provides a stubbed method that can be mocked to test functions that use the Redfish client without making any Redfish API calls or requiring the appropriate Redfish client settings.

Example usage:
    client := redfishutils.NewClient()
    client.On("SystemPowerStatus").Return(<return values>)

    err := client.SystemPowerStatus(<args>)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL