private String createTargetShare(
      OpenstackFileCloneVolumesContext context,
      OpenstackFileCloneVolumeStatus status,
      boolean source)
      throws CloudClientException {
    String snapshotId;
    if (source) {
      // snapshotId = status.volumeToBeCloned.sourceVolumeId; TODO: why does AWS do it this way?
      // wrong value is passed here
      snapshotId = status.sourceSnapshotId;
    } else {
      snapshotId = status.volumeToBeCloned.targetVolumeId;
    }
    ShareSnapshot snapshot = openstackClient.getSnapshot(snapshotId);
    String shareType = null;

    if (status.volumeToBeCloned.isSourceVolumeSnapshot) {
      shareType = "standard";
    } else {
      String volumeId = status.volumeToBeCloned.sourceVolumeId;
      Share sourceVolume = openstackClient.getShare(volumeId);
      shareType = sourceVolume.getShareType();
    }
    String shareName = status.volumeToBeCloned.targetVolumeName;
    Share share = openstackClient.createShareFromSnapshot(shareName, snapshot, shareType);
    status.targetVolumeId = share.getId();
    logger.log(
        IJavaEeLog.SEVERITY_DEBUG,
        this.getClass().getName(),
        "getOperationStatus: operationId: "
            + context.operationId
            + " creating volume: "
            + share.getId(),
        null);
    return share.getId();
  }