Skip to content

Commit

Permalink
[chore] allow create volume from snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed May 29, 2024
1 parent 5702d47 commit 4bf4e16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vngcloud/services/volume/v2/blockvolume_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ func (s *CreateBlockVolumeRequest) WithSize(psize int64) ICreateBlockVolumeReque
return s
}

func (s *CreateBlockVolumeRequest) WithCreateFrom(pcreateFrom CreateVolumeFrom) ICreateBlockVolumeRequest {
s.CreatedFrom = pcreateFrom
return s
}

func (s *CreateBlockVolumeRequest) WithVolumeType(pvolumeTypeId string) ICreateBlockVolumeRequest {
s.VolumeTypeId = pvolumeTypeId
return s
Expand Down
1 change: 1 addition & 0 deletions vngcloud/services/volume/v2/irequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type ICreateBlockVolumeRequest interface {
WithAutoRenew(pval bool) ICreateBlockVolumeRequest
WithMultiAttach(pmultiAttach bool) ICreateBlockVolumeRequest
WithSize(psize int64) ICreateBlockVolumeRequest
WithCreateFrom(pcreateFrom CreateVolumeFrom) ICreateBlockVolumeRequest
WithVolumeType(pvolumeTypeId string) ICreateBlockVolumeRequest
WithVolumeRestoreFromSnapshot(psnapshotID, pvolumeTypeID string) ICreateBlockVolumeRequest
WithTags(ptags ...string) ICreateBlockVolumeRequest
Expand Down

0 comments on commit 4bf4e16

Please sign in to comment.