| // Copyright 2018 The LUCI Authors. All rights reserved. |
| // Use of this source code is governed under the Apache License, Version 2.0 |
| // that can be found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| option go_package = "go.chromium.org/luci/gce/api/tasks/v1;tasks"; |
| |
| package tasks; |
| |
| import "google/protobuf/timestamp.proto"; |
| import "go.chromium.org/luci/gce/api/config/v1/config.proto"; |
| |
| // A task to count the VMs in a config. |
| message CountVMs { |
| // The ID of the config whose VMs to count. |
| string id = 1; |
| } |
| |
| // A task to create a GCE instance from a VM. |
| message CreateInstance { |
| // The ID of the VM to create a GCE instance from. |
| string id = 1; |
| } |
| |
| // A task to delete a Swarming bot associated with a VM. |
| message DeleteBot { |
| // The ID of the VM to delete a Swarming bot for. |
| string id = 1; |
| // The hostname of the Swarming bot to delete. |
| string hostname = 2; |
| } |
| |
| // A task to destroy a GCE instance created from a VM. |
| message DestroyInstance { |
| // The ID of the VM to destroy a GCE instance for. |
| string id = 1; |
| // The URL of the GCE instance to destroy. |
| string url = 2; |
| } |
| |
| // A task to create a particular VM. |
| message CreateVM { |
| // The ID of the VM to create. |
| string id = 1; |
| // The attributes of the VM. |
| config.VM attributes = 2; |
| // The ID of the config this VM belongs to. |
| string config = 3; |
| // The timestamp when this task was created. |
| google.protobuf.Timestamp created = 4; |
| // The index of the VM to create. |
| int32 index = 5; |
| // The lifetime of the VM in seconds. |
| int64 lifetime = 6; |
| // The prefix to use when naming this VM. |
| string prefix = 7; |
| // The config revision this VM is created from. |
| string revision = 8; |
| // The hostname of the Swarming server this VM connects to. |
| string swarming = 9; |
| // The timeout of the VM in seconds. |
| int64 timeout = 10; |
| // the lab DUT assigned to the VM. |
| string DUT = 11; |
| } |
| |
| // A task to expand a config. |
| message ExpandConfig { |
| // The ID of the config to expand. |
| string id = 1; |
| } |
| |
| // A task to manage a Swarming bot associated with a VM. |
| message ManageBot { |
| // The ID of the VM to manage a Swarming bot for. |
| string id = 1; |
| } |
| |
| // A task to report GCE quota utilization. |
| message ReportQuota { |
| // The ID of the project to report quota utilization for. |
| string id = 1; |
| } |
| |
| // A task to terminate a Swarming bot associated with a VM. |
| message TerminateBot { |
| // The ID of the VM to terminate a Swarming bot for. |
| string id = 1; |
| // The hostname of the Swarming bot to terminate. |
| string hostname = 2; |
| } |
| |
| // A task to audit the project and instances alive within the project |
| message AuditProject { |
| // The name of the project to audit |
| string project = 1; |
| // The GCE zone to audit |
| string zone = 2; |
| // Page token to use with the query |
| string pageToken = 3; |
| } |
| |
| // A task to drain/delete the VMs and instances that are no longer needed |
| message DrainVM { |
| // The name of the VM to drain |
| string id = 1; |
| } |
| |
| // A task to inspect all the bots in swarming |
| message InspectSwarming { |
| // The name of the swarming service to inspect |
| string swarming = 1; |
| // The cursor for the swarming list query |
| string cursor = 2; |
| } |
| |
| // A task to delete bot that is stale in swarming. |
| message DeleteStaleSwarmingBot { |
| // The name of the bot to delete. |
| string id = 1; |
| // The first seen timestamp of the bot |
| string firstSeenTs = 2; |
| } |
| |
| // A task to delete bots that are stale in swarming |
| message DeleteStaleSwarmingBots { |
| // The DeleteStaleSwarmingBot payload for the bot |
| repeated DeleteStaleSwarmingBot bots = 1; |
| } |