change uuid to vm_id and app_id
This commit is contained in:
parent
4753a17fa2
commit
6765cafd68
@ -7,7 +7,7 @@ package app_proto;
|
|||||||
import "shared/common.proto";
|
import "shared/common.proto";
|
||||||
|
|
||||||
message AppContract {
|
message AppContract {
|
||||||
string uuid = 1;
|
string app_id = 1;
|
||||||
string package_url = 2;
|
string package_url = 2;
|
||||||
string admin_pubkey = 3;
|
string admin_pubkey = 3;
|
||||||
string node_pubkey = 4;
|
string node_pubkey = 4;
|
||||||
@ -28,7 +28,7 @@ message NewAppReq {
|
|||||||
string package_url = 1;
|
string package_url = 1;
|
||||||
string node_pubkey = 2;
|
string node_pubkey = 2;
|
||||||
AppResource resource = 3;
|
AppResource resource = 3;
|
||||||
string uuid = 4;
|
string app_id = 4;
|
||||||
string admin_pubkey = 5;
|
string admin_pubkey = 5;
|
||||||
uint64 price_per_unit = 6;
|
uint64 price_per_unit = 6;
|
||||||
uint64 locked_nano = 7;
|
uint64 locked_nano = 7;
|
||||||
@ -40,12 +40,12 @@ message NewAppReq {
|
|||||||
message AppResource {
|
message AppResource {
|
||||||
uint32 memory_mib = 1;
|
uint32 memory_mib = 1;
|
||||||
uint32 disk_size_mib = 2;
|
uint32 disk_size_mib = 2;
|
||||||
uint32 vcpus = 3;
|
uint32 vcpus = 3;
|
||||||
repeated uint32 ports = 4;
|
repeated uint32 ports = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message NewAppRes {
|
message NewAppRes {
|
||||||
string uuid = 1;
|
string app_id = 1;
|
||||||
string ip_address = 2;
|
string ip_address = 2;
|
||||||
repeated common_proto.MappedPort mapped_ports = 3;
|
repeated common_proto.MappedPort mapped_ports = 3;
|
||||||
string error = 4;
|
string error = 4;
|
||||||
@ -53,14 +53,14 @@ message NewAppRes {
|
|||||||
|
|
||||||
|
|
||||||
message DelAppReq {
|
message DelAppReq {
|
||||||
string uuid= 1;
|
string app_id = 1;
|
||||||
string admin_pubkey = 2;
|
string admin_pubkey = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListAppContractsReq {
|
message ListAppContractsReq {
|
||||||
string admin_pubkey = 1;
|
string admin_pubkey = 1;
|
||||||
bool as_operator = 2;
|
bool as_operator = 2;
|
||||||
string uuid = 3;
|
string app_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ message RegOperatorReq {
|
|||||||
|
|
||||||
message KickReq {
|
message KickReq {
|
||||||
string operator_wallet = 1;
|
string operator_wallet = 1;
|
||||||
string contract_uuid = 2;
|
string contract_id = 2;
|
||||||
string reason = 3;
|
string reason = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +71,14 @@ message Account {
|
|||||||
uint64 tmp_locked = 3;
|
uint64 tmp_locked = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message RecommendedVersions {
|
||||||
|
// the actual version of the brain, not a recommandation
|
||||||
|
string brain = 1;
|
||||||
|
// recommended versions for the other modules
|
||||||
|
string cli = 2;
|
||||||
|
string snp_daemon = 3;
|
||||||
|
string sgx_daemon = 4;
|
||||||
|
}
|
||||||
|
|
||||||
service BrainGeneralCli {
|
service BrainGeneralCli {
|
||||||
rpc GetBalance (common_proto.Pubkey) returns (AccountBalance);
|
rpc GetBalance (common_proto.Pubkey) returns (AccountBalance);
|
||||||
@ -90,4 +98,5 @@ service BrainGeneralCli {
|
|||||||
returns (stream vm_proto.VmContract);
|
returns (stream vm_proto.VmContract);
|
||||||
rpc ListAllAppContracts (common_proto.Empty)
|
rpc ListAllAppContracts (common_proto.Empty)
|
||||||
returns (stream app_proto.AppContract);
|
returns (stream app_proto.AppContract);
|
||||||
|
rpc GetRecommendedVersions (common_proto.Empty) returns (RecommendedVersions);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ package vm_proto;
|
|||||||
import "shared/common.proto";
|
import "shared/common.proto";
|
||||||
|
|
||||||
message VmContract {
|
message VmContract {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string hostname = 2;
|
string hostname = 2;
|
||||||
string admin_pubkey = 3;
|
string admin_pubkey = 3;
|
||||||
string node_pubkey = 4;
|
string node_pubkey = 4;
|
||||||
@ -73,7 +73,7 @@ message VmNodeResources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message NewVmReq {
|
message NewVmReq {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string hostname = 2;
|
string hostname = 2;
|
||||||
string admin_pubkey = 3;
|
string admin_pubkey = 3;
|
||||||
string node_pubkey = 4;
|
string node_pubkey = 4;
|
||||||
@ -92,13 +92,13 @@ message NewVmReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message NewVmResp {
|
message NewVmResp {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string error = 2;
|
string error = 2;
|
||||||
MeasurementArgs args = 3;
|
MeasurementArgs args = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateVmReq {
|
message UpdateVmReq {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string hostname = 2;
|
string hostname = 2;
|
||||||
string admin_pubkey = 3;
|
string admin_pubkey = 3;
|
||||||
uint32 disk_size_mib = 4;
|
uint32 disk_size_mib = 4;
|
||||||
@ -111,13 +111,13 @@ message UpdateVmReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message UpdateVmResp {
|
message UpdateVmResp {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string error = 2;
|
string error = 2;
|
||||||
MeasurementArgs args = 3;
|
MeasurementArgs args = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteVmReq {
|
message DeleteVmReq {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string admin_pubkey = 2;
|
string admin_pubkey = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ service BrainVmDaemon {
|
|||||||
message ListVmContractsReq {
|
message ListVmContractsReq {
|
||||||
string wallet = 1;
|
string wallet = 1;
|
||||||
bool as_operator = 2;
|
bool as_operator = 2;
|
||||||
string uuid = 3;
|
string vm_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message VmNodeFilters {
|
message VmNodeFilters {
|
||||||
@ -185,7 +185,7 @@ message VmNodeListResp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message ExtendVmReq {
|
message ExtendVmReq {
|
||||||
string uuid = 1;
|
string vm_id = 1;
|
||||||
string admin_pubkey = 2;
|
string admin_pubkey = 2;
|
||||||
uint64 locked_nano = 3;
|
uint64 locked_nano = 3;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ pub struct AppDeployConfig {
|
|||||||
pub package_url: String,
|
pub package_url: String,
|
||||||
pub resource: Resource,
|
pub resource: Resource,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub uuid: String,
|
pub app_id: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub admin_pubkey: String,
|
pub admin_pubkey: String,
|
||||||
pub node_pubkey: String,
|
pub node_pubkey: String,
|
||||||
@ -63,7 +63,7 @@ impl From<NewAppReq> for AppDeployConfig {
|
|||||||
Self {
|
Self {
|
||||||
package_url: pb_val.package_url,
|
package_url: pb_val.package_url,
|
||||||
resource: pb_val.resource.map(Resource::from).unwrap_or_default(),
|
resource: pb_val.resource.map(Resource::from).unwrap_or_default(),
|
||||||
uuid: pb_val.uuid,
|
app_id: pb_val.app_id,
|
||||||
admin_pubkey: pb_val.admin_pubkey,
|
admin_pubkey: pb_val.admin_pubkey,
|
||||||
node_pubkey: pb_val.node_pubkey,
|
node_pubkey: pb_val.node_pubkey,
|
||||||
node_unit_price: pb_val.price_per_unit,
|
node_unit_price: pb_val.price_per_unit,
|
||||||
@ -80,7 +80,7 @@ impl From<AppDeployConfig> for NewAppReq {
|
|||||||
NewAppReq {
|
NewAppReq {
|
||||||
package_url: val.package_url,
|
package_url: val.package_url,
|
||||||
resource: Some(val.resource.into()),
|
resource: Some(val.resource.into()),
|
||||||
uuid: val.uuid,
|
app_id: val.app_id,
|
||||||
admin_pubkey: val.admin_pubkey,
|
admin_pubkey: val.admin_pubkey,
|
||||||
node_pubkey: val.node_pubkey,
|
node_pubkey: val.node_pubkey,
|
||||||
price_per_unit: val.node_unit_price,
|
price_per_unit: val.node_unit_price,
|
||||||
|
Loading…
Reference in New Issue
Block a user