nnf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SpareAllocationPolicyType        AllocationPolicyType = "spare"
	GlobalAllocationPolicyType                            = "global"
	SwitchLocalAllocationPolicyType                       = "switch-local"
	ComputeLocalAllocationPolicyType                      = "compute-local"
)
View Source
const (
	DefaultAlloctionPolicy     = SpareAllocationPolicyType
	DefaultAlloctionCompliance = StrictAllocationComplianceType
)

Default AllocationPolicy and AllocationCompliance

View Source
const (
	DefaultCapacitySourceId            = "0"
	DefaultStorageServiceId            = "unassigned" // This is loaded from config
	DefaultStoragePoolCapacitySourceId = "0"
	DefaultAllocatedVolumeId           = "0"
)
View Source
const (
	StorageServiceOdataType = "#StorageService.v1_5_0.StorageService"
	StoragePoolOdataType    = "#StoragePool.v1_5_0.StoragePool"
	CapacitySourceOdataType = "#CapacitySource.v1_0_0.CapacitySource"
	VolumeOdataType         = "#Volume.v1_6_1.Volume"
	EndpointOdataType       = "#Endpoint.v1_5_0.Endpoint"
	StorageGroupOdataType   = "#StorageGroup.v1_5_0.StorageGroup"
	FileSystemOdataType     = "#FileSystem.v1_2_2.FileSystem"
	FileShareOdataType      = "#FileShare.v1_2_0.FileShare"
)
View Source
const SpareAllocationPolicyRequiredDriveCount = 16

Required number of drives for the Spare Allocation Policy

Variables

This section is empty.

Functions

func NewDefaultApiRouter

func NewDefaultApiRouter(servicer Api, ctrl NnfControllerInterface) ec.Router

func NewFileShareRecoveryRegistry

func NewFileShareRecoveryRegistry(s *StorageService) persistent.Registry

func NewFileSystemRecoveryRegistry

func NewFileSystemRecoveryRegistry(s *StorageService) persistent.Registry

func NewStorageGroupRecoveryRegistry

func NewStorageGroupRecoveryRegistry(s *StorageService) persistent.Registry

func NewStoragePoolRecoveryRegistry

func NewStoragePoolRecoveryRegistry(s *StorageService) persistent.Registry

Types

type AerService

type AerService struct {
	// contains filtered or unexported fields
}

Automatic Error Reporting Service Wraps the provided Storage Service API with automatic error capture and reporting service.

func (*AerService) Close

func (aer *AerService) Close() error

func (*AerService) Id

func (aer *AerService) Id() string

func (*AerService) Initialize

func (aer *AerService) Initialize(log ec.Logger, ctrl NnfControllerInterface) error

func (*AerService) StorageServiceIdCapacitySourceGet

func (aer *AerService) StorageServiceIdCapacitySourceGet(id string, model *sf.CapacityCapacitySource) error

func (*AerService) StorageServiceIdEndpointIdGet

func (aer *AerService) StorageServiceIdEndpointIdGet(id0 string, id1 string, model *sf.EndpointV150Endpoint) error

func (*AerService) StorageServiceIdEndpointsGet

func (aer *AerService) StorageServiceIdEndpointsGet(id string, model *sf.EndpointCollectionEndpointCollection) error

func (*AerService) StorageServiceIdFileSystemIdDelete

func (aer *AerService) StorageServiceIdFileSystemIdDelete(id0 string, id1 string) error

func (*AerService) StorageServiceIdFileSystemIdExportedShareIdDelete

func (aer *AerService) StorageServiceIdFileSystemIdExportedShareIdDelete(id0 string, id1 string, id2 string) error

func (*AerService) StorageServiceIdFileSystemIdExportedShareIdGet

func (aer *AerService) StorageServiceIdFileSystemIdExportedShareIdGet(id0 string, id1 string, id2 string, model *sf.FileShareV120FileShare) error

func (*AerService) StorageServiceIdFileSystemIdExportedShareIdPut

func (aer *AerService) StorageServiceIdFileSystemIdExportedShareIdPut(id0 string, id1 string, id2 string, model *sf.FileShareV120FileShare) error

func (*AerService) StorageServiceIdFileSystemIdExportedSharesGet

func (aer *AerService) StorageServiceIdFileSystemIdExportedSharesGet(id0 string, id1 string, model *sf.FileShareCollectionFileShareCollection) error

