Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STG96 - Provisioned v2 billing model for Azure Files #41995

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file-share/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/storage/azure-storage-file-share",
"Tag": "java/storage/azure-storage-file-share_4152d3ba84"
"Tag": "java/storage/azure-storage-file-share_076ef47a13"
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ Mono<Response<ShareInfo>> createWithResponse(ShareCreateOptions options, Context
.createNoCustomHeadersWithResponseAsync(shareName, null, options.getMetadata(), options.getQuotaInGb(),
options.getAccessTier(), enabledProtocol, options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), context)
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), context)
.map(ModelHelper::mapToShareInfoResponse);
}

Expand Down Expand Up @@ -940,8 +941,9 @@ Mono<Response<ShareInfo>> setPropertiesWithResponse(ShareSetPropertiesOptions op
return azureFileStorageClient.getShares().setPropertiesNoCustomHeadersWithResponseAsync(shareName, null,
options.getQuotaInGb(), options.getAccessTier(), requestConditions.getLeaseId(), options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), context)
.map(ModelHelper::mapToShareInfoResponse);
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), context)
.map(ModelHelper::mapToShareInfoResponse);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ public Response<ShareInfo> createWithResponse(ShareCreateOptions options, Durati
.createNoCustomHeadersWithResponse(shareName, null, finalOptions.getMetadata(), finalOptions.getQuotaInGb(),
finalOptions.getAccessTier(), finalEnabledProtocol, finalOptions.getRootSquash(),
finalOptions.isSnapshotVirtualDirectoryAccessEnabled(), finalOptions.isPaidBurstingEnabled(),
finalOptions.getPaidBurstingMaxBandwidthMibps(), finalOptions.getPaidBurstingMaxIops(), finalContext);
finalOptions.getPaidBurstingMaxBandwidthMibps(), finalOptions.getPaidBurstingMaxIops(),
finalOptions.getProvisionedMaxIops(), finalOptions.getProvisionedMaxBandwidthMibps(), finalContext);

return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class));
}
Expand Down Expand Up @@ -891,7 +892,8 @@ public Response<ShareInfo> setPropertiesWithResponse(ShareSetPropertiesOptions o
.setPropertiesNoCustomHeadersWithResponse(shareName, null, options.getQuotaInGb(), options.getAccessTier(),
requestConditions.getLeaseId(), options.getRootSquash(),
options.isSnapshotVirtualDirectoryAccessEnabled(), options.isPaidBurstingEnabled(),
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(), finalContext);
options.getPaidBurstingMaxBandwidthMibps(), options.getPaidBurstingMaxIops(),
options.getProvisionedMaxIops(), options.getProvisionedMaxBandwidthMibps(), finalContext);

return ModelHelper.mapToShareInfoResponse(sendRequest(operation, timeout, ShareStorageException.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,9 @@ public PollerFlux<ShareFileCopyInfo, Void> beginCopy(String sourceUrl, ShareFile
try {
return withContext(context -> azureFileStorageClient.getFiles()
.startCopyWithResponseAsync(shareName, filePath, copySource, null,
options.getMetadata(), options.getFilePermission(), tempSmbProperties.getFilePermissionKey(),
finalRequestConditions.getLeaseId(), copyFileSmbInfo, context))
options.getMetadata(), options.getFilePermission(), null,
tempSmbProperties.getFilePermissionKey(), finalRequestConditions.getLeaseId(),
copyFileSmbInfo, context))
.map(response -> {
final FilesStartCopyHeaders headers = response.getDeserializedHeaders();
copyId.set(headers.getXMsCopyId());
Expand Down Expand Up @@ -1234,7 +1235,7 @@ private Mono<ResponseBase<FilesDownloadHeaders, Flux<ByteBuffer>>> downloadRange
Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Context context) {
String rangeString = range == null ? null : range.toHeaderValue();
return azureFileStorageClient.getFiles().downloadWithResponseAsync(shareName, filePath, null,
rangeString, rangeGetContentMD5, requestConditions.getLeaseId(), context);
rangeString, rangeGetContentMD5, null, requestConditions.getLeaseId(), context);
}

/**
Expand Down Expand Up @@ -2289,8 +2290,8 @@ Mono<Response<ShareFileUploadInfo>> uploadRangeWithResponse(ShareFileUploadRange

return azureFileStorageClient.getFiles()
.uploadRangeWithResponseAsync(shareName, filePath, range.toString(), ShareFileRangeWriteType.UPDATE,
options.getLength(), null, null, requestConditions.getLeaseId(), options.getLastWrittenMode(), data,
context)
options.getLength(), null, null, requestConditions.getLeaseId(), options.getLastWrittenMode(),
null, null, data, context)
.map(ModelHelper::uploadRangeHeadersToShareFileInfo);
}

Expand Down Expand Up @@ -2566,7 +2567,8 @@ Mono<Response<ShareFileUploadInfo>> clearRangeWithResponse(long length, long off
context = context == null ? Context.NONE : context;
return azureFileStorageClient.getFiles()
.uploadRangeWithResponseAsync(shareName, filePath, range.toString(), ShareFileRangeWriteType.CLEAR,
0L, null, null, requestConditions.getLeaseId(), null, (Flux<ByteBuffer>) null, context)
0L, null, null, requestConditions.getLeaseId(), null,
null, null, (Flux<ByteBuffer>) null, context)
.map(ModelHelper::transformUploadResponse);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ public SyncPoller<ShareFileCopyInfo, Void> beginCopy(String sourceUrl, ShareFile
(pollingContext) -> {
ResponseBase<FilesStartCopyHeaders, Void> response = azureFileStorageClient.getFiles()
.startCopyWithResponse(shareName, filePath, copySource, null, options.getMetadata(),
options.getFilePermission(), tempSmbProperties.getFilePermissionKey(),
options.getFilePermission(), null, tempSmbProperties.getFilePermissionKey(),
finalRequestConditions.getLeaseId(), copyFileSmbInfo, null);

FilesStartCopyHeaders headers = response.getDeserializedHeaders();
Expand Down Expand Up @@ -2383,7 +2383,8 @@ public Response<ShareFileUploadInfo> clearRangeWithResponse(long length, long of
Context finalContext = context == null ? Context.NONE : context;
Callable<ResponseBase<FilesUploadRangeHeaders, Void>> operation = () -> this.azureFileStorageClient.getFiles()
.uploadRangeWithResponse(shareName, filePath, range.toString(), ShareFileRangeWriteType.CLEAR, 0L, null,
null, finalRequestConditions.getLeaseId(), null, null, finalContext);
null, finalRequestConditions.getLeaseId(), null, null,
null, null, finalContext);

return ModelHelper.transformUploadResponse(sendRequest(operation, timeout, ShareStorageException.class));
}
Expand Down
Loading
Loading