| // 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"; |
| |
| package config; |
| |
| import "go.chromium.org/luci/machine-db/api/common/v1/states.proto"; |
| |
| // A switch to store in the database. |
| message Switch { |
| // The name of this switch. Must be globally unique. |
| string name = 1; |
| // A description of this switch. |
| string description = 2; |
| // The number of ports this switch has. |
| int32 ports = 3; |
| // The state of this switch. |
| common.State state = 4; |
| } |
| |
| // A KVM to store in the database. |
| message KVM { |
| // The name of this KVM on the network. Must be globally unique. |
| string name = 1; |
| // A description of this KVM. |
| string description = 2; |
| // The type of platform this KVM is. |
| string platform = 3; |
| // The rack this KVM belongs to. |
| // Must be the name of a rack in the same datacenter. |
| string rack = 4; |
| // The MAC address associated with this KVM. |
| string mac_address = 5; |
| // The IPv4 address associated with this KVM. |
| string ipv4 = 6; |
| // The state of this KVM. |
| common.State state = 7; |
| } |
| |
| // A rack to store in the database. |
| message Rack { |
| // The name of this rack. Must be globally unique. |
| string name = 1; |
| // A description of this rack. |
| string description = 2; |
| // The switches belonging to this rack. |
| repeated Switch switch = 3; |
| // The state of this rack. |
| common.State state = 4; |
| // The KVM serving this rack. |
| string kvm = 5; |
| } |
| |
| // A datacenter to store in the database. |
| message Datacenter { |
| // The name of this datacenter. Must be globally unique. |
| string name = 1; |
| // A description of this datacenter. |
| string description = 2; |
| // The racks belonging to this datacenter. |
| repeated Rack rack = 3; |
| // The state of this datacenter. |
| common.State state = 4; |
| // The KVMs belonging to this datacenter. |
| repeated KVM kvm = 5; |
| } |
| |
| // A list of datacenter config files. |
| message Datacenters { |
| // A list of names of datacenter config files. |
| repeated string datacenter = 1; |
| } |