-
Notifications
You must be signed in to change notification settings - Fork 40
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
[storage] Add target to virtio-scsi, clean up virtio-blk #207
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,37 @@ import "object_key.proto"; | |
import "google/protobuf/empty.proto"; | ||
import "google/api/annotations.proto"; | ||
|
||
// Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation emulation and host presentation as alternative to Virtio-blk. | ||
// Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation and host presentation as alternative to Virtio-blk. | ||
service FrontendVirtioScsiService { | ||
rpc CreateVirtioScsiTarget (CreateVirtioScsiTargetRequest) returns (VirtioScsiTarget) { | ||
option (google.api.http) = { | ||
post: "/v1/virtioscsitargets" | ||
body: "virtioscsitarget" | ||
}; | ||
} | ||
rpc DeleteVirtioScsiTarget (DeleteVirtioScsiTargetRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
delete: "/v1/virtioscsitargets/{virtioscsitarget}" | ||
}; | ||
} | ||
rpc UpdateVirtioScsiTarget (UpdateVirtioScsiTargetRequest) returns (VirtioScsiTarget) { | ||
option (google.api.http) = { | ||
patch: "/v1/virtioscsitargets" | ||
body: "virtioscsitarget" | ||
}; | ||
} | ||
rpc ListVirtioScsiTarget (ListVirtioScsiTargetRequest) returns (ListVirtioScsiTargetResponse) { | ||
option (google.api.http) = { | ||
get: "/v1/virtioscsitargets" | ||
}; | ||
} | ||
rpc GetVirtioScsiTarget (GetVirtioScsiTargetRequest) returns (VirtioScsiTarget) { | ||
option (google.api.http) = { | ||
get: "/v1/virtioscsitargets/{virtioscsitarget}" | ||
}; | ||
} | ||
rpc VirtioScsiTargetStats (VirtioScsiTargetStatsRequest) returns (VirtioScsiTargetStatsResponse) {} | ||
|
||
rpc CreateVirtioScsiController (CreateVirtioScsiControllerRequest) returns (VirtioScsiController) { | ||
option (google.api.http) = { | ||
post: "/v1/virtioscsictrls" | ||
|
@@ -75,15 +104,63 @@ service FrontendVirtioScsiService { | |
rpc VirtioScsiLunStats (VirtioScsiLunStatsRequest) returns (VirtioScsiLunStatsResponse) {} | ||
} | ||
|
||
message VirtioScsiTarget { | ||
common.v1.ObjectKey id = 1; | ||
|
||
// maximum LUNs within a target | ||
int32 max_luns = 2; | ||
} | ||
|
||
message VirtioScsiController { | ||
common.v1.ObjectKey id = 1; | ||
|
||
// xPU's PCI ID for the controller | ||
PciEndpoint pcie_id = 2; | ||
} | ||
|
||
message VirtioScsiLun { | ||
common.v1.ObjectKey id = 1; | ||
common.v1.ObjectKey controller_id = 2; | ||
string bdev = 3; | ||
|
||
// The target that this LUN is in | ||
common.v1.ObjectKey target_id = 2; | ||
|
||
// The middle/back-end volume for this LLUN | ||
common.v1.ObjectKey volume_id = 3; | ||
} | ||
|
||
message CreateVirtioScsiTargetRequest { | ||
VirtioScsiTarget target = 1; | ||
} | ||
|
||
message DeleteVirtioScsiTargetRequest { | ||
common.v1.ObjectKey target_id = 1; | ||
} | ||
|
||
message UpdateVirtioScsiTargetRequest { | ||
VirtioScsiTarget target = 1; | ||
} | ||
|
||
message ListVirtioScsiTargetRequest { | ||
int32 page_size = 1; | ||
string page_token = 2; | ||
} | ||
|
||
message ListVirtioScsiTargetResponse { | ||
repeated VirtioScsiTarget targets = 1; | ||
string next_page_token = 2; | ||
} | ||
|
||
message GetVirtioScsiTargetRequest { | ||
common.v1.ObjectKey target_id = 1; | ||
} | ||
|
||
message VirtioScsiTargetStatsRequest { | ||
common.v1.ObjectKey target_id = 1; | ||
} | ||
|
||
message VirtioScsiTargetStatsResponse { | ||
common.v1.ObjectKey id = 1; | ||
string stats = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if this makes any sense, returning a big string for stats; if we are unsure about stats protos, we can remove it from here and introduce if with a bit more structure/thinking later. I'd suggest removing statis req/response all together for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, that would work. |
||
} | ||
|
||
message CreateVirtioScsiControllerRequest { | ||
|
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.
URLs needs hierarchy - hopefully we can do it after this PR; the flattened url names are including the hierarchy in the names explicitly. So the URLs in this and in NVMe protos can be done separately.
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 opened #188 to track the fix of all the URLs at once