Documentation ¶
Overview ¶
Package iscsi combines LINSTOR operations and the CRM operations to create highly available iSCSI targets.
Index ¶
- Constants
- type ISCSI
- func (i *ISCSI) AddVolume(ctx context.Context, iqn Iqn, volCfg *common.VolumeConfig) (*ResourceConfig, error)
- func (i *ISCSI) Create(ctx context.Context, rsc *ResourceConfig) (*ResourceConfig, error)
- func (i *ISCSI) Delete(ctx context.Context, iqn Iqn) error
- func (i *ISCSI) DeleteVolume(ctx context.Context, iqn Iqn, lun int) (*ResourceConfig, error)
- func (i *ISCSI) Get(ctx context.Context, iqn Iqn) (*ResourceConfig, error)
- func (i *ISCSI) List(ctx context.Context) ([]*ResourceConfig, error)
- func (i *ISCSI) Start(ctx context.Context, iqn Iqn) (*ResourceConfig, error)
- func (i *ISCSI) Stop(ctx context.Context, iqn Iqn) (*ResourceConfig, error)
- type Iqn
- type ResourceConfig
- func (r *ResourceConfig) FillDefaults()
- func (r *ResourceConfig) ID() string
- func (r *ResourceConfig) Matches(o *ResourceConfig) bool
- func (r *ResourceConfig) ToPromoter(deployment []client.ResourceWithVolumes) (*reactor.PromoterConfig, error)
- func (r *ResourceConfig) Valid() error
- func (r *ResourceConfig) VolumeConfig(number int) *common.Volume
Constants ¶
View Source
const (
DefaultISCSIPort = 3260
)
View Source
const IDFormat = "iscsi-%s"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISCSI ¶
type ISCSI struct {
// contains filtered or unexported fields
}
func (*ISCSI) AddVolume ¶
func (i *ISCSI) AddVolume(ctx context.Context, iqn Iqn, volCfg *common.VolumeConfig) (*ResourceConfig, error)
func (*ISCSI) Create ¶
func (i *ISCSI) Create(ctx context.Context, rsc *ResourceConfig) (*ResourceConfig, error)
Create creates an iSCSI target according to the resource configuration described in rsc. It automatically prepends a "cluster private volume" to the list of volumes, so volume numbers must start at 1.
func (*ISCSI) DeleteVolume ¶
type Iqn ¶
type Iqn [2]string
func (Iqn) MarshalJSON ¶
func (Iqn) MarshalText ¶
func (*Iqn) UnmarshalJSON ¶
func (*Iqn) UnmarshalText ¶
type ResourceConfig ¶
type ResourceConfig struct { IQN Iqn `json:"iqn"` AllowedInitiators []Iqn `json:"allowed_initiators,omitempty"` ResourceGroup string `json:"resource_group"` Volumes []common.VolumeConfig `json:"volumes"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` ServiceIPs []common.IpCidr `json:"service_ips"` Status common.ResourceStatus `json:"status"` GrossSize bool `json:"gross_size"` Implementation string `json:"implementation"` }
func FromPromoter ¶
func FromPromoter(cfg *reactor.PromoterConfig, definition *client.ResourceDefinition, volumeDefinitions []client.VolumeDefinition) (*ResourceConfig, error)
func (*ResourceConfig) FillDefaults ¶
func (r *ResourceConfig) FillDefaults()
func (*ResourceConfig) ID ¶
func (r *ResourceConfig) ID() string
func (*ResourceConfig) Matches ¶
func (r *ResourceConfig) Matches(o *ResourceConfig) bool
func (*ResourceConfig) ToPromoter ¶
func (r *ResourceConfig) ToPromoter(deployment []client.ResourceWithVolumes) (*reactor.PromoterConfig, error)
func (*ResourceConfig) Valid ¶
func (r *ResourceConfig) Valid() error
func (*ResourceConfig) VolumeConfig ¶
func (r *ResourceConfig) VolumeConfig(number int) *common.Volume
Click to show internal directories.
Click to hide internal directories.