blob: f17e725f6b9f9dad47e6451cd79dc75095812302 [file] [log] [blame]
// 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";
package crimson;
import "google/protobuf/field_mask.proto";
// A DRAC in the database.
message DRAC {
// The name of this DRAC on the network. Uniquely identifies this DRAC.
string name = 1;
// The machine this DRAC belongs to. Uniquely identifies this DRAC.
string machine = 2;
// The IPv4 address associated with this DRAC.
string ipv4 = 3;
// The VLAN this DRAC belongs to.
// When creating a DRAC, omit this field. It will be inferred from the IPv4 address.
int64 vlan = 4;
// The MAC address associated with this DRAC.
string mac_address = 5;
// The switch this DRAC is connected to.
string switch = 6;
// The switchport this DRAC is connected to.
int32 switchport = 7;
}
// A request to create a new DRAC in the database.
message CreateDRACRequest {
// The DRAC to create in the database.
DRAC drac = 1;
}
// A request to list DRACs in the database.
message ListDRACsRequest {
// The names of DRACs to get.
repeated string names = 1;
// The machines to filter retrieved DRACs on.
repeated string machines = 2;
// The IPv4 addresses to filter retrieved DRACs on.
repeated string ipv4s = 3;
// The VLANs to filter retrieved DRACs on.
repeated int64 vlans = 4;
// The MAC addresses to filter retrieved DRACs on.
repeated string mac_addresses = 5;
// The switches to filter retrieved DRACs on.
repeated string switches = 6;
}
// A response containing a list of DRACs in the database.
message ListDRACsResponse {
// The DRACs matching this request.
repeated DRAC dracs = 1;
// TODO(smut): Support page tokens.
}
// A request to update a DRAC in the database.
message UpdateDRACRequest {
// The DRAC to update in the database.
DRAC drac = 1;
// The fields to update in the DRAC.
google.protobuf.FieldMask update_mask = 2;
}