-
Notifications
You must be signed in to change notification settings - Fork 63
Adding GetAttachState and SetAttachState to disk api group #95
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
Changes from all commits
761d078
f5fa65d
f2b10ba
547f2fb
89550d5
14f20bf
e64d171
45a09aa
f76ba87
56e6dbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package v1beta2; | ||
|
|
||
| option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2"; | ||
|
|
||
| service Disk { | ||
| // ListDiskLocations returns locations <Adapter, Bus, Target, LUN ID> of all | ||
| // disk devices enumerated by the host | ||
| rpc ListDiskLocations(ListDiskLocationsRequest) returns (ListDiskLocationsResponse) {} | ||
|
|
||
| // PartitionDisk initializes and partitions a disk device (if the disk has not | ||
| // been partitioned already) and returns the resulting volume device ID | ||
| rpc PartitionDisk(PartitionDiskRequest) returns (PartitionDiskResponse) {} | ||
|
|
||
| // Rescan refreshes the host's storage cache | ||
| rpc Rescan(RescanRequest) returns (RescanResponse) {} | ||
|
|
||
| // ListDiskIDs returns a map of DiskID objects where the key is the disk number | ||
| rpc ListDiskIDs(ListDiskIDsRequest) returns (ListDiskIDsResponse) {} | ||
|
|
||
| // DiskStats returns the stats for the disk | ||
| rpc DiskStats(DiskStatsRequest) returns (DiskStatsResponse) {} | ||
|
|
||
| // SetAttachState sets the offline/online state of a disk | ||
| rpc SetAttachState(SetAttachStateRequest) returns (SetAttachStateResponse) {} | ||
|
|
||
| // GetAttachState gets the offline/online state of a disk | ||
| rpc GetAttachState(GetAttachStateRequest) returns (GetAttachStateResponse) {} | ||
| } | ||
|
|
||
| message ListDiskLocationsRequest { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| message DiskLocation { | ||
| string Adapter = 1; | ||
| string Bus = 2; | ||
| string Target = 3; | ||
| string LUNID = 4; | ||
| } | ||
|
|
||
| message ListDiskLocationsResponse { | ||
| // Map of disk device IDs and <adapter, bus, target, lun ID> associated with each disk device | ||
| map <string, DiskLocation> disk_locations = 1; | ||
| } | ||
|
|
||
| message PartitionDiskRequest { | ||
| // Disk device ID of the disk to partition | ||
| string diskID = 1; | ||
| } | ||
|
|
||
| message PartitionDiskResponse { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| message RescanRequest { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| message RescanResponse { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| message ListDiskIDsRequest { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| message DiskIDs { | ||
| // Map of Disk ID types and Disk ID values | ||
| map <string, string> identifiers = 1; | ||
| } | ||
|
|
||
| message ListDiskIDsResponse { | ||
| // Map of disk device numbers and IDs <page83> associated with each disk device | ||
| map <string, DiskIDs> diskIDs = 1; | ||
| } | ||
|
|
||
| message DiskStatsRequest { | ||
| // Disk device ID of the disk to get the size from | ||
| string diskID = 1; | ||
| } | ||
|
|
||
| message DiskStatsResponse { | ||
| //Total size of the volume | ||
| int64 diskSize = 1; | ||
| } | ||
|
|
||
| message SetAttachStateRequest { | ||
| // Disk device ID (number) of the disk which state will change | ||
| string diskID = 1; | ||
|
|
||
| // Online state to set for the disk. true for online, false for offline | ||
| bool isOnline = 2; | ||
| } | ||
|
|
||
| message SetAttachStateResponse { | ||
| } | ||
|
|
||
| message GetAttachStateRequest { | ||
| // Disk device ID (number) of the disk | ||
| string diskID = 1; | ||
| } | ||
|
|
||
| message GetAttachStateResponse { | ||
| // Online state of the disk. true for online, false for offline | ||
| bool isOnline = 1; | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 you also add a
GetAttachStateplease?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.
Added, PTAL