-
Notifications
You must be signed in to change notification settings - Fork 311
AccessApi for fileshare POST, GET , PUT, DELETE #732
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
AccessApi for fileshare POST, GET , PUT, DELETE #732
Conversation
wisererik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use lowercase in error log
pkg/api/controllers/fileshare.go
Outdated
| } | ||
| // Unmarshal the request body | ||
| if err := json.NewDecoder(f.Ctx.Request.Body).Decode(&fileshareacl); err != nil { | ||
| reason := fmt.Sprintf("Parse fileshare access rules request body failed: %s", err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
testutils/collection/data.go
Outdated
| BaseModel: &model.BaseModel{ | ||
| Id: "d2975ebe-d82c-430f-b28e-f373746a71ca", | ||
| }, | ||
| Description: "This is a sample fileshare for testing", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change description
|
@PravinRanjan10 It looks like you created a new repo under the opensds org by accident: https://github.com/opensds/AccessApi. I'm going to delete that repo. Please save your work. |
Yeah..To just have backup the code i have created. You may delete it. I have backup in local machine. Thanks |
|
Ok. Will do. Thanks. |
pkg/db/drivers/etcd/etcd.go
Outdated
|
|
||
| func (c *Client) CreateFileShare(ctx *c.Context, fshare *model.FileShareSpec) (*model.FileShareSpec, error) { | ||
| //profiles, err := c.ListProfiles(ctx) | ||
| //if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused codes
| _, err := db.C.GetFileShare(ctx, in.FileShareId) | ||
| if err != nil { | ||
| log.Error("FileshareID is not valid: ", err) | ||
| return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilesareID -> file share id
wisererik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
xing-yang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase. After that, this can be merged.
| uuid "github.com/satori/go.uuid" | ||
| ) | ||
|
|
||
| //function to store filesahreAcl metadata into database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add space after //
leonwanghui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
It stores the metadata of access rule for fileshare based
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: