10290: Add scheduling_parameters map to containers and container_requests, and move...
[arvados.git] / sdk / go / arvados / container.go
index 6a76f1f396a32c89544f55030cb586ae413d0c0b..61c14ea0b6c1d445bb2a26fb83a57614e0b240f9 100644 (file)
@@ -2,18 +2,19 @@ package arvados
 
 // Container is an arvados#container resource.
 type Container struct {
-       UUID               string             `json:"uuid"`
-       Command            []string           `json:"command"`
-       ContainerImage     string             `json:"container_image"`
-       Cwd                string             `json:"cwd"`
-       Environment        map[string]string  `json:"environment"`
-       LockedByUUID       string             `json:"locked_by_uuid"`
-       Mounts             map[string]Mount   `json:"mounts"`
-       Output             string             `json:"output"`
-       OutputPath         string             `json:"output_path"`
-       Priority           int                `json:"priority"`
-       RuntimeConstraints RuntimeConstraints `json:"runtime_constraints"`
-       State              ContainerState     `json:"state"`
+       UUID                 string               `json:"uuid"`
+       Command              []string             `json:"command"`
+       ContainerImage       string               `json:"container_image"`
+       Cwd                  string               `json:"cwd"`
+       Environment          map[string]string    `json:"environment"`
+       LockedByUUID         string               `json:"locked_by_uuid"`
+       Mounts               map[string]Mount     `json:"mounts"`
+       Output               string               `json:"output"`
+       OutputPath           string               `json:"output_path"`
+       Priority             int                  `json:"priority"`
+       RuntimeConstraints   RuntimeConstraints   `json:"runtime_constraints"`
+       State                ContainerState       `json:"state"`
+       SchedulingParameters SchedulingParameters `json:"scheduling_parameters"`
 }
 
 // Mount is special behavior to attach to a filesystem path or device.
@@ -31,10 +32,15 @@ type Mount struct {
 // CPU) and network connectivity.
 type RuntimeConstraints struct {
        API          *bool
-       RAM          int      `json:"ram"`
-       VCPUs        int      `json:"vcpus"`
-       KeepCacheRAM int      `json:"keep_cache_ram"`
-       Partition    []string `json:"partition"`
+       RAM          int `json:"ram"`
+       VCPUs        int `json:"vcpus"`
+       KeepCacheRAM int `json:"keep_cache_ram"`
+}
+
+// SchedulingParameters specify a container's scheduling parameters
+// such as Partitions
+type SchedulingParameters struct {
+       Partitions []string `json:"partitions"`
 }
 
 // ContainerList is an arvados#containerList resource.