diff --git a/direnv.linux-amd64 b/direnv.linux-amd64 new file mode 100644 index 00000000..a631928c Binary files /dev/null and b/direnv.linux-amd64 differ 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..8c67be03 100644 --- a/proto/provider/akash/inventory/v1/cluster.proto +++ b/proto/provider/akash/inventory/v1/cluster.proto @@ -5,6 +5,7 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/node.proto"; import "akash/inventory/v1/resourcepair.proto"; +import "akash/inventory/v1/storage.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; @@ -19,7 +20,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..9d9b44ad 100644 --- a/proto/provider/akash/inventory/v1/cpu.proto +++ b/proto/provider/akash/inventory/v1/cpu.proto @@ -7,26 +7,39 @@ 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\"" - ]; - - string id = 2 [ +message CPUInfo { + string id = 1 [ (gogoproto.customname) = "ID", (gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\"" ]; - string vendor = 3 [ + string vendor = 2 [ (gogoproto.customname) = "Vendor", (gogoproto.jsontag) = "vendor", (gogoproto.moretags) = "yaml:\"vendor\"" ]; - string model = 4 [ + string model = 3 [ (gogoproto.customname) = "Model", (gogoproto.jsontag) = "model", (gogoproto.moretags) = "yaml:\"model\"" ]; + uint32 vcores = 4 [ + (gogoproto.customname) = "Vcores", + (gogoproto.jsontag) = "vcores", + (gogoproto.moretags) = "yaml:\"vcores\"" + ]; +} + +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..70ae4730 100644 --- a/proto/provider/akash/inventory/v1/gpu.proto +++ b/proto/provider/akash/inventory/v1/gpu.proto @@ -8,25 +8,43 @@ import "akash/inventory/v1/resourcepair.proto"; option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +message GPUInfo { + string vendor = 1 [ + (gogoproto.customname) = "Vendor", + (gogoproto.jsontag) = "vendor", + (gogoproto.moretags) = "yaml:\"vendor\"" + ]; + string name = 2 [ + (gogoproto.customname) = "Name", + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + string modelid = 3 [ + (gogoproto.customname) = "ModelID", + (gogoproto.jsontag) = "modelid", + (gogoproto.moretags) = "yaml:\"modelid\"" + ]; + string interface = 4 [ + (gogoproto.customname) = "Interface", + (gogoproto.jsontag) = "interface", + (gogoproto.moretags) = "yaml:\"interface\"" + ]; + string memory = 5 [ + (gogoproto.customname) = "Memory", + (gogoproto.jsontag) = "memory", + (gogoproto.moretags) = "yaml:\"memory\"" + ]; +} + message GPU { ResourcePair quantity = 1 [ (gogoproto.customname) = "Quantity", (gogoproto.jsontag) = "quantity", (gogoproto.moretags) = "yaml:\"quantity\"" ]; - string id = 2 [ - (gogoproto.customname) = "ID", - (gogoproto.jsontag) = "id", - (gogoproto.moretags) = "yaml:\"id\"" - ]; - string vendor = 3 [ - (gogoproto.customname) = "Vendor", - (gogoproto.jsontag) = "vendor", - (gogoproto.moretags) = "yaml:\"vendor\"" - ]; - string model = 4 [ - (gogoproto.customname) = "Model", - (gogoproto.jsontag) = "model", - (gogoproto.moretags) = "yaml:\"model\"" + repeated GPUInfo info = 2 [ + (gogoproto.customname) = "Info", + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" ]; } diff --git a/proto/provider/akash/inventory/v1/memory.proto b/proto/provider/akash/inventory/v1/memory.proto new file mode 100644 index 00000000..8f334019 --- /dev/null +++ b/proto/provider/akash/inventory/v1/memory.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package akash.inventory.v1; + +import "gogoproto/gogo.proto"; + +import "akash/inventory/v1/resourcepair.proto"; + +option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; + +message MemoryInfo { + string vendor = 1 [ + (gogoproto.customname) = "Vendor", + (gogoproto.jsontag) = "vendor", + (gogoproto.moretags) = "yaml:\"vendor\"" + ]; + string type = 2 [ + (gogoproto.customname) = "Type", + (gogoproto.jsontag) = "type", + (gogoproto.moretags) = "yaml:\"type\"" + ]; + string size = 3 [ + (gogoproto.customname) = "Size", + (gogoproto.jsontag) = "size", + (gogoproto.moretags) = "yaml:\"size\"" + ]; + string speed = 4 [ + (gogoproto.customname) = "Speed", + (gogoproto.jsontag) = "speed", + (gogoproto.moretags) = "yaml:\"speed\"" + ]; + } + +message Memory { + ResourcePair quantity = 1 [ + (gogoproto.customname) = "Quantity", + (gogoproto.jsontag) = "quantity", + (gogoproto.moretags) = "yaml:\"quantity\"" + ]; + + repeated MemoryInfo info = 2 [ + (gogoproto.customname) = "Info", + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + diff --git a/proto/provider/akash/inventory/v1/node.proto b/proto/provider/akash/inventory/v1/node.proto index 125af5d7..7929751c 100644 --- a/proto/provider/akash/inventory/v1/node.proto +++ b/proto/provider/akash/inventory/v1/node.proto @@ -4,22 +4,42 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/cpu.proto"; import "akash/inventory/v1/gpu.proto"; +import "akash/inventory/v1/storage.proto"; +import "akash/inventory/v1/memory.proto"; + option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; 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 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Memory", + (gogoproto.customname) = "Memory", + (gogoproto.jsontag) = "memory", + (gogoproto.moretags) = "yaml:\"memory\"" + ]; + + GPU gpu = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "GPUs", - (gogoproto.customname) = "GPU", - (gogoproto.jsontag) = "gpu", - (gogoproto.moretags) = "yaml:\"gpu\"" + (gogoproto.customname) = "Gpus", + (gogoproto.jsontag) = "gpus", + (gogoproto.moretags) = "yaml:\"gpus\"" + ]; + + Storage storage = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Storage", + (gogoproto.customname) = "Storage", + (gogoproto.jsontag) = "storage", + (gogoproto.moretags) = "yaml:\"storage\"" ]; } diff --git a/proto/provider/akash/inventory/v1/resourcepair.proto b/proto/provider/akash/inventory/v1/resourcepair.proto index e9895268..b1d82cb3 100644 --- a/proto/provider/akash/inventory/v1/resourcepair.proto +++ b/proto/provider/akash/inventory/v1/resourcepair.proto @@ -4,7 +4,8 @@ package akash.inventory.v1; import "akash/base/v1beta3/attribute.proto"; import "gogoproto/gogo.proto"; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "github.com/kubernetes/apimachinery/blob/master/pkg/api/resource/generated.proto"; + option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; diff --git a/proto/provider/akash/inventory/v1/storage.proto b/proto/provider/akash/inventory/v1/storage.proto new file mode 100644 index 00000000..19af668f --- /dev/null +++ b/proto/provider/akash/inventory/v1/storage.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package akash.inventory.v1; + +import "gogoproto/gogo.proto"; + +import "akash/inventory/v1/resourcepair.proto"; + +option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; + +message StorageInfo { + string vendor = 1 [ + (gogoproto.customname) = "Vendor", + (gogoproto.jsontag) = "vendor", + (gogoproto.moretags) = "yaml:\"vendor\"" + ]; + string class = 2 [ + (gogoproto.customname) = "Class", + (gogoproto.jsontag) = "class", + (gogoproto.moretags) = "yaml:\"class\"" + ]; + string capacity = 3 [ + (gogoproto.customname) = "Capacity", + (gogoproto.jsontag) = "capacity", + (gogoproto.moretags) = "yaml:\"capacity\"" + ]; + string IO = 4 [ + (gogoproto.customname) = "IO", + (gogoproto.jsontag) = "io", + (gogoproto.moretags) = "yaml:\"io\"" + ]; + } + + message Storage { + ResourcePair quantity = 1 [ + (gogoproto.customname) = "Quantity", + (gogoproto.jsontag) = "quantity", + (gogoproto.moretags) = "yaml:\"quantity\"" + ]; + StorageInfo info = 2 [ + (gogoproto.customname) = "Info", + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; + } \ No newline at end of file