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

STG98 - NFS over REST #44268

Open
wants to merge 6 commits into
base: feature/storage/stg98base
Choose a base branch
from

Conversation

gunjansingh-msft
Copy link
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Feb 19, 2025
@ibrandes ibrandes changed the title Stg98/feature/nf sover rest STG98 - NFS over REST Feb 19, 2025
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure:azure-storage-file-share

*/
public Mono<Response<ShareFileSymbolicLinkInfo>> getSymbolicLinkWithResponse() {
try {
return withContext(context -> getSymbolicLinkWithResponse(context));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be replaced with a lambda expression, return withContext(this::getSymbolicLinkWithResponse);

ShareRequestConditions requestConditions, Context context) {
context = context == null ? Context.NONE : context;
return this.azureFileStorageClient.getFiles()
.createSymbolicLinkWithResponseAsync(shareName, filePath, linkText, null, null, null, null, null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want to make sure to pass in our options here, so we will have to change the signature to accommodate this. specifically, we need to make sure we pass in metadata, fileCreationTime, fileLastWriteTime, owner, and group.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, fileCreationTime and fileLastWriteTime are OffsetDateTime in our options bag, but they need to be a string to be passed into the implementation method. you can use this util method to convert it:

String fileCreationTimeString = FileSmbProperties.parseFileSMBDate(fileCreationTime);

Mono<Response<ShareFileSymbolicLinkInfo>> getSymbolicLinkWithResponse(Context context) {
context = context == null ? Context.NONE : context;
return this.azureFileStorageClient.getFiles()
.getSymbolicLinkWithResponseAsync(shareName, filePath, null, null, null, context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want to make sure to pass in the snapshot here:

.getSymbolicLinkWithResponseAsync(shareName, filePath, null, snapshot, null, context)


Mono<Response<ShareFileInfo>> createSymbolicLinkWithResponse(String linkText,
ShareRequestConditions requestConditions, Context context) {
context = context == null ? Context.NONE : context;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a null check for requestConditions, as if it is null and we call requestConditions.getLeaseId() it will throw an error.

requestConditions = requestConditions == null ? new ShareRequestConditions() : requestConditions;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants