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

VolumeCreateFromSnapshot and SetTags for FCD volume implementation #346

Merged
merged 3 commits into from
Oct 10, 2019

Conversation

hakanmemisoglu
Copy link
Contributor

@hakanmemisoglu hakanmemisoglu commented Oct 10, 2019

Change Overview

This PR adds:

  • VolumeCreateFromSnapshot
  • SetTags for volumes
  • No op for SetTags for snapshots
  • No op for SnapshotCreateWaitForCompletion

Pull request type

Please check the type of change your PR introduces:

  • Work in Progress
  • Refactoring (no functional changes, no api changes)
  • Trivial/Minor
  • Bugfix
  • Feature
  • Documentation

@hakanmemisoglu hakanmemisoglu changed the title VolumeCreateFromSnapshot and SetTags for volume implementation VolumeCreateFromSnapshot and SetTags for FCD volume implementation Oct 10, 2019
}
_, err = task.Wait(ctx, defaultWaitTime)
if err != nil {
return errors.Wrap(err, "Failed to wait on task")
Copy link
Contributor

Choose a reason for hiding this comment

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

[minor] this method will return nil if err == nil. You don't need to check the error, you can just directly return return errors.Wrap(err, "Failed to wait on task")

@@ -115,7 +143,7 @@ func (p *fcdProvider) SnapshotCreate(ctx context.Context, volume blockstorage.Vo
}

func (p *fcdProvider) SnapshotCreateWaitForCompletion(ctx context.Context, snapshot *blockstorage.Snapshot) error {
return errors.New("Not implemented")
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for making this a noop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SnapshotCreate will block until the snapshot is ready. That's why I decided to make it a noop.

@mergify mergify bot merged commit 60236cd into master Oct 10, 2019
@mergify mergify bot deleted the vmware-fcd-vol-create-from-snap branch October 10, 2019 21:12
@hakanmemisoglu
Copy link
Contributor Author

@tdmanv It got merged before making the fixes. I will do it next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants