-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add resize SDK API for storage pool #1200
Conversation
48f874b
to
471a89b
Compare
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. There is an SDK version update required when a new change is added to proto. @lpabon
cmd/osd/main.go
Outdated
@@ -477,16 +479,20 @@ func start(c *cli.Context) error { | |||
return fmt.Errorf("Unable to Initialise Storage Policy Manager Instances %v", err) | |||
} | |||
|
|||
poolServer := mockapi.NewMockOpenStoragePoolServer(gomock.NewController( |
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.
This should not be mock but an actual server.
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.
removed this from osd main. nil server handler is now being handled.
api/api.proto
Outdated
@@ -232,6 +232,8 @@ message StoragePool { | |||
uint64 Used = 8; | |||
// Labels is a list of user defined name-value pairs | |||
map<string, string> labels = 9; | |||
// UUID is the unique identifier for a storage pool | |||
string UUID = 10; |
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.
value must be in proto style: uuid
not UUID
.
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.
fixed
api/api.proto
Outdated
} | ||
|
||
// Defines the operation types available to resize a storage pool | ||
enum StoragePoolResizeOperationType { |
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.
See #962 . These need to be redone
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.
I need to redo the doc/sdk.md to add this so others know about it.
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. Moved newly added enums inside messages.
api/server/sdk/server.go
Outdated
@@ -468,6 +473,7 @@ func (s *sdkGrpcServer) Start() error { | |||
api.RegisterOpenStorageClusterPairServer(grpcServer, s.clusterPairServer) | |||
api.RegisterOpenStoragePolicyServer(grpcServer, s.policyServer) | |||
api.RegisterOpenStorageClusterDomainsServer(grpcServer, s.clusterDomainsServer) | |||
api.RegisterOpenStoragePoolServer(grpcServer, s.storagePoolServer) |
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.
What happens if the storagepool server handler is 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.
updated PR now handles nil pool server handler.
Also, |
471a89b
to
8ea8c64
Compare
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.
also bumped up the SDK version
api/api.proto
Outdated
@@ -232,6 +232,8 @@ message StoragePool { | |||
uint64 Used = 8; | |||
// Labels is a list of user defined name-value pairs | |||
map<string, string> labels = 9; | |||
// UUID is the unique identifier for a storage pool | |||
string UUID = 10; |
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.
fixed
api/api.proto
Outdated
} | ||
|
||
// Defines the operation types available to resize a storage pool | ||
enum StoragePoolResizeOperationType { |
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. Moved newly added enums inside messages.
api/server/sdk/server.go
Outdated
@@ -468,6 +473,7 @@ func (s *sdkGrpcServer) Start() error { | |||
api.RegisterOpenStorageClusterPairServer(grpcServer, s.clusterPairServer) | |||
api.RegisterOpenStoragePolicyServer(grpcServer, s.policyServer) | |||
api.RegisterOpenStorageClusterDomainsServer(grpcServer, s.clusterDomainsServer) | |||
api.RegisterOpenStoragePoolServer(grpcServer, s.storagePoolServer) |
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.
updated PR now handles nil pool server handler.
cmd/osd/main.go
Outdated
@@ -477,16 +479,20 @@ func start(c *cli.Context) error { | |||
return fmt.Errorf("Unable to Initialise Storage Policy Manager Instances %v", err) | |||
} | |||
|
|||
poolServer := mockapi.NewMockOpenStoragePoolServer(gomock.NewController( |
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.
removed this from osd main. nil server handler is now being handled.
Signed-off-by: Harsh Desai <[email protected]>
- bump SDK version - Fix enums and move them inside message in proto - handle nil SDK server - remove mock storage pool sdk server from osd main Signed-off-by: Harsh Desai <[email protected]>
8ea8c64
to
ab6155d
Compare
Signed-off-by: Harsh Desai <[email protected]>
ab6155d
to
0e9461e
Compare
* Add resize SDK API for storage pool Signed-off-by: Harsh Desai <[email protected]> * Review comments - bump SDK version - Fix enums and move them inside message in proto - handle nil SDK server - remove mock storage pool sdk server from osd main Signed-off-by: Harsh Desai <[email protected]> * rebase with master Signed-off-by: Harsh Desai <[email protected]>
…#1250) * Add resize SDK API for storage pool (#1200) * Add resize SDK API for storage pool Signed-off-by: Harsh Desai <[email protected]> * Review comments - bump SDK version - Fix enums and move them inside message in proto - handle nil SDK server - remove mock storage pool sdk server from osd main Signed-off-by: Harsh Desai <[email protected]> * rebase with master Signed-off-by: Harsh Desai <[email protected]> * fix compile Signed-off-by: Harsh Desai <[email protected]>
…nstorage#1200) (libopenstorage#1250) * Add resize SDK API for storage pool (libopenstorage#1200) * Add resize SDK API for storage pool Signed-off-by: Harsh Desai <[email protected]> * Review comments - bump SDK version - Fix enums and move them inside message in proto - handle nil SDK server - remove mock storage pool sdk server from osd main Signed-off-by: Harsh Desai <[email protected]> * rebase with master Signed-off-by: Harsh Desai <[email protected]> * fix compile Signed-off-by: Harsh Desai <[email protected]>
#1252) * [cherry-pick release-7.0 ]Add resize SDK API for storage pool (#1200) (#1250) * Add resize SDK API for storage pool (#1200) * Add resize SDK API for storage pool Signed-off-by: Harsh Desai <[email protected]> * Review comments - bump SDK version - Fix enums and move them inside message in proto - handle nil SDK server - remove mock storage pool sdk server from osd main Signed-off-by: Harsh Desai <[email protected]> * rebase with master Signed-off-by: Harsh Desai <[email protected]> * fix compile Signed-off-by: Harsh Desai <[email protected]> * fix sdk-version check Signed-off-by: Harsh Desai <[email protected]>
Signed-off-by: Harsh Desai [email protected]
What this PR does / why we need it:
Which issue(s) this PR fixes (optional)
Closes #
Special notes for your reviewer: