diff --git a/go/cmd/entrypoint/host.go b/go/cmd/entrypoint/host.go index 3291498..6e97e1f 100644 --- a/go/cmd/entrypoint/host.go +++ b/go/cmd/entrypoint/host.go @@ -70,7 +70,7 @@ var subCmdHostList = subCmd{ hosts := currBoostrap.HostsOrdered() - type storageInstanceView struct { + type storageAllocationView struct { ID string `yaml:"id"` RPCPort int `yaml:"rpc_port"` S3APIPort int `yaml:"s3_api_port"` @@ -83,15 +83,15 @@ var subCmdHostList = subCmd{ PublicAddr string `yaml:"public_addr,omitempty"` } Storage struct { - Instances []storageInstanceView `yaml:"instances"` + Allocations []storageAllocationView `yaml:"allocations"` } `yaml:",omitempty"` } hostViews := make([]hostView, len(hosts)) for i, host := range hosts { - storageInstanceViews := make([]storageInstanceView, len(host.Garage.Instances)) + storageAllocViews := make([]storageAllocationView, len(host.Garage.Instances)) for i := range host.Garage.Instances { - storageInstanceViews[i] = storageInstanceView(host.Garage.Instances[i]) + storageAllocViews[i] = storageAllocationView(host.Garage.Instances[i]) } hostView := hostView{ @@ -100,7 +100,7 @@ var subCmdHostList = subCmd{ hostView.VPN.IP = host.IP().String() hostView.VPN.PublicAddr = host.Nebula.PublicAddr - hostView.Storage.Instances = storageInstanceViews + hostView.Storage.Allocations = storageAllocViews hostViews[i] = hostView } diff --git a/go/cmd/entrypoint/host_test.go b/go/cmd/entrypoint/host_test.go index 8274a51..aa20b35 100644 --- a/go/cmd/entrypoint/host_test.go +++ b/go/cmd/entrypoint/host_test.go @@ -85,7 +85,7 @@ func TestHostList(t *testing.T) { "public_addr": "1.1.1.1:80", }, "storage": map[string]any{ - "instances": []any{ + "allocations": []any{ map[string]any{ "id": "storageInstanceID", "rpc_port": 9000,