func (*AerService) StorageServiceIdFileSystemIdExportedSharesPost

func (aer *AerService) StorageServiceIdFileSystemIdExportedSharesPost(id0 string, id1 string, model *sf.FileShareV120FileShare) error

func (*AerService) StorageServiceIdFileSystemIdGet

func (aer *AerService) StorageServiceIdFileSystemIdGet(id0 string, id1 string, model *sf.FileSystemV122FileSystem) error

func (*AerService) StorageServiceIdFileSystemIdPut

func (aer *AerService) StorageServiceIdFileSystemIdPut(id0 string, id1 string, model *sf.FileSystemV122FileSystem) error

func (*AerService) StorageServiceIdFileSystemsGet

func (aer *AerService) StorageServiceIdFileSystemsGet(id string, model *sf.FileSystemCollectionFileSystemCollection) error

func (*AerService) StorageServiceIdFileSystemsPost

func (aer *AerService) StorageServiceIdFileSystemsPost(id string, model *sf.FileSystemV122FileSystem) error

func (*AerService) StorageServiceIdGet

func (aer *AerService) StorageServiceIdGet(id string, model *sf.StorageServiceV150StorageService) error

func (*AerService) StorageServiceIdStorageGroupIdDelete

func (aer *AerService) StorageServiceIdStorageGroupIdDelete(id0 string, id1 string) error

func (*AerService) StorageServiceIdStorageGroupIdGet

func (aer *AerService) StorageServiceIdStorageGroupIdGet(id0 string, id1 string, model *sf.StorageGroupV150StorageGroup) error

func (*AerService) StorageServiceIdStorageGroupIdPut

func (aer *AerService) StorageServiceIdStorageGroupIdPut(id0 string, id1 string, model *sf.StorageGroupV150StorageGroup) error

func (*AerService) StorageServiceIdStorageGroupPost

func (aer *AerService) StorageServiceIdStorageGroupPost(id string, model *sf.StorageGroupV150StorageGroup) error

func (*AerService) StorageServiceIdStorageGroupsGet

func (aer *AerService) StorageServiceIdStorageGroupsGet(id string, model *sf.StorageGroupCollectionStorageGroupCollection) error

func (*AerService) StorageServiceIdStoragePoolIdAllocatedVolumeIdGet

func (aer *AerService) StorageServiceIdStoragePoolIdAllocatedVolumeIdGet(id0 string, id1 string, id2 string, model *sf.VolumeV161Volume) error

func (*AerService) StorageServiceIdStoragePoolIdAlloctedVolumesGet

func (aer *AerService) StorageServiceIdStoragePoolIdAlloctedVolumesGet(id0 string, id1 string, model *sf.VolumeCollectionVolumeCollection) error

func (*AerService) StorageServiceIdStoragePoolIdCapacitySourceIdGet

func (aer *AerService) StorageServiceIdStoragePoolIdCapacitySourceIdGet(id0 string, id1 string, id2 string, model *sf.CapacityCapacitySource) error

func (*AerService) StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet

func (aer *AerService) StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet(id0 string, id1 string, id2 string, model *sf.VolumeCollectionVolumeCollection) error

func (*AerService) StorageServiceIdStoragePoolIdCapacitySourcesGet

func (aer *AerService) StorageServiceIdStoragePoolIdCapacitySourcesGet(id0 string, id1 string, model *sf.CapacitySourceCollectionCapacitySourceCollection) error

func (*AerService) StorageServiceIdStoragePoolIdDelete

func (aer *AerService) StorageServiceIdStoragePoolIdDelete(id0 string, id1 string) error

func (*AerService) StorageServiceIdStoragePoolIdGet

func (aer *AerService) StorageServiceIdStoragePoolIdGet(id0 string, id1 string, model *sf.StoragePoolV150StoragePool) error

func (*AerService) StorageServiceIdStoragePoolIdPut

func (aer *AerService) StorageServiceIdStoragePoolIdPut(id0 string, id1 string, model *sf.StoragePoolV150StoragePool) error

func (*AerService) StorageServiceIdStoragePoolsGet

func (aer *AerService) StorageServiceIdStoragePoolsGet(id string, model *sf.StoragePoolCollectionStoragePoolCollection) error

func (*AerService) StorageServiceIdStoragePoolsPost

func (aer *AerService) StorageServiceIdStoragePoolsPost(id string, model *sf.StoragePoolV150StoragePool) error

