-
Notifications
You must be signed in to change notification settings - Fork 346
MNFS-164: Added NFS resize and snapshot APIs #921
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
MNFS-164: Added NFS resize and snapshot APIs #921
Conversation
nfs.go
Outdated
| // Region is the datacenter region where the NFS snapshot is located | ||
| Region string `json:"region"` | ||
| // Status represents the current status of the NFS snapshot | ||
| Status string `json:"status"` |
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.
Can this status be an enum
nfs.go
Outdated
| } | ||
|
|
||
| // List returns a list of NFS snapshots. | ||
| func (s *NfsServiceOp) ListSnapshots(ctx context.Context, opts *ListOptions, id, region string) ([]*NfsSnapshot, *Response, 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.
| func (s *NfsServiceOp) ListSnapshots(ctx context.Context, opts *ListOptions, id, region string) ([]*NfsSnapshot, *Response, error) { | |
| func (s *NfsServiceOp) ListSnapshots(ctx context.Context, opts *ListOptions, shareID, region string) ([]*NfsSnapshot, *Response, error) { |
nfs_actions.go
Outdated
| "net/http" | ||
| ) | ||
|
|
||
| // NfsActionsService is an interface for interfacing with the NFS actions |
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.
| // NfsActionsService is an interface for interfacing with the NFS actions | |
| // NfsActionsService is an interface for interacting with the NFS actions |
nfs_actions.go
Outdated
| // endpoints of the DigitalOcean API | ||
| // See: https://docs.digitalocean.com/reference/api/api-reference/#tag/NFS-Actions | ||
| type NfsActionsService interface { | ||
| Resize(context.Context, string, uint64, string) (*Action, *Response, 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.
| Resize(context.Context, string, uint64, string) (*Action, *Response, error) | |
| Resize(context.Context, shareID string, size uint64, region string) (*Action, *Response, error) |
nfs.go
Outdated
| // List retrieves a list of NFS shares filtered by region | ||
| List(context.Context, *ListOptions, string) ([]*Nfs, *Response, error) | ||
| // Create creates a new NFS share with the provided configuration | ||
| Create(context.Context, *NfsCreateRequest) (*Nfs, *Response, error) | ||
| // Delete removes an NFS share by its ID and region | ||
| Delete(context.Context, string, string) (*Response, error) | ||
| // Get retrieves a specific NFS share by its ID and region | ||
| Get(context.Context, string, string) (*Nfs, *Response, error) | ||
| // List retrieves a list of NFS snapshots filtered by an optional share ID and region | ||
| ListSnapshots(context.Context, *ListOptions, string, string) ([]*NfsSnapshot, *Response, error) | ||
| // Get retrieves a specific NFS snapshot by its ID and region | ||
| GetSnapshot(context.Context, string, string) (*NfsSnapshot, *Response, error) | ||
| // Delete removes an NFS snapshot by its ID and region | ||
| DeleteSnapshot(context.Context, string, string) (*Response, 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.
Add vars meaningful names
singhsaubhikdo
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
Part of MNFS-164. Follow up of #912. Adding NFS resize and snapshot APIs and corresponding tests to godo.