diff --git a/go/inventory/v1/types.go b/go/inventory/v1/types.go index 7a0d8791..770b2134 100644 --- a/go/inventory/v1/types.go +++ b/go/inventory/v1/types.go @@ -8,7 +8,7 @@ type CPUs []CPU type GPUs []GPU type Nodes []Node -type ClusterStorage map[string]ResourcePair +type ClusterStorage []Storage var _ sort.Interface = (*CPUs)(nil) var _ sort.Interface = (*GPUs)(nil) diff --git a/proto/node/akash/market/v1beta3/bid.proto b/proto/node/akash/market/v1beta3/bid.proto index 3191ea9b..c95fcc54 100644 --- a/proto/node/akash/market/v1beta3/bid.proto +++ b/proto/node/akash/market/v1beta3/bid.proto @@ -3,6 +3,7 @@ package akash.market.v1beta3; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; + import "akash/market/v1beta3/order.proto"; import "akash/base/v1beta3/resources.proto"; @@ -45,6 +46,7 @@ message MsgCreateBid { (gogoproto.jsontag) = "deposit", (gogoproto.moretags) = "yaml:\"deposit\"" ]; +<<<<<<< Updated upstream repeated ResourceOffer resources_offer = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "ResourcesOffer", @@ -52,6 +54,15 @@ message MsgCreateBid { (gogoproto.jsontag) = "resources_offer", (gogoproto.moretags) = "yaml:\"resources_offer\"" ]; +||||||| Stash base +======= + repeated akash.base.v1beta3.Resources resources = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resources", + (gogoproto.castrepeated) = "Volumes", + (gogoproto.moretags) = "yaml:\"resources\"" + ]; +>>>>>>> Stashed changes } // MsgCreateBidResponse defines the Msg/CreateBid response type. diff --git a/proto/provider/akash/inventory/v1/cluster.proto b/proto/provider/akash/inventory/v1/cluster.proto index 7a0ee82d..6f761d82 100644 --- a/proto/provider/akash/inventory/v1/cluster.proto +++ b/proto/provider/akash/inventory/v1/cluster.proto @@ -8,6 +8,11 @@ import "akash/inventory/v1/resourcepair.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +message Storage { + string class = 1; + ResourcePair quantity = 2; +} + message Cluster { option (gogoproto.equal) = false; @@ -19,7 +24,7 @@ message Cluster { (gogoproto.moretags) = "yaml:\"nodes\"" ]; - map Storage = 2 [ + repeated Storage storage = 2 [ (gogoproto.nullable) = false, (gogoproto.casttype) = "ClusterStorage", (gogoproto.customname) = "Storage", diff --git a/proto/provider/akash/inventory/v1/cpu.proto b/proto/provider/akash/inventory/v1/cpu.proto index ae29e0ab..f19f51bf 100644 --- a/proto/provider/akash/inventory/v1/cpu.proto +++ b/proto/provider/akash/inventory/v1/cpu.proto @@ -7,13 +7,7 @@ import "akash/inventory/v1/resourcepair.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; -message CPU { - ResourcePair quantity = 1 [ - (gogoproto.customname) = "Quantity", - (gogoproto.jsontag) = "quantity", - (gogoproto.moretags) = "yaml:\"quantity\"" - ]; - +message CPUInfo { string id = 2 [ (gogoproto.customname) = "ID", (gogoproto.jsontag) = "id", @@ -30,3 +24,23 @@ message CPU { (gogoproto.moretags) = "yaml:\"model\"" ]; } + +// cpu 1 / 10vcores +// cpu 2 / 10vcores +// --> k8s->CoreV1->Node() -> 20 vcores +// 12 allocated + + +message CPU { + ResourcePair quantity = 1 [ + (gogoproto.customname) = "Quantity", + (gogoproto.jsontag) = "quantity", + (gogoproto.moretags) = "yaml:\"quantity\"" + ]; + + repeated CPUInfo info = 2 [ + (gogoproto.customname) = "Info", + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} diff --git a/proto/provider/akash/inventory/v1/gpu.proto b/proto/provider/akash/inventory/v1/gpu.proto index 86c25636..4eae9c96 100644 --- a/proto/provider/akash/inventory/v1/gpu.proto +++ b/proto/provider/akash/inventory/v1/gpu.proto @@ -8,12 +8,7 @@ import "akash/inventory/v1/resourcepair.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; -message GPU { - ResourcePair quantity = 1 [ - (gogoproto.customname) = "Quantity", - (gogoproto.jsontag) = "quantity", - (gogoproto.moretags) = "yaml:\"quantity\"" - ]; +message GPUInfo { string id = 2 [ (gogoproto.customname) = "ID", (gogoproto.jsontag) = "id", @@ -29,4 +24,16 @@ message GPU { (gogoproto.jsontag) = "model", (gogoproto.moretags) = "yaml:\"model\"" ]; + + +} + +message GPU { + ResourcePair quantity = 1 [ + (gogoproto.customname) = "Quantity", + (gogoproto.jsontag) = "quantity", + (gogoproto.moretags) = "yaml:\"quantity\"" + ]; + + repeated GPUInfo info = 2; } diff --git a/proto/provider/akash/inventory/v1/node.proto b/proto/provider/akash/inventory/v1/node.proto index 125af5d7..95f81057 100644 --- a/proto/provider/akash/inventory/v1/node.proto +++ b/proto/provider/akash/inventory/v1/node.proto @@ -7,19 +7,38 @@ import "akash/inventory/v1/gpu.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +message MemoryInfo { + +} +message Memory { + ResourcePair quantity = 1 [ + (gogoproto.customname) = "Quantity", + (gogoproto.jsontag) = "quantity", + (gogoproto.moretags) = "yaml:\"quantity\"" + ]; + + repeated MemoryInfo info = 2 [ + + ] +} + message Node { - repeated CPU cpu = 1 [ + CPU cpu = 1 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "CPUs", (gogoproto.customname) = "CPU", (gogoproto.jsontag) = "cpu", (gogoproto.moretags) = "yaml:\"cpu\"" ]; - repeated GPU gpu = 2 [ + + Memory memory = 2; + GPU gpu = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "GPUs", (gogoproto.customname) = "GPU", (gogoproto.jsontag) = "gpu", (gogoproto.moretags) = "yaml:\"gpu\"" ]; + + EphemeralStorage; }