mirror of
https://github.com/cristicalin/synology-csi.git
synced 2026-05-07 21:42:39 +00:00
Update to version 1.1.0
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/SynologyOpenSource/synology-csi/pkg/dsm/webapi"
|
||||
)
|
||||
|
||||
@@ -10,21 +12,43 @@ type CreateK8sVolumeSpec struct {
|
||||
DsmIp string
|
||||
K8sVolumeName string
|
||||
LunName string
|
||||
ShareName string
|
||||
Location string
|
||||
Size int64
|
||||
Type string
|
||||
ThinProvisioning bool
|
||||
TargetName string
|
||||
TargetIqn string
|
||||
MultipleSession bool
|
||||
SourceSnapshotId string
|
||||
SourceVolumeId string
|
||||
Protocol string
|
||||
}
|
||||
|
||||
type ListK8sVolumeRespSpec struct {
|
||||
DsmIp string
|
||||
Lun webapi.LunInfo
|
||||
Target webapi.TargetInfo
|
||||
type K8sVolumeRespSpec struct {
|
||||
DsmIp string
|
||||
VolumeId string
|
||||
SizeInBytes int64
|
||||
Location string
|
||||
Name string
|
||||
Source string
|
||||
Lun webapi.LunInfo
|
||||
Target webapi.TargetInfo
|
||||
Share webapi.ShareInfo
|
||||
Protocol string
|
||||
}
|
||||
|
||||
type K8sSnapshotRespSpec struct {
|
||||
DsmIp string
|
||||
Name string
|
||||
Uuid string
|
||||
ParentName string
|
||||
ParentUuid string
|
||||
Status string
|
||||
SizeInBytes int64
|
||||
CreateTime int64
|
||||
Time string // only for share snapshot delete
|
||||
RootPath string
|
||||
Protocol string
|
||||
}
|
||||
|
||||
type CreateK8sVolumeSnapshotSpec struct {
|
||||
@@ -33,4 +57,24 @@ type CreateK8sVolumeSnapshotSpec struct {
|
||||
Description string
|
||||
TakenBy string
|
||||
IsLocked bool
|
||||
}
|
||||
}
|
||||
|
||||
type NodeStageVolumeSpec struct {
|
||||
VolumeId string
|
||||
StagingTargetPath string
|
||||
VolumeCapability *csi.VolumeCapability
|
||||
Dsm string
|
||||
Source string
|
||||
}
|
||||
|
||||
type ByVolumeId []*K8sVolumeRespSpec
|
||||
func (a ByVolumeId) Len() int { return len(a) }
|
||||
func (a ByVolumeId) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a ByVolumeId) Less(i, j int) bool { return a[i].VolumeId < a[j].VolumeId }
|
||||
|
||||
type BySnapshotAndParentUuid []*K8sSnapshotRespSpec
|
||||
func (a BySnapshotAndParentUuid) Len() int { return len(a) }
|
||||
func (a BySnapshotAndParentUuid) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a BySnapshotAndParentUuid) Less(i, j int) bool {
|
||||
return fmt.Sprintf("%s/%s", a[i].ParentUuid, a[i].Uuid) < fmt.Sprintf("%s/%s", a[j].ParentUuid, a[j].Uuid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user