| // 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 "go.chromium.org/luci/machine-db/api/common/v1/states.proto"; |
| |
| // A switch in the database. |
| message Switch { |
| // The name of this switch. Uniquely identifies this switch. |
| string name = 1; |
| // A description of this switch. |
| string description = 2; |
| // The number of ports this switch has. |
| int32 ports = 3; |
| // The datacenter this switch belongs to. |
| string datacenter = 4; |
| // The rack this switch belongs to. |
| string rack = 5; |
| // The state of this switch. |
| common.State state = 6; |
| } |
| |
| // A request to list switches in the database. |
| message ListSwitchesRequest { |
| // The names of switches to retrieve. |
| repeated string names = 1; |
| // The datacenters to filter retrieved switches on. |
| repeated string datacenters = 2; |
| // The racks to filter retrieved switches on. |
| repeated string racks = 3; |
| } |
| |
| // A response containing a list of switches in the database. |
| message ListSwitchesResponse { |
| // The switches matching the request. |
| repeated Switch switches = 1; |
| } |