Skip to content

Commit

Permalink
Add Devices protos
Browse files Browse the repository at this point in the history
Adds the protocol buffers needed to support allocation of devices in
swarmkit. Part of the proposal in moby#2682.

Signed-off-by: Drew Erny <[email protected]>
  • Loading branch information
dperny committed Aug 27, 2018
1 parent 27f5625 commit cdc3267
Show file tree
Hide file tree
Showing 8 changed files with 2,138 additions and 580 deletions.
141 changes: 141 additions & 0 deletions api/api.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4063,6 +4063,54 @@ file {
}
}
}
message_type {
name: "Device"
field {
name: "device_class_id"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "deviceClassId"
}
field {
name: "path_on_host"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "pathOnHost"
}
}
message_type {
name: "DeviceAttachment"
field {
name: "device_class_id"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "deviceClassId"
}
field {
name: "path_on_host"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "pathOnHost"
}
field {
name: "path_in_task"
number: 3
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "pathInTask"
}
field {
name: "device_cgroup_rules"
number: 16
label: LABEL_REPEATED
type: TYPE_STRING
json_name: "deviceCgroupRules"
}
}
enum_type {
name: "ResourceType"
value {
Expand Down Expand Up @@ -4385,6 +4433,14 @@ file {
type_name: ".docker.swarmkit.v1.NodeSpec.Availability"
json_name: "availability"
}
field {
name: "devices"
number: 5
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.Device"
json_name: "devices"
}
enum_type {
name: "Membership"
value {
Expand Down Expand Up @@ -4654,6 +4710,30 @@ file {
json_name: "payload"
}
}
message_type {
name: "DeviceAttachmentSpec"
field {
name: "device_class"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "deviceClass"
}
field {
name: "path"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "path"
}
field {
name: "device_cgroup_rules"
number: 16
label: LABEL_REPEATED
type: TYPE_STRING
json_name: "deviceCgroupRules"
}
}
message_type {
name: "NetworkAttachmentSpec"
field {
Expand Down Expand Up @@ -5241,6 +5321,27 @@ file {
json_name: "templating"
}
}
message_type {
name: "DeviceClassSpec"
field {
name: "annotations"
number: 1
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.Annotations"
options {
65001: 0
}
json_name: "annotations"
}
field {
name: "shared"
number: 3
label: LABEL_OPTIONAL
type: TYPE_BOOL
json_name: "shared"
}
}
syntax: "proto3"
}
file {
Expand Down Expand Up @@ -5989,6 +6090,14 @@ file {
type_name: ".docker.swarmkit.v1.GenericResource"
json_name: "assignedGenericResources"
}
field {
name: "devices"
number: 16
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.DeviceAttachment"
json_name: "devices"
}
options {
70001 {
1 {
Expand Down Expand Up @@ -6349,6 +6458,38 @@ file {
}
}
}
message_type {
name: "DeviceClass"
field {
name: "id"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "id"
}
field {
name: "meta"
number: 2
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.Meta"
options {
65001: 0
}
json_name: "meta"
}
field {
name: "spec"
number: 3
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".docker.swarmkit.v1.DeviceClassSpec"
options {
65001: 0
}
json_name: "spec"
}
}
message_type {
name: "Resource"
field {
Expand Down
5 changes: 5 additions & 0 deletions api/ca.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cdc3267

Please sign in to comment.