Documentation ¶
Index ¶
- type AttachNsCmd
- type BuildMiFeatureCmd
- type CreateNsCmd
- type DeleteNsCmd
- type DetachNsCmd
- type DiscoverCmd
- type FormatNsCmd
- type GetFeatureCmd
- type GetSmartLogCmd
- type IdCtrlCmd
- type IdNamespaceCtrls
- type IdNsCmd
- type ListNsCmd
- type ListSecondaryCmd
- type PrimaryCtrlCapsCmd
- type SetFeatureCmd
- type VirtualMgmtCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachNsCmd ¶
type AttachNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceID uint32 `kong:"arg,required,short='n',help='namespace to attach'"` Controllers []uint16 `kong:"arg,required,short='c',help='comma-sep controller list'"` }
AttachNsCmd attaches the given namespace to the given controller or comma-sep list of controllers. ID of the given namespace becomes active upon attachment to a controller. A namespace must be attached to a controller before IO commands may be directed to that namespace.
func (*AttachNsCmd) Run ¶
func (cmd *AttachNsCmd) Run() error
Run will run the Attach Namespace Command
type BuildMiFeatureCmd ¶
type BuildMiFeatureCmd struct {
File string `kong:"arg,required,help='Output file'"`
}
func (*BuildMiFeatureCmd) Run ¶
func (cmd *BuildMiFeatureCmd) Run() error
type CreateNsCmd ¶
type CreateNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` Size uint64 `kong:"arg,required,short='s',help='size of ns'"` Capacity uint64 `kong:"arg,required,short='c',help='capacity of ns'"` Format uint8 `kong:"arg,optional,short='f',default='127',help='FLBA size'"` Dps uint8 `kong:"arg,optional,short='d',default='0',help='data protection capabilities'"` Multipath uint8 `kong:"arg,optional,short='m',default='0',help='multipath and sharing capabilities'"` Anagrpid uint32 `kong:"arg,optional,short='a',default='0',help='ANA Group Identifier'"` Nvmesetid uint16 `kong:"arg,optional,short='i',default='0',help='NVM Set Identifier'"` Blocksize uint64 `kong:"arg,optional,short='b',default='0',help='target block size'"` Timeout uint32 `kong:"arg,optional,short='t',default='0',help='timeout value, in milliseconds'"` // contains filtered or unexported fields }
CreateNsCmd sends a namespace management command to the specified device to create a namespace with the given parameters. The next available namespace ID is used for the create operation. Note that create-ns does not attach the namespace to a controller, the attach-ns command is needed.
func (*CreateNsCmd) AfterApply ¶
func (cmd *CreateNsCmd) AfterApply() error
AfterApply will be called after assignment; used to validate input params
func (*CreateNsCmd) Run ¶
func (cmd *CreateNsCmd) Run() error
Run will run the Create Namespace Command
type DeleteNsCmd ¶
type DeleteNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceID uint32 `kong:"arg,required,short='n',help='namespace to delete'"` }
DeleteNsCmd delete the given namespace by sending a namespace management command to the provided device. All controllers should be detached from the namespace prior to namespace deletion. A namespace ID becomes inactive when that namespace is detached or, if the namespace is not already inactive, once deleted.
func (*DeleteNsCmd) Run ¶
func (cmd *DeleteNsCmd) Run() error
Run will run the Delete Namespace Command
type DetachNsCmd ¶
type DetachNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceID uint32 `kong:"arg,required,short='n',help='namespace to attach'"` Controllers []uint16 `kong:"arg,required,short='c',help='comma-sep controller list'"` }
DetachNsCmd detaches the given namespace from the given controller; de-activates the given namespace's ID. A namespace must be attached to a controller before IO commands may be directed to that namespace.
func (*DetachNsCmd) Run ¶
func (cmd *DetachNsCmd) Run() error
Run will run the Detach Namespace Command
type DiscoverCmd ¶
type DiscoverCmd struct {
Regexp string `kong:"arg,required,help='regular expression used to filter drives by model number, serial number, or NQN'"`
}
func (*DiscoverCmd) Run ¶
func (cmd *DiscoverCmd) Run() error
type FormatNsCmd ¶
type FormatNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceID uint32 `kong:"arg,required,short='n',help='namespace to format'"` }
FormatNsCmd sends a format command to the specified device to format the specified namespace.
func (*FormatNsCmd) Run ¶
func (cmd *FormatNsCmd) Run() error
Run will run the Delete Namespace Command
type GetFeatureCmd ¶
type GetFeatureCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` FeatureId uint32 `kong:"arg,short='f',required,help='Feature identifier'"` NamespaceId uint32 `kong:"arg,short='n',help='Identifier of desired namespace'"` Select int `kong:"arg,short='s',help='[0-3]: current/default/saved/supported'"` Output string `kong:"arg,short='o',help='Output file to write'"` }
func (*GetFeatureCmd) Run ¶
func (cmd *GetFeatureCmd) Run() error
type GetSmartLogCmd ¶
type GetSmartLogCmd struct {
Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"`
}
func (*GetSmartLogCmd) Run ¶
func (cmd *GetSmartLogCmd) Run() error
type IdCtrlCmd ¶
type IdCtrlCmd struct {
Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"`
}
IdCtrlCmd shows secondary controller list associated with the primary controller of the given device.
type IdNamespaceCtrls ¶
type IdNamespaceCtrls struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceId uint32 `kong:"arg,required,short='n',help='Namespace to identify.'"` }
func (*IdNamespaceCtrls) Run ¶
func (cmd *IdNamespaceCtrls) Run() error
type IdNsCmd ¶
type IdNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceId int32 `kong:"optional,short='n',default='-1',help='Namespace to identify.'"` Present bool `kong:"optional,short='p',default='false',help='Return the namespace only if present on the device.'"` }
IdNsCmd Send an Identify Namespace command to the given device
type ListNsCmd ¶
type ListNsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` NamespaceID uint32 `kong:"optional,default='1',help='First NSID returned list should start from.'"` All bool `kong:"optional,default='false',help='Show all namespaces in the subsystem, whether attached or inactive.'"` }
ListNsCmd For the specified controller handle, show the namespace list in the associated NVMe subsystem, optionally starting with a given nsid.
type ListSecondaryCmd ¶
type ListSecondaryCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` CntID uint32 `kong:"arg,optional,default='0',help='Lowest controller identifier to display.'"` NamespaceID uint32 `kong:"arg,optional,default='0',help='optional namespace attached to controller.'"` NumEntries int `kong:"arg,optional,default='-1',help='number of entries to display.'"` }
ListSecondaryCmd shows secondary controller list associated with the primary controller of the given device.
func (*ListSecondaryCmd) Run ¶
func (cmd *ListSecondaryCmd) Run() error
Run will run the List Secondary Command
type PrimaryCtrlCapsCmd ¶
type PrimaryCtrlCapsCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` ControllerId uint16 `kong:"arg,optional,short='c',default='0',help='Controller ID'"` }
PrimaryCtrlCapsCmd Send NVMe Identify Primary Controller Capabilities
func (*PrimaryCtrlCapsCmd) Run ¶
func (cmd *PrimaryCtrlCapsCmd) Run() error
Run will run the Primary Controller Capabilities command
type SetFeatureCmd ¶
type SetFeatureCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` FeatureId string `kong:"arg,short='f',required,help='Feature identifier'"` NamespaceId uint32 `kong:"arg,short='n',help='Identifier of desired namespace'"` Data string `kong:"arg,type='existingFile',help='file for feature data'"` Save bool `kong:"optional,short='s',help='Save data to persistent storage'"` }
func (*SetFeatureCmd) Run ¶
func (cmd *SetFeatureCmd) Run() error
type VirtualMgmtCmd ¶
type VirtualMgmtCmd struct { Device string `kong:"arg,required,type='existingFile',help='The nvme device or device over switchtec tunnel'"` Controller uint16 `kong:"arg,required,help='controller id'"` Action string `kong:"arg,required,enum='assign,online,offline',help='action to take; one of ${enum}'"` ResourceType string `kong:"arg,optional,enum=',vq,vi',help='resource type; one of ${enum}'"` NumResources uint32 `kong:"arg,optional,default='0',help='number of resources'"` }
VirtualMgmtCmd describes the Virtualization Management command supported by primary controllers that support the Virtualization Enhancements capability.
This command is used for:
- Modifying Flexible Resource allocation for the primary controller
- Assigning Flexible Resources for secondary controllers
- Setting the Online and Offline state for secondary controllers
func (*VirtualMgmtCmd) AfterApply ¶
func (cmd *VirtualMgmtCmd) AfterApply() error
AfterApply will be called after assignment; used here to require arguments for 'assign' action.
func (*VirtualMgmtCmd) Run ¶
func (cmd *VirtualMgmtCmd) Run() error
Run will run the Virtualization Management Command