blob: e53ff4cc065f7120ce463406a36ec446b32126b9 [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";
import "go.chromium.org/luci/machine-db/api/common/v1/states.proto";
// A physical host in the database.
message PhysicalHost {
// The name of this host on the network. Uniquely identifies this host.
string name = 1;
// The VLAN this host belongs to.
// When creating a host, omit this field. It will be inferred from the IPv4 address.
int64 vlan = 2;
// The machine backing this host.
string machine = 3;
// The operating system backing this host.
string os = 4;
// The number of VMs which can be deployed on this host.
int32 vm_slots = 5;
// A description of this host.
string description = 6;
// The deployment ticket associated with this host.
string deployment_ticket = 7;
// The IPv4 address associated with this host.
string ipv4 = 8;
// The state of the machine backing this host.
common.State state = 9;
// The virtual datacenter VMs deployed on this host belong to.
string virtual_datacenter = 10;
// The primary NIC for this host.
string nic = 11;
// The MAC address associated with the primary NIC.
string mac_address = 12;
}
// A request to create a new physical host in the database.
message CreatePhysicalHostRequest {
// The host to create in the database.
PhysicalHost host = 1;
}
// A request to list physical hosts in the database.
message ListPhysicalHostsRequest {
// The names of hosts to get.
repeated string names = 1;
// The VLANs to filter retrieved hosts on.
repeated int64 vlans = 2;
// The IPv4 addresses to filter retrieved hosts on.
repeated string ipv4s = 3;
// The machines to filter retrieved hosts on.
repeated string machines = 4;
// The operating systems to filter retrieved hosts on.
repeated string oses = 5;
// The states to filter retrieved hosts on.
repeated common.State states = 6;
// The platforms to filter retrieved hosts on.
repeated string platforms = 7;
// The racks to filter retrieved hosts on.
repeated string racks = 8;
// The datacenters to filter retrieved hosts on.
repeated string datacenters = 9;
// The virtual datacenters to filter retrieved hosts on.
repeated string virtual_datacenters = 10;
// The NICs to filter retrieved hosts on.
repeated string nics = 11;
// The MAC addresses to filter retrieved hosts on.
repeated string mac_addresses = 12;
}
// A response containing a list of physical hosts in the database.
message ListPhysicalHostsResponse {
// The hosts matching this request.
repeated PhysicalHost hosts = 1;
// TODO(smut): Support page tokens.
}
// A request to update a physical host in the database.
message UpdatePhysicalHostRequest {
// The host to update in the database.
PhysicalHost host = 1;
// The fields to update in the host.
google.protobuf.FieldMask update_mask = 2;
}