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

NAS-112721 / 21.10 / Add API call to create directories #7645

Merged
merged 4 commits into from Oct 7, 2021

Conversation

anodos325
Copy link
Contributor

@anodos325 anodos325 commented Oct 7, 2021

Primary use case is to expose ability to create paths inside
cluster volumes for users to share out via SMB or other
file sharing protocols.

Return value is same as entry from filesystem.listdir.

Primary use case is to expose ability to create paths inside
cluster volumes for users to share out via SMB or oher protocols.
@anodos325 anodos325 requested a review from a team October 7, 2021 15:09
@anodos325 anodos325 added the jira label Oct 7, 2021
@bugclerk
Copy link
Contributor

bugclerk commented Oct 7, 2021

@bugclerk bugclerk changed the title Add API call to create directories NAS-112721 / 21.10 / Add API call to create directories Oct 7, 2021
'gid': stat.st_gid,
})
except FileNotFoundError:
data.update({'size': None, 'mode': None, 'acl': None, 'uid': None, 'gid': None})
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a third party here, who knows nothing about cluster, but what does this mean, haven't we just created this path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means that I copy-pasted some things without thinking.

'type': 'DIRECTORY',
}

stat = p.stat()
Copy link
Contributor

Choose a reason for hiding this comment

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

You can move this call just below mkdir and have data in a single dictionary declaration

Int('mode', required=True, null=True),
Bool('acl', required=True, null=True),
Int('uid', required=True, null=True),
Int('gid', required=True, null=True),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why null=True, can these be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy-paste. I'll just change to Ref the path_entry from filesystem.listdir, which was the intention to begin with.

Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

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

Thank you!

@anodos325 anodos325 merged commit ee77f3c into master Oct 7, 2021
@anodos325 anodos325 deleted the add-filesystem-mkdir branch October 7, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants