| // Copyright 2017 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/machine-db/api/crimson/v1;crimson"; |
| |
| package crimson; |
| |
| import "google/protobuf/field_mask.proto"; |
| import "go.chromium.org/luci/machine-db/api/common/v1/states.proto"; |
| |
| // A machine in the database. |
| message Machine { |
| // The name of this machine. Uniquely identifies this machine. |
| string name = 1; |
| // The type of platform this machine is. |
| string platform = 2; |
| // The rack this machine belongs to. |
| string rack = 3; |
| // A description of this machine. |
| string description = 4; |
| // The asset tag associated with this machine. |
| string asset_tag = 5; |
| // The service tag associated with this machine. |
| string service_tag = 6; |
| // The deployment ticket associated with this machine. |
| string deployment_ticket = 7; |
| // The state of this machine. |
| common.State state = 8; |
| // The datacenter this machine belongs to. |
| // When creating a machine, omit this field. It will be inferred from the rack. |
| string datacenter = 9; |
| // The DRAC password associated with this machine. |
| string drac_password = 10; |
| } |
| |
| // A request to create a new machine in the database. |
| message CreateMachineRequest { |
| // The machine to create in the database. |
| Machine machine = 1; |
| } |
| |
| // A request to delete a machine from the database. |
| message DeleteMachineRequest { |
| // The name of the machine to delete. |
| string name = 1; |
| } |
| |
| // A request to list machines in the database. |
| message ListMachinesRequest { |
| // The names of machines to get. |
| repeated string names = 1; |
| // The platforms to filter retrieved machines on. |
| repeated string platforms = 2; |
| // The racks to filter retrieved machines on. |
| repeated string racks = 3; |
| // The states to filter retrieved machines on. |
| repeated common.State states = 4; |
| // The datacenters to filter retrieved machines on. |
| repeated string datacenters = 5; |
| } |
| |
| // A response containing a list of machines in the database. |
| message ListMachinesResponse { |
| // The machines matching this request. |
| repeated Machine machines = 1; |
| // TODO(smut): Support page tokens. |
| } |
| |
| // A request to rename a machine in the database. |
| message RenameMachineRequest { |
| // The name of the machine to rename. |
| string name = 1; |
| // The new name to give this machine. |
| string new_name = 2; |
| } |
| |
| // A request to update a machine in the database. |
| message UpdateMachineRequest { |
| // The machine to update in the database. |
| Machine machine = 1; |
| // The fields to update in the machine. |
| google.protobuf.FieldMask update_mask = 2; |
| } |