func (*AerService) StorageServicesGet

type AllocatedVolume

type AllocatedVolume struct {
	// contains filtered or unexported fields
}

type AllocationComplianceType

type AllocationComplianceType string

AllocationComplianceType -

const (
	StrictAllocationComplianceType  AllocationComplianceType = "strict"
	RelaxedAllocationComplianceType                          = "relaxed"
)

type AllocationConfig

type AllocationConfig struct {
	// This is the default allocation policy for the NNF controller. An allocation policy
	// defines the way in which underlying storage is allocated when a user requests storage from
	// the NNF Controller. Valid values are "spares", "global", "switch-local", or "compute-local"
	// with the default being "spares". For more information see allocation_policy.go
	Policy string `yaml:"policy,omitempty"`

	// The Standard defines the level at which the allocation policy should function.
	// Valid values are "strict" or "relaxed", with the default being "strict". See allocation_policy.go
	Standard string `yaml:"standard,omitempty"`
}

type AllocationPolicy

type AllocationPolicy interface {
	Initialize(capacityBytes uint64) error
	CheckCapacity() error
	Allocate(guid uuid.UUID) ([]nvme.ProvidingVolume, error)
}

AllocationPolicy -

func NewAllocationPolicy

func NewAllocationPolicy(config AllocationConfig, oem map[string]interface{}) AllocationPolicy

NewAllocationPolicy - Allocates a new Allocation Policy with the desired parameters. The provided config is the defaults as defined by the NNF Config (see config.yaml); Knowledgable users have the option to specify overrides if the default configuration is not as desired.

type AllocationPolicyOem

type AllocationPolicyOem struct {
	Policy     AllocationPolicyType     `json:"Policy,omitempty"`
	Compliance AllocationComplianceType `json:"Compliance,omitempty"`

	// This is a hint to the allocation policy on which server endpoint
	// will be receiving the pool. This is designed for switch-local and
	// compute-local where placement matters.
	ServerEndpointId string `json:"ServerEndpoint,omitempty"`
}

AllocationPolicyOem -

type AllocationPolicyType

type AllocationPolicyType string

AllocationPolicyType -

type Api

