Documentation
¶
Index ¶
- Constants
- Variables
- func CheckDeviceSpecJson(ds string) error
- type FabricManager
- type FabricManagerClient
- func (fmc *FabricManagerClient) CreateMachine(machineName, tenantId string, machineSpecs models.MachineSpecsArgs, ...) (string, error)
- func (fmc *FabricManagerClient) GetMachineDetails(tenantId, machineUUID, bearerToken string) (lanports []models.Lanport, bootSsd string, status int, _ error)
- func (fmc *FabricManagerClient) GracefulShutdown(machineUUID, tenantId, bearerToken string) error
- func (fmc *FabricManagerClient) ImageInstall(tenantId, ssdId, imageFilename, bearerToken string) error
- func (fmc *FabricManagerClient) IsInit() bool
- func (fmc *FabricManagerClient) PowerOff(machineUUID, tenantId, bearerToken string) error
- func (fmc *FabricManagerClient) PowerOn(machineUUID, tenantId, bearerToken string) error
- func (fmc *FabricManagerClient) RemoveMachine(machineUUID, tenantId, bearerToken string) error
- func (fmc *FabricManagerClient) ValidateTenant(tenantId, bearerToken string) error
Constants ¶
View Source
const ErrMissingParams = "baseURI and port cannot be empty"
Variables ¶
View Source
var ( ErrBootStorageTags = errors.New("mandatory field 'is_bootstorage' must be equal true in devices specification") ErrBootStorageConditionNotFound = errors.New("not found condition in device spec for bootable storage") ErrSsdIdNotFound = errors.New("ssdId not found in resources") ErrGetMachineUUIDFromPostResponse = errors.New("error while getting machine UUID from POST response") )
Functions ¶
func CheckDeviceSpecJson ¶
Types ¶
type FabricManager ¶
type FabricManager interface {
IsInit() bool
ValidateTenant(tenantId, bearerToken string) error
PowerOn(machineUUID, tenantId, bearerToken string) error
PowerOff(machineUUID, tenantId, bearerToken string) error
GracefulShutdown(machineUUID, tenantId, bearerToken string) error
ImageInstall(tenantId string, ssdId string, imageFilename, bearerToken string) error
RemoveMachine(machineUUID, tenantId, bearerToken string) error
CreateMachine(machineName, tenantId string, machineSpecs models.MachineSpecsArgs, bearerToken string) (string, error)
GetMachineDetails(tenantId, machineUUID, bearerToken string) ([]models.Lanport, string, int, error)
}
FabricManager interface defines the methods for interacting with the Fabric Manager.
type FabricManagerClient ¶
type FabricManagerClient struct {
// contains filtered or unexported fields
}
FabricManagerClient struct holds configuration for Fabric Manager interaction.
func NewFabricManagerClient ¶
func NewFabricManagerClient(baseURI, endpoint, deviceSpecJsonString string) (*FabricManagerClient, error)
NewFabricManagerClient creates a new FabricManagerClient instance.
func (*FabricManagerClient) CreateMachine ¶
func (fmc *FabricManagerClient) CreateMachine(machineName, tenantId string, machineSpecs models.MachineSpecsArgs, bearerToken string) (string, error)
CreateMachine sends a POST request to the Fabric Manager's `/machines/` endpoint to create a new machine
func (*FabricManagerClient) GetMachineDetails ¶
func (fmc *FabricManagerClient) GetMachineDetails(tenantId, machineUUID, bearerToken string) (lanports []models.Lanport, bootSsd string, status int, _ error)
GetMachineDetails receives status on Machine from the Fabric Manager service.
func (*FabricManagerClient) GracefulShutdown ¶ added in v0.1.4
func (fmc *FabricManagerClient) GracefulShutdown(machineUUID, tenantId, bearerToken string) error
func (*FabricManagerClient) ImageInstall ¶
func (fmc *FabricManagerClient) ImageInstall(tenantId, ssdId, imageFilename, bearerToken string) error
func (*FabricManagerClient) IsInit ¶
func (fmc *FabricManagerClient) IsInit() bool
func (*FabricManagerClient) PowerOff ¶
func (fmc *FabricManagerClient) PowerOff(machineUUID, tenantId, bearerToken string) error
func (*FabricManagerClient) PowerOn ¶
func (fmc *FabricManagerClient) PowerOn(machineUUID, tenantId, bearerToken string) error
func (*FabricManagerClient) RemoveMachine ¶
func (fmc *FabricManagerClient) RemoveMachine(machineUUID, tenantId, bearerToken string) error
func (*FabricManagerClient) ValidateTenant ¶
func (fmc *FabricManagerClient) ValidateTenant(tenantId, bearerToken string) error
Click to show internal directories.
Click to hide internal directories.