Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
feat(controller): volume cloning
Browse files Browse the repository at this point in the history
closes #21
  • Loading branch information
paullaffitte committed Apr 1, 2021
1 parent b045d06 commit 30f6257
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (controller *Controller) ControllerGetCapabilities(ctx context.Context, req
csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME,
csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT,
csi.ControllerServiceCapability_RPC_LIST_SNAPSHOTS,
// csi.ControllerServiceCapability_RPC_CLONE_VOLUME,
csi.ControllerServiceCapability_RPC_CLONE_VOLUME,
csi.ControllerServiceCapability_RPC_EXPAND_VOLUME,
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ func (controller *Controller) CreateVolume(ctx context.Context, req *csi.CreateV
}

if sourceID != "" {
controller.dothillClient.VolumeCopy(sourceID, volumeID, parameters[common.PoolConfigKey])
_, _, err = controller.dothillClient.CopyVolume(sourceID, volumeID, parameters[common.PoolConfigKey])
} else {
_, _, err = controller.dothillClient.CreateVolume(volumeID, sizeStr, parameters[common.PoolConfigKey])
if err != nil {
return nil, err
}
}
if err != nil {
return nil, err
}
}

Expand Down

0 comments on commit 30f6257

Please sign in to comment.