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

Implement a restful to create the volume object. #37

Merged
merged 4 commits into from
Jun 25, 2018
Merged

Conversation

hwchiu
Copy link
Contributor

@hwchiu hwchiu commented Jun 24, 2018

An volume object is a PVC used for the container (Pod/Deployment) and it must belong to some exist stroageProvider

@codecov-io
Copy link

codecov-io commented Jun 24, 2018

Codecov Report

Merging #37 into develop will increase coverage by 12.72%.
The diff coverage is 82.05%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop      #37       +/-   ##
============================================
+ Coverage    62.32%   75.05%   +12.72%     
============================================
  Files           14       15        +1     
  Lines          361      477      +116     
============================================
+ Hits           225      358      +133     
+ Misses         124      105       -19     
- Partials        12       14        +2
Impacted Files Coverage Δ
src/server/handler_volume.go 81.25% <81.25%> (ø)
src/server/route.go 58.33% <85.71%> (+8.33%) ⬆️
src/net/http/handler.go 100% <0%> (ø) ⬆️
src/kubernetes/kubectl.go 100% <0%> (ø) ⬆️
src/net/http/response.go 93.65% <0%> (+0.62%) ⬆️
src/server/handler_storage_provider.go 97.14% <0%> (+5.14%) ⬆️
src/kubernetes/nodes.go 96.42% <0%> (+6.42%) ⬆️
src/server/handler_network.go 67.4% <0%> (+21.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1768230...f8087cc. Read the comment docs.

"testing"
"time"

"github.com/docker/docker/pkg/namesgenerator"
Copy link
Contributor

Choose a reason for hiding this comment

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

use github.com/moby/moby/pkg/namesgenerator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I just copy the line here lol.
https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go#L1
I will replace all from docker to moby in another PR.
Since all PR use the docker now (including the vendor.json).

assert.Equal(suite.T(), volume.Capacity, retVolume.Capacity)
assert.NotEqual(suite.T(), "", retVolume.MetaName)

//Empty daa
Copy link
Contributor

@John-Lin John-Lin Jun 24, 2018

Choose a reason for hiding this comment

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

empty data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Empty data in the HTTP request and it will cause the read entity error.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but I mean the comment has typo lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

XD. ok

// Check whether this displayname has been used
volume.ID = bson.NewObjectId()
volume.CreatedAt = timeutils.Now()
//Generate the metaName for furture use
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what is furture? Did you mean future?
Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

seems typo

@sufuf3 sufuf3 self-requested a review June 25, 2018 07:20
@hwchiu hwchiu merged commit 004f168 into develop Jun 25, 2018
@hwchiu hwchiu deleted the hwchiu/VX-104 branch June 25, 2018 07:27
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
Implement a restful to create the volume object.

Former-commit-id: f79b7be85c712cbadc137738f36a334bcb84b344 [formerly 004f168]
Former-commit-id: 92e9310eacd956ac5b009d0991d46ec7be7ad6a3
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
Implement a restful to create the volume object.

Former-commit-id: f79b7be85c712cbadc137738f36a334bcb84b344 [formerly f79b7be85c712cbadc137738f36a334bcb84b344 [formerly 004f168]]
Former-commit-id: 92e9310eacd956ac5b009d0991d46ec7be7ad6a3
Former-commit-id: 5b10d57
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
Implement a restful to create the volume object.
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.

4 participants