| // 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/empty.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/datacenters.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/dracs.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/hosts.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/ips.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/kvms.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/machines.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/nics.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/oses.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/physical_hosts.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/platforms.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/racks.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/switches.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/vlans.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/vm_slots.proto"; |
| import "go.chromium.org/luci/machine-db/api/crimson/v1/vms.proto"; |
| |
| // Crimson implements the Crimson service. |
| service Crimson { |
| // Lists datacenters in the database. |
| rpc ListDatacenters(ListDatacentersRequest) returns (ListDatacentersResponse); |
| // Lists free IP addresses in the database. |
| rpc ListFreeIPs(ListFreeIPsRequest) returns (ListIPsResponse); |
| // Lists KVMs in the database. |
| rpc ListKVMs(ListKVMsRequest) returns (ListKVMsResponse); |
| // Lists operating systems in the database. |
| rpc ListOSes(ListOSesRequest) returns (ListOSesResponse); |
| // Lists platforms in the database. |
| rpc ListPlatforms(ListPlatformsRequest) returns (ListPlatformsResponse); |
| // Lists racks in the database. |
| rpc ListRacks(ListRacksRequest) returns (ListRacksResponse); |
| // Lists switches in the database. |
| rpc ListSwitches(ListSwitchesRequest) returns (ListSwitchesResponse); |
| // Lists VLANs in the database. |
| rpc ListVLANs(ListVLANsRequest) returns (ListVLANsResponse); |
| |
| // Creates a new machine in the database. |
| rpc CreateMachine(CreateMachineRequest) returns (Machine); |
| // Deletes a machine from the database. |
| rpc DeleteMachine(DeleteMachineRequest) returns (google.protobuf.Empty); |
| // Lists machines in the database. |
| rpc ListMachines(ListMachinesRequest) returns (ListMachinesResponse); |
| // Renames a machine in the database. |
| rpc RenameMachine(RenameMachineRequest) returns (Machine); |
| // Updates a machine in the database. |
| rpc UpdateMachine(UpdateMachineRequest) returns (Machine); |
| |
| // Creates a new NIC in the database. |
| rpc CreateNIC(CreateNICRequest) returns (NIC); |
| // Deletes a NIC from the database. |
| rpc DeleteNIC(DeleteNICRequest) returns (google.protobuf.Empty); |
| // Lists NICs in the database. |
| rpc ListNICs(ListNICsRequest) returns (ListNICsResponse); |
| // Updates a NIC in the database. |
| rpc UpdateNIC(UpdateNICRequest) returns (NIC); |
| |
| // Creates a new DRAC in the database. |
| rpc CreateDRAC(CreateDRACRequest) returns (DRAC); |
| // Lists DRACs in the database. |
| rpc ListDRACs(ListDRACsRequest) returns (ListDRACsResponse); |
| // Updates a DRAC in the database. |
| rpc UpdateDRAC(UpdateDRACRequest) returns (DRAC); |
| |
| // Creates a new physical host in the database. |
| rpc CreatePhysicalHost(CreatePhysicalHostRequest) returns (PhysicalHost); |
| // Lists physical hosts in the database. |
| rpc ListPhysicalHosts(ListPhysicalHostsRequest) returns (ListPhysicalHostsResponse); |
| // Updates a physical host in the database. |
| rpc UpdatePhysicalHost(UpdatePhysicalHostRequest) returns (PhysicalHost); |
| |
| // Finds available VM slots in the database. |
| rpc FindVMSlots(FindVMSlotsRequest) returns (FindVMSlotsResponse); |
| |
| // Creates a new VM in the database. |
| rpc CreateVM(CreateVMRequest) returns (VM); |
| // Lists VMs in the database. |
| rpc ListVMs(ListVMsRequest) returns (ListVMsResponse); |
| // Updates a VM in the database. |
| rpc UpdateVM(UpdateVMRequest) returns (VM); |
| |
| // Deletes a physical or virtual host from the database. |
| rpc DeleteHost(DeleteHostRequest) returns (google.protobuf.Empty); |
| } |