allow VM nodes to offer multiple slot offers #8
							
								
								
									
										4
									
								
								build.rs
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										4
									
								
								build.rs
									
									
									
									
									
								
							| @ -32,6 +32,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | |||||||
|             ".general_proto.InspectOperatorResp", |             ".general_proto.InspectOperatorResp", | ||||||
|             "#[derive(serde::Serialize, serde::Deserialize)]", |             "#[derive(serde::Serialize, serde::Deserialize)]", | ||||||
|         ) |         ) | ||||||
|  |         .type_attribute( | ||||||
|  |             ".vm_proto.VmNodeOffer", | ||||||
|  |             "#[derive(serde::Serialize, serde::Deserialize)]", | ||||||
|  |         ) | ||||||
|         .type_attribute( |         .type_attribute( | ||||||
|             ".vm_proto.VmNodeListResp", |             ".vm_proto.VmNodeListResp", | ||||||
|             "#[derive(serde::Serialize, serde::Deserialize)]", |             "#[derive(serde::Serialize, serde::Deserialize)]", | ||||||
|  | |||||||
| @ -54,8 +54,13 @@ message RegisterVmNodeReq { | |||||||
|   string country = 4; |   string country = 4; | ||||||
|   string region = 5; |   string region = 5; | ||||||
|   string city = 6; |   string city = 6; | ||||||
|   // nanocredits per unit per minute | } | ||||||
|   uint64 price = 7; | 
 | ||||||
|  | message VmNodeOffer { | ||||||
|  |   uint64 price = 1; | ||||||
|  |   uint64 vcpus = 2; | ||||||
|  |   uint64 memory_mib = 3; | ||||||
|  |   uint64 disk_mib = 4; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message VmNodeResources { | message VmNodeResources { | ||||||
| @ -63,10 +68,8 @@ message VmNodeResources { | |||||||
|   uint32 avail_ports = 2; |   uint32 avail_ports = 2; | ||||||
|   uint32 avail_ipv4 = 3; |   uint32 avail_ipv4 = 3; | ||||||
|   uint32 avail_ipv6 = 4; |   uint32 avail_ipv6 = 4; | ||||||
|   uint32 avail_vcpus = 5; |   uint32 max_ports_per_vm = 5; | ||||||
|   uint32 avail_memory_mib = 6; |   repeated VmNodeOffer offers = 6; | ||||||
|   uint32 avail_storage_mib = 7; |  | ||||||
|   uint32 max_ports_per_vm = 8; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message NewVmReq { | message NewVmReq { | ||||||
| @ -176,10 +179,7 @@ message VmNodeListResp { | |||||||
|   string city = 5; |   string city = 5; | ||||||
|   string ip = 6; // required for latency test |   string ip = 6; // required for latency test | ||||||
|   repeated string reports = 7; // TODO: this will become an enum |   repeated string reports = 7; // TODO: this will become an enum | ||||||
|   uint64 price = 8; // nanocredits per unit per minute |   repeated VmNodeOffer offers = 9; | ||||||
|   uint64 vcpus = 9; |  | ||||||
|   uint64 memory_mib = 10; |  | ||||||
|   uint64 disk_mib = 11; |  | ||||||
|   bool public_ipv4 = 12; |   bool public_ipv4 = 12; | ||||||
|   bool public_ipv6 = 13; |   bool public_ipv6 = 13; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user