type Api interface {
	Initialize(ec.Logger, NnfControllerInterface) error
	Close() error

	Id() string

	RedfishV1StorageServicesGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdGet(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdCapacitySourceGet(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdStoragePoolsGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsPost(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdPut(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdDelete(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdProvidingVolumesGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesVolumeIdGet(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdStorageGroupsGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStorageGroupsPost(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdPut(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdDelete(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdEndpointsGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdEndpointsEndpointIdGet(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdFileSystemsGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsPost(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdPut(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdDelete(w http.ResponseWriter, r *http.Request)

	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesPost(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdPut(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdGet(w http.ResponseWriter, r *http.Request)
	RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdDelete(w http.ResponseWriter, r *http.Request)
}

API defines the programming interface for the Redfish / Swordfish routes. Each method is responsible for decoding the http.Request into useable parameters and calling it's corresponding Handler method (see below). Each method should respond to the request by updating the http.ResponesWriter.

func NewDefaultApiService

func NewDefaultApiService(ss StorageServiceApi) Api

NewDefaultApiService -

type ConfigFile

type ConfigFile struct {
	Version  string
	Metadata struct {
		Name string
	}

	Id string

	AllocationConfig AllocationConfig `yaml:"allocationConfig"`
	RemoteConfig     RemoteConfig     `yaml:"remoteConfig"`
}

type DefaultApiRouter

type DefaultApiRouter struct {
	// contains filtered or unexported fields
}

func (*DefaultApiRouter) Close

func (r *DefaultApiRouter) Close() error

func (*DefaultApiRouter) Init

func (r *DefaultApiRouter) Init(log ec.Logger) error

func (*DefaultApiRouter) Name

func (*DefaultApiRouter) Name() string

func (*DefaultApiRouter) Routes

func (r *DefaultApiRouter) Routes() ec.Routes

func (*DefaultApiRouter) Start

func (r *DefaultApiRouter) Start() error

type DefaultApiService

type DefaultApiService struct {
	// contains filtered or unexported fields
}

DefaultApiService -

func (*DefaultApiService) Close

func (s *DefaultApiService) Close() error

func (*DefaultApiService) Id

func (s *DefaultApiService) Id() string

func (*DefaultApiService) Initialize

func (s *DefaultApiService) Initialize(log ec.Logger, ctrl NnfControllerInterface) error

func (*DefaultApiService) RedfishV1StorageServicesGet

func (s *DefaultApiService) RedfishV1StorageServicesGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdCapacitySourceGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdCapacitySourceGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdCapacitySourceGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdEndpointsEndpointIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdEndpointsEndpointIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdEndpointsEndpointIdGet

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdEndpointsGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdEndpointsGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdEndpointsGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdDelete

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdDelete(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdDelete -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdPut

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdPut(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemIdPut

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdDelete

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdDelete(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdDelete -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdPut

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdPut(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesExportedFileSharesIdPut -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesPost

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesPost(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsFileSystemsIdExportedFileSharesPost -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsPost

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdFileSystemsPost(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdFileSystemsPost -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStorageGroupsGet

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsPost

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsPost(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStorageGroupsPost -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdDelete

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdDelete(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdDelete(w http.ResponseWriter, r *http.Request)

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdGet

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdPut

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdPut(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStorageGroupsStorageGroupIdPut

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsPost

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsPost(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsPost -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesVolumeIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesVolumeIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdAllocatedVolumesVolumeIdGet

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdProvidingVolumesGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdProvidingVolumesGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesCapacitySourceIdProvidingVolumesGet(w http.ResponseWriter, r *http.Request)

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdCapacitySourcesGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdDelete

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdDelete(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdDelete -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdGet

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdGet(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdGet -

func (*DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdPut

func (s *DefaultApiService) RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdPut(w http.ResponseWriter, r *http.Request)

RedfishV1StorageServicesStorageServiceIdStoragePoolsStoragePoolIdPut -

type DefaultPersistentController

type DefaultPersistentController struct{}

func (*DefaultPersistentController) CreatePersistentObject

func (*DefaultPersistentController) CreatePersistentObject(obj PersistentObjectApi, updateFunc func() error, startingState, endingState uint32) error

func (*DefaultPersistentController) DeletePersistentObject

func (*DefaultPersistentController) DeletePersistentObject(obj PersistentObjectApi, deleteFunc func() error, startingState, endingState uint32) error

func (*DefaultPersistentController) UpdatePersistentObject

func (*DefaultPersistentController) UpdatePersistentObject(obj PersistentObjectApi, updateFunc func() error, startingState, endingState uint32) error

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

func (*Endpoint) OdataId

func (ep *Endpoint) OdataId() string

type FileShare

type FileShare struct {
	// contains filtered or unexported fields
}

func (*FileShare) GenerateMetadata

func (sh *FileShare) GenerateMetadata() ([]byte, error)

func (*FileShare) GenerateStateData

func (sh *FileShare) GenerateStateData(state uint32) ([]byte, error)

func (*FileShare) GetKey

func (sh *FileShare) GetKey() string

func (*FileShare) GetProvider

func (sh *FileShare) GetProvider() PersistentStoreProvider

func (*FileShare) OdataId

func (sh *FileShare) OdataId() string

func (*FileShare) OdataIdRef

func (sh *FileShare) OdataIdRef(ref string) sf.OdataV4IdRef

func (*FileShare) Rollback

func (sh *FileShare) Rollback(state uint32) error

type FileSystem

type FileSystem struct {
	// contains filtered or unexported fields
}

func (*FileSystem) GenerateMetadata

func (fs *FileSystem) GenerateMetadata() ([]byte, error)

func (*FileSystem) GenerateStateData

func (fs *FileSystem) GenerateStateData(state uint32) ([]byte, error)

func (*FileSystem) GetKey

func (fs *FileSystem) GetKey() string

func (*FileSystem) GetProvider

func (fs *FileSystem) GetProvider() PersistentStoreProvider

func (*FileSystem) OdataId

func (fs *FileSystem) OdataId() string

func (*FileSystem) OdataIdRef

func (fs *FileSystem) OdataIdRef(ref string) sf.OdataV4IdRef

func (*FileSystem) Rollback

func (fs *FileSystem) Rollback(state uint32) error

type MockPersistentController

type MockPersistentController struct{}

func (*MockPersistentController) CreatePersistentObject

func (*MockPersistentController) CreatePersistentObject(obj PersistentObjectApi, createFunc func() error, startingState, endingState uint32) error

func (*MockPersistentController) DeletePersistentObject

func (*MockPersistentController) DeletePersistentObject(obj PersistentObjectApi, deleteFunc func() error, startingState, endingState uint32) error

func (*MockPersistentController) UpdatePersistentObject

func (*MockPersistentController) UpdatePersistentObject(obj PersistentObjectApi, updateFunc func() error, startingState, endingState uint32) error

type NnfController

type NnfController struct {
	// contains filtered or unexported fields
}

func (*NnfController) PersistentControllerProvider

func (c *NnfController) PersistentControllerProvider() PersistentControllerApi

func (*NnfController) ServerControllerProvider

func (c *NnfController) ServerControllerProvider() server.ServerControllerProvider

type NnfControllerInterface

type NnfControllerInterface interface {
	ServerControllerProvider() server.ServerControllerProvider
	PersistentControllerProvider() PersistentControllerApi
}

func NewMockNnfController

func NewMockNnfController(persistence bool) NnfControllerInterface

TODO: See if mock makes sense here - really the lower-layers should provide the mocking of physical devices; NNF Controller might be fine building off that.

func NewNnfController

func NewNnfController(persistence bool) NnfControllerInterface

type PersistentControllerApi

type PersistentControllerApi interface {
	CreatePersistentObject(obj PersistentObjectApi, updateFunc func() error, startingState, endingState uint32) error
	UpdatePersistentObject(obj PersistentObjectApi, updateFunc func() error, startingState, endingState uint32) error
	DeletePersistentObject(obj PersistentObjectApi, deleteFunc func() error, startingState, endingState uint32) error
}

Persistent Controller API provides an interface for creating, updating, and deleting persistent objects.

func NewDefaultPersistentController

func NewDefaultPersistentController() PersistentControllerApi

func NewMockPersistentController

func NewMockPersistentController() PersistentControllerApi

type PersistentObjectApi

type PersistentObjectApi interface {
	GetKey() string
	GetProvider() PersistentStoreProvider

	// GenerateMetadata will generate the metadata when a new persistent object is created. Metadata does not change
	// over the object lifetime.
	GenerateMetadata() ([]byte, error)

	// GenerateStateData is called when any transaction occurs on the persistent object. Usually this is for occurances
	// of Entry State and Exit State, where upon a call to CreatePersistentObject or UpdatePersistentObject, the object
	// can store state data for either the Starting state or Ending state
	GenerateStateData(state uint32) ([]byte, error)

	// Rollback occurs when a call to CreatePersistentObject or UpdatePersistentObject fails. We rollback to the
	// starting state.
	Rollback(startingState uint32) error
}

Persistent Object API provides interface for creating or updating a persistent object.

type PersistentStoreProvider

type PersistentStoreProvider interface {
	GetStore() *persistent.Store
}

Persistent Store Provider provides an interface for supplying a Key-Value Store

type RemoteConfig

type RemoteConfig struct {
	AccessMode string         `yaml:"accessMode"`
	Servers    []ServerConfig `yaml:"servers"`
}

type ServerConfig

type ServerConfig struct {
	Label   string `yaml:"label"`
	Address string `yaml:"address"`
}

type SpareAllocationPolicy

type SpareAllocationPolicy struct {
	// contains filtered or unexported fields
}

func (*SpareAllocationPolicy) Allocate

func (p *SpareAllocationPolicy) Allocate(pid uuid.UUID) ([]nvme.ProvidingVolume, error)

func (*SpareAllocationPolicy) CheckCapacity

func (p *SpareAllocationPolicy) CheckCapacity() error

func (*SpareAllocationPolicy) Initialize

func (p *SpareAllocationPolicy) Initialize(capacityBytes uint64) error

type StorageGroup

type StorageGroup struct {
	// contains filtered or unexported fields
}

func (*StorageGroup) GenerateMetadata

func (sg *StorageGroup) GenerateMetadata() ([]byte, error)

func (*StorageGroup) GenerateStateData

func (sg *StorageGroup) GenerateStateData(state uint32) ([]byte, error)

func (*StorageGroup) GetKey

func (sg *StorageGroup) GetKey() string

func (*StorageGroup) GetProvider

func (sg *StorageGroup) GetProvider() PersistentStoreProvider

func (*StorageGroup) OdataId

func (sg *StorageGroup) OdataId() string

func (*StorageGroup) OdataIdRef

func (sg *StorageGroup) OdataIdRef(ref string) sf.OdataV4IdRef

func (*StorageGroup) Rollback

func (sg *StorageGroup) Rollback(state uint32) error

type StoragePool

type StoragePool struct {
	// contains filtered or unexported fields
}

func (*StoragePool) GenerateMetadata

func (p *StoragePool) GenerateMetadata() ([]byte, error)

func (*StoragePool) GenerateStateData

func (p *StoragePool) GenerateStateData(state uint32) ([]byte, error)

func (*StoragePool) GetCapacityBytes

func (p *StoragePool) GetCapacityBytes() (capacityBytes uint64)

func (*StoragePool) GetKey

func (p *StoragePool) GetKey() string

func (*StoragePool) GetProvider

func (p *StoragePool) GetProvider() PersistentStoreProvider

func (*StoragePool) OdataId

func (p *StoragePool) OdataId() string

func (*StoragePool) OdataIdRef

func (p *StoragePool) OdataIdRef(ref string) sf.OdataV4IdRef

func (*StoragePool) Rollback

func (p *StoragePool) Rollback(state uint32) error

type StorageService

type StorageService struct {
	// contains filtered or unexported fields
}

func (*StorageService) Close

func (s *StorageService) Close() error

func (*StorageService) EventHandler

func (s *StorageService) EventHandler(e event.Event) error

func (*StorageService) GetStore

func (s *StorageService) GetStore() *persistent.Store

func (*StorageService) Id

func (s *StorageService) Id() string

func (*StorageService) Initialize

func (s *StorageService) Initialize(log ec.Logger, ctrl NnfControllerInterface) error

Initialize is responsible for initializing the NNF Storage Service; the Storage Service must complete initialization without error prior any access to the Storage Service. Failure to initialize will cause the storage service to misbehave.

func (*StorageService) OdataId

func (s *StorageService) OdataId() string

func (*StorageService) OdataIdRef

func (s *StorageService) OdataIdRef(ref string) sf.OdataV4IdRef

func (*StorageService) StorageServiceIdCapacitySourceGet

func (*StorageService) StorageServiceIdCapacitySourceGet(storageServiceId string, model *sf.CapacityCapacitySource) error

func (*StorageService) StorageServiceIdEndpointIdGet

func (*StorageService) StorageServiceIdEndpointIdGet(storageServiceId, endpointId string, model *sf.EndpointV150Endpoint) error

StorageServiceIdEndpointIdGet -

func (*StorageService) StorageServiceIdEndpointsGet

func (*StorageService) StorageServiceIdEndpointsGet(storageServiceId string, model *sf.EndpointCollectionEndpointCollection) error

StorageServiceIdEndpointsGet -

func (*StorageService) StorageServiceIdFileSystemIdDelete

func (*StorageService) StorageServiceIdFileSystemIdDelete(storageServiceId, fileSystemId string) (err error)

StorageServiceIdFileSystemIdDelete -

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdDelete

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdDelete(storageServiceId, fileSystemId, exportedShareId string) (err error)

StorageServiceIdFileSystemIdExportedShareIdDelete -

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdGet

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdGet(storageServiceId, fileSystemId, exportedShareId string, model *sf.FileShareV120FileShare) error

StorageServiceIdFileSystemIdExportedShareIdGet -

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdPut

func (*StorageService) StorageServiceIdFileSystemIdExportedShareIdPut(storageServiceId, fileSystemId, exportedShareId string, model *sf.FileShareV120FileShare) (err error)

StorageServiceIdFileSystemIdExportedShareIdPut -

func (*StorageService) StorageServiceIdFileSystemIdExportedSharesGet

func (*StorageService) StorageServiceIdFileSystemIdExportedSharesGet(storageServiceId, fileSystemId string, model *sf.FileShareCollectionFileShareCollection) error

StorageServiceIdFileSystemIdExportedSharesGet -

func (*StorageService) StorageServiceIdFileSystemIdExportedSharesPost

func (*StorageService) StorageServiceIdFileSystemIdExportedSharesPost(storageServiceId, fileSystemId string, model *sf.FileShareV120FileShare) (err error)

StorageServiceIdFileSystemIdExportedSharesPost -

func (*StorageService) StorageServiceIdFileSystemIdGet

func (*StorageService) StorageServiceIdFileSystemIdGet(storageServiceId, fileSystemId string, model *sf.FileSystemV122FileSystem) error

StorageServiceIdFileSystemIdGet -

func (*StorageService) StorageServiceIdFileSystemIdPut

func (*StorageService) StorageServiceIdFileSystemIdPut(storageServiceId, fileSystemId string, model *sf.FileSystemV122FileSystem) error

StorageServiceIdFileSystemIdPut -

func (*StorageService) StorageServiceIdFileSystemsGet

func (*StorageService) StorageServiceIdFileSystemsGet(storageServiceId string, model *sf.FileSystemCollectionFileSystemCollection) error

StorageServiceIdFileSystemsGet -

func (*StorageService) StorageServiceIdFileSystemsPost

func (*StorageService) StorageServiceIdFileSystemsPost(storageServiceId string, model *sf.FileSystemV122FileSystem) (err error)

StorageServiceIdFileSystemsPost -

func (*StorageService) StorageServiceIdGet

func (*StorageService) StorageServiceIdGet(storageServiceId string, model *sf.StorageServiceV150StorageService) error

func (*StorageService) StorageServiceIdStorageGroupIdDelete

func (*StorageService) StorageServiceIdStorageGroupIdDelete(storageServiceId, storageGroupId string) (err error)

StorageServiceIdStorageGroupIdDelete -

func (*StorageService) StorageServiceIdStorageGroupIdGet

func (*StorageService) StorageServiceIdStorageGroupIdGet(storageServiceId, storageGroupId string, model *sf.StorageGroupV150StorageGroup) error

StorageServiceIdStorageGroupIdGet -

func (*StorageService) StorageServiceIdStorageGroupIdPut

func (*StorageService) StorageServiceIdStorageGroupIdPut(storageServiceId, storageGroupId string, model *sf.StorageGroupV150StorageGroup) error

StorageServiceIdStorageGroupIdPut

func (*StorageService) StorageServiceIdStorageGroupPost

func (*StorageService) StorageServiceIdStorageGroupPost(storageServiceId string, model *sf.StorageGroupV150StorageGroup) (err error)

StorageServiceIdStorageGroupPost -

func (*StorageService) StorageServiceIdStorageGroupsGet

func (*StorageService) StorageServiceIdStorageGroupsGet(storageServiceId string, model *sf.StorageGroupCollectionStorageGroupCollection) error

StorageServiceIdStorageGroupsGet -

func (*StorageService) StorageServiceIdStoragePoolIdAllocatedVolumeIdGet

func (*StorageService) StorageServiceIdStoragePoolIdAllocatedVolumeIdGet(storageServiceId, storagePoolId, volumeId string, model *sf.VolumeV161Volume) error

StorageServiceIdStoragePoolIdAllocatedVolumeIdGet -

func (*StorageService) StorageServiceIdStoragePoolIdAlloctedVolumesGet

func (*StorageService) StorageServiceIdStoragePoolIdAlloctedVolumesGet(storageServiceId, storagePoolId string, model *sf.VolumeCollectionVolumeCollection) error

StorageServiceIdStoragePoolIdAlloctedVolumesGet -

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourceIdGet

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourceIdGet(storageServiceId, storagePoolId, capacitySourceId string, model *sf.CapacityCapacitySource) error

StorageServiceIdStoragePoolIdCapacitySourceIdGet -

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet(storageServiceId, storagePoolId, capacitySourceId string, model *sf.VolumeCollectionVolumeCollection) error

StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet -

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourcesGet

func (*StorageService) StorageServiceIdStoragePoolIdCapacitySourcesGet(storageServiceId, storagePoolId string, model *sf.CapacitySourceCollectionCapacitySourceCollection) error

StorageServiceIdStoragePoolIdCapacitySourcesGet -

func (*StorageService) StorageServiceIdStoragePoolIdDelete

func (*StorageService) StorageServiceIdStoragePoolIdDelete(storageServiceId, storagePoolId string) (err error)

StorageServiceIdStoragePoolIdDelete -

func (*StorageService) StorageServiceIdStoragePoolIdGet

func (*StorageService) StorageServiceIdStoragePoolIdGet(storageServiceId, storagePoolId string, model *sf.StoragePoolV150StoragePool) error

StorageServiceIdStoragePoolIdGet -

func (*StorageService) StorageServiceIdStoragePoolIdPut

func (*StorageService) StorageServiceIdStoragePoolIdPut(storageServiceId, storagePoolId string, model *sf.StoragePoolV150StoragePool) error

StorageServiceIdStoragePoolIdPut -

func (*StorageService) StorageServiceIdStoragePoolsGet

func (*StorageService) StorageServiceIdStoragePoolsGet(storageServiceId string, model *sf.StoragePoolCollectionStoragePoolCollection) error

func (*StorageService) StorageServiceIdStoragePoolsPost

func (*StorageService) StorageServiceIdStoragePoolsPost(storageServiceId string, model *sf.StoragePoolV150StoragePool) (err error)

StorageServiceIdStoragePoolsPost -

func (*StorageService) StorageServicesGet

type StorageServiceApi

type StorageServiceApi interface {
	Initialize(ec.Logger, NnfControllerInterface) error
	Close() error

	Id() string

	StorageServicesGet(*sf.StorageServiceCollectionStorageServiceCollection) error
	StorageServiceIdGet(string, *sf.StorageServiceV150StorageService) error

	StorageServiceIdCapacitySourceGet(string, *sf.CapacityCapacitySource) error

	StorageServiceIdStoragePoolsGet(string, *sf.StoragePoolCollectionStoragePoolCollection) error
	StorageServiceIdStoragePoolsPost(string, *sf.StoragePoolV150StoragePool) error
	StorageServiceIdStoragePoolIdGet(string, string, *sf.StoragePoolV150StoragePool) error
	StorageServiceIdStoragePoolIdPut(string, string, *sf.StoragePoolV150StoragePool) error
	StorageServiceIdStoragePoolIdDelete(string, string) error
	StorageServiceIdStoragePoolIdCapacitySourcesGet(string, string, *sf.CapacitySourceCollectionCapacitySourceCollection) error
	StorageServiceIdStoragePoolIdCapacitySourceIdGet(string, string, string, *sf.CapacityCapacitySource) error
	StorageServiceIdStoragePoolIdCapacitySourceIdProvidingVolumesGet(string, string, string, *sf.VolumeCollectionVolumeCollection) error
	StorageServiceIdStoragePoolIdAlloctedVolumesGet(string, string, *sf.VolumeCollectionVolumeCollection) error
	StorageServiceIdStoragePoolIdAllocatedVolumeIdGet(string, string, string, *sf.VolumeV161Volume) error

	StorageServiceIdStorageGroupsGet(string, *sf.StorageGroupCollectionStorageGroupCollection) error
	StorageServiceIdStorageGroupPost(string, *sf.StorageGroupV150StorageGroup) error
	StorageServiceIdStorageGroupIdPut(string, string, *sf.StorageGroupV150StorageGroup) error
	StorageServiceIdStorageGroupIdGet(string, string, *sf.StorageGroupV150StorageGroup) error
	StorageServiceIdStorageGroupIdDelete(string, string) error

	StorageServiceIdEndpointsGet(string, *sf.EndpointCollectionEndpointCollection) error
	StorageServiceIdEndpointIdGet(string, string, *sf.EndpointV150Endpoint) error

	StorageServiceIdFileSystemsGet(string, *sf.FileSystemCollectionFileSystemCollection) error
	StorageServiceIdFileSystemsPost(string, *sf.FileSystemV122FileSystem) error
	StorageServiceIdFileSystemIdPut(string, string, *sf.FileSystemV122FileSystem) error
	StorageServiceIdFileSystemIdGet(string, string, *sf.FileSystemV122FileSystem) error
	StorageServiceIdFileSystemIdDelete(string, string) error

	StorageServiceIdFileSystemIdExportedSharesGet(string, string, *sf.FileShareCollectionFileShareCollection) error
	StorageServiceIdFileSystemIdExportedSharesPost(string, string, *sf.FileShareV120FileShare) error
	StorageServiceIdFileSystemIdExportedShareIdPut(string, string, string, *sf.FileShareV120FileShare) error
	StorageServiceIdFileSystemIdExportedShareIdGet(string, string, string, *sf.FileShareV120FileShare) error
	StorageServiceIdFileSystemIdExportedShareIdDelete(string, string, string) error
}

Storage Service API defines the interface for the above API methods to call. Each API method must have an equivalent method. Methods take request paramters and a Redfish / Swordfish model to populate.

func NewDefaultStorageService

func NewDefaultStorageService() StorageServiceApi

Jump to

Keyboard shortcuts

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