Documentation
¶
Index ¶
- type DMRequest
- type DataMovementCommandStatus
- type DataMovementStatusResponse_State
- type DataMovementStatusResponse_Status
- type DataMovementStatusResponse_v1_0
- type Driver
- type DriverRequest
- func (r *DriverRequest) CancelRequest(ctx context.Context, name string) error
- func (r *DriverRequest) Create(ctx context.Context, dmreq DMRequest) (string, *nnfv1alpha9.NnfDataMovement, error)
- func (r *DriverRequest) CreateMock(ctx context.Context, dmreq DMRequest) (string, *nnfv1alpha9.NnfDataMovement, error)
- func (r *DriverRequest) Drive(ctx context.Context, dmreq DMRequest, dm *nnfv1alpha9.NnfDataMovement) error
- func (r *DriverRequest) DriveMock(ctx context.Context, dmreq DMRequest, dm *nnfv1alpha9.NnfDataMovement) error
- func (r *DriverRequest) GetRequest(ctx context.Context, statreq StatusRequest) (*DataMovementStatusResponse_v1_0, int, error)
- func (r *DriverRequest) GetRequestMock(ctx context.Context, statreq StatusRequest) (*DataMovementStatusResponse_v1_0, int, error)
- func (r *DriverRequest) ListRequests(ctx context.Context) ([]string, error)
- type SrvrDataMovementRecord
- type StatusRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DMRequest ¶
type DMRequest struct {
ComputeName string `json:"computeName"`
// Source file or directory
SourcePath string `json:"sourcePath"`
// Destination file or directory
DestinationPath string `json:"destinationPath"`
// If True, the data movement command runs `/bin/true` rather than perform actual data movement
Dryrun bool `json:"dryrun"`
// Extra options to pass to `dcp` if present in the Data Movement command.
DcpOptions string `json:"dcpOptions"`
// If true, enable server-side logging of stdout when the command is successful. Failure output is always logged.
LogStdout bool `json:"logStdout"`
// If true, store stdout in DataMovementStatusResponse.Message when the command is successful. Failure output is always contained in the message.
StoreStdout bool `json:"storeStdout"`
// The number of slots specified in the MPI hostfile. A value of 0 disables the use of slots in
// the hostfile. -1 will defer to the server side configuration.
Slots int32 `json:"slots"`
// The number of max_slots specified in the MPI hostfile. A value of 0 disables the use of
// max_slots in the hostfile. -1 will defer to the server side configuration.
MaxSlots int32 `json:"maxSlots"`
// The name of the data movement configuration profile to use. The above parameters (e.g. slots,
// logStdout) will override the settings defined by the profile. This profile must exist on the
// server otherwise the data movement operation will be invalid. Empty will default to the
// default profile.
DMProfile string `json:"dmProfile"`
// Extra options to pass to `mpirun` if present in the Data Movement command.
MpirunOptions string `json:"mpirunOptions"`
}
DMRequest represents the content of one http request. This has a one-to-one relationship with a DriverRequest object. This is the v1.0 apiVersion. See COPY_OFFLOAD_API_VERSION.
type DataMovementCommandStatus ¶ added in v0.1.16
type DataMovementCommandStatus struct {
// Command used to perform Data Movement
Command string `json:"command,omitempty"`
// Progress percentage (0-100%) of the data movement based on the output of `dcp`. `dcp` must be present in the command.
Progress int32 `json:"progress,omitempty"`
// Duration of how long the operation has been running (e.g. 1m30s)
ElapsedTime string `json:"elapsedTime,omitempty"`
// The most recent line of output from the data movement command
LastMessage string `json:"lastMessage,omitempty"`
// The time (local) of lastMessage
LastMessageTime string `json:"lastMessageTime,omitempty"`
}
Data movement operations contain a CommandStatus in the Status object. This information relays the current state of the data movement progress.
type DataMovementStatusResponse_State ¶ added in v0.1.16
type DataMovementStatusResponse_State string
const ( DataMovementStatusResponse_PENDING DataMovementStatusResponse_State = "pending" // The request is created but has a pending status DataMovementStatusResponse_STARTING DataMovementStatusResponse_State = "starting" // The request was created and is in the act of starting DataMovementStatusResponse_RUNNING DataMovementStatusResponse_State = "running" // The data movement request is actively running DataMovementStatusResponse_COMPLETED DataMovementStatusResponse_State = "completed" // The data movement request has completed DataMovementStatusResponse_CANCELLING DataMovementStatusResponse_State = "cancelling" // The data movement request has started the cancellation process DataMovementStatusResponse_UNKNOWN_STATE DataMovementStatusResponse_State = "unknown state" // Unknown state )
type DataMovementStatusResponse_Status ¶ added in v0.1.16
type DataMovementStatusResponse_Status string
const ( DataMovementStatusResponse_INVALID DataMovementStatusResponse_Status = "invalid" // The request was found to be invalid. See `message` for details DataMovementStatusResponse_NOT_FOUND DataMovementStatusResponse_Status = "not found" // The request with the supplied UID was not found DataMovementStatusResponse_SUCCESS DataMovementStatusResponse_Status = "success" // The request completed with success DataMovementStatusResponse_FAILED DataMovementStatusResponse_Status = "failed" // The request failed. See `message` for details DataMovementStatusResponse_CANCELLED DataMovementStatusResponse_Status = "cancelled" // The request was cancelled DataMovementStatusResponse_UNKNOWN_STATUS DataMovementStatusResponse_Status = "unknown status" // Unknown status )
type DataMovementStatusResponse_v1_0 ¶ added in v0.1.16
type DataMovementStatusResponse_v1_0 struct {
// Current state of the Data Movement Request
State DataMovementStatusResponse_State `json:"state,omitempty"`
// Current status of the Data Movement Request
Status DataMovementStatusResponse_Status `json:"status,omitempty"`
// Any extra information supplied with the state/status
Message string `json:"message,omitempty"`
// Current state/progress of the Data Movement command
CommandStatus *DataMovementCommandStatus `json:"commandStatus,omitempty"`
// The start time (local) of the data movement operation
StartTime string `json:"startTime,omitempty"`
// The end time (local) of the data movement operation
EndTime string `json:"endTime,omitempty"`
}
The Data Movement Status Response message defines the current status of a data movement request. This is the v1.0 apiVersion. See COPY_OFFLOAD_API_VERSION.
type Driver ¶
type Driver struct {
Client client.Client
Log logr.Logger
Mock bool
MockCount int
WorkflowName string
WorkflowNamespace string
// contains filtered or unexported fields
}
Driver will have only one instance per process, shared by all threads in the process.
type DriverRequest ¶
type DriverRequest struct {
Drvr *Driver
// Rabbit node targeted for data movement. This is the local node attach to the requesting
// compute node.
RabbitName string
// contains filtered or unexported fields
}
DriverRequest contains the information that is collected during the initial examination of a given http request. This has a one-to-one relationship with a DMRequest object.
func (*DriverRequest) CancelRequest ¶
func (r *DriverRequest) CancelRequest(ctx context.Context, name string) error
func (*DriverRequest) Create ¶
func (r *DriverRequest) Create(ctx context.Context, dmreq DMRequest) (string, *nnfv1alpha9.NnfDataMovement, error)
func (*DriverRequest) CreateMock ¶
func (r *DriverRequest) CreateMock(ctx context.Context, dmreq DMRequest) (string, *nnfv1alpha9.NnfDataMovement, error)
func (*DriverRequest) Drive ¶
func (r *DriverRequest) Drive(ctx context.Context, dmreq DMRequest, dm *nnfv1alpha9.NnfDataMovement) error
func (*DriverRequest) DriveMock ¶
func (r *DriverRequest) DriveMock(ctx context.Context, dmreq DMRequest, dm *nnfv1alpha9.NnfDataMovement) error
func (*DriverRequest) GetRequest ¶ added in v0.1.16
func (r *DriverRequest) GetRequest(ctx context.Context, statreq StatusRequest) (*DataMovementStatusResponse_v1_0, int, error)
func (*DriverRequest) GetRequestMock ¶ added in v0.1.16
func (r *DriverRequest) GetRequestMock(ctx context.Context, statreq StatusRequest) (*DataMovementStatusResponse_v1_0, int, error)
func (*DriverRequest) ListRequests ¶
func (r *DriverRequest) ListRequests(ctx context.Context) ([]string, error)
type SrvrDataMovementRecord ¶
type SrvrDataMovementRecord struct {
// contains filtered or unexported fields
}
Keep track of the context and its cancel function so that we can track and cancel data movement operations in progress. These objects are stored in the Driver.contexts map.
type StatusRequest ¶ added in v0.1.16
type StatusRequest struct {
// Name of the copy request.
RequestName string `json:"requestName"`
// Max number of seconds to wait for the completion of the copy request.
// A negative number results in an indefinite wait.
MaxWaitSecs int `json:"maxWaitSecs"`
}
StatusRequest represents the content of one http request. This has a one-to-one relationship with a DriverRequest object. This is the v1.0 apiVersion. See COPY_OFFLOAD_API_VERSION.
func (*StatusRequest) Validator ¶ added in v0.1.16
func (m *StatusRequest) Validator() error