nvmet

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: GPL-3.0, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nvmf

type Nvmf struct {
	Ports      []NvmfPort      `yaml:"ports"`
	Subsystems []NvmfSubsystem `yaml:"subsystems"`
}

Nvmf struct

func (*Nvmf) Apply

func (nvmf *Nvmf) Apply() error

Apply runs through struct to apply it to target

func (*Nvmf) ReadFile

func (nvmf *Nvmf) ReadFile(file string) error

ReadFile reads yaml file into struct

type NvmfNamespace

type NvmfNamespace struct {
	Name       int    `yaml:"name"`
	Enable     int    `yaml:"enable" default:"1"`
	DevicePath string `yaml:"device_path"`
	DeviceUUID string `yaml:"device_uuid"`
}

NvmfNamespace struct

func (*NvmfNamespace) Create

func (namespace *NvmfNamespace) Create(subsystem NvmfSubsystem) error

Create creates namespace in specified subsystem

func (*NvmfNamespace) WriteAttr

func (namespace *NvmfNamespace) WriteAttr(subsystem NvmfSubsystem, attr string, value string) error

WriteAttr writes namespace attirube in specified subsystem

type NvmfPort

type NvmfPort struct {
	Name        string                `yaml:"name"`
	AddrAdrfam  string                `yaml:"addr_adrfam"`
	AddrTraddr  string                `yaml:"addr_traddr"`
	AddrTrsvcid int                   `yaml:"addr_trsvcid"`
	AddrTrtype  string                `yaml:"addr_trtype"`
	Subsystems  []NvmfPortsSubsystems `yaml:"subsystems"`
}

NvmfPort struct

func (*NvmfPort) Bind

func (port *NvmfPort) Bind(subsystemName string) error

Bind binds specified subsystem to port

func (*NvmfPort) Create

func (port *NvmfPort) Create() error

Create creates port

func (*NvmfPort) WriteAttr

func (port *NvmfPort) WriteAttr(attr string, value string) error

WriteAttr write port attribute

type NvmfPortsSubsystems

type NvmfPortsSubsystems struct {
	Name string `yaml:"name"`
}

NvmfPortsSubsystems struct

type NvmfSubsystem

type NvmfSubsystem struct {
	Name             string          `yaml:"name"`
	AttrAllowAnyHost int             `yaml:"attr_allow_any_host"`
	Namespaces       []NvmfNamespace `yaml:"namespaces"`
}

NvmfSubsystem struct

func (*NvmfSubsystem) Create

func (subsystem *NvmfSubsystem) Create() error

Create creates subsystem in nvme target

func (*NvmfSubsystem) WriteAllowAnyHost

func (subsystem *NvmfSubsystem) WriteAllowAnyHost() error

WriteAllowAnyHost configures subsystem to allow any host to connect

func (*NvmfSubsystem) WriteAttr

func (subsystem *NvmfSubsystem) WriteAttr(attr string, value string) error

WriteAttr writes subsystems attirube

Jump to

Keyboard shortcuts

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