mirror of
				https://github.com/siderolabs/talos.git
				synced 2025-10-31 16:31:13 +01:00 
			
		
		
		
	Fixes: https://github.com/siderolabs/talos/issues/7017 Should allow external services to detect which user block devices might need to be wiped during reset. Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| syntax = "proto3";
 | |
| 
 | |
| package storage;
 | |
| 
 | |
| option go_package = "github.com/siderolabs/talos/pkg/machinery/api/storage";
 | |
| 
 | |
| import "common/common.proto";
 | |
| import "google/protobuf/empty.proto";
 | |
| 
 | |
| // StorageService represents the storage service.
 | |
| service StorageService {
 | |
|   rpc Disks(google.protobuf.Empty) returns (DisksResponse);
 | |
| }
 | |
| 
 | |
| // Disk represents a disk.
 | |
| message Disk {
 | |
|   // Size indicates the disk size in bytes.
 | |
|   uint64 size = 1;
 | |
|   // Model idicates the disk model.
 | |
|   string model = 2;
 | |
|   // DeviceName indicates the disk name (e.g. `sda`).
 | |
|   string device_name = 3;
 | |
|   // Name as in `/sys/block/<dev>/device/name`.
 | |
|   string name = 4;
 | |
|   // Serial as in `/sys/block/<dev>/device/serial`.
 | |
|   string serial = 5;
 | |
|   // Modalias as in `/sys/block/<dev>/device/modalias`.
 | |
|   string modalias = 6;
 | |
|   // Uuid as in `/sys/block/<dev>/device/uuid`.
 | |
|   string uuid = 7;
 | |
|   // Wwid as in `/sys/block/<dev>/device/wwid`.
 | |
|   string wwid = 8;
 | |
|   enum DiskType {
 | |
|     UNKNOWN = 0;
 | |
|     SSD = 1;
 | |
|     HDD = 2;
 | |
|     NVME = 3;
 | |
|     SD = 4;
 | |
|   }
 | |
|   // Type is a type of the disk: nvme, ssd, hdd, sd card.
 | |
|   DiskType type = 9;
 | |
|   // BusPath is the bus path of the disk.
 | |
|   string bus_path = 10;
 | |
|   // SystemDisk indicates that the disk is used as Talos system disk.
 | |
|   bool system_disk = 11;
 | |
|   // Subsystem is the symlink path in the `/sys/block/<dev>/subsystem`.
 | |
|   string subsystem = 12;
 | |
| }
 | |
| 
 | |
| // DisksResponse represents the response of the `Disks` RPC.
 | |
| message Disks {
 | |
|   common.Metadata metadata = 1;
 | |
|   repeated Disk disks = 2;
 | |
| }
 | |
| 
 | |
| message DisksResponse {
 | |
|   repeated Disks messages = 1;
 | |
| }
 |