Родитель
b0bedc2b84
Коммит
138d4dbf77
2
go.mod
2
go.mod
|
@ -7,7 +7,7 @@ require (
|
|||
github.com/Azure/go-autorest/autorest v0.11.29
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/microsoft/moc v0.23.7
|
||||
github.com/microsoft/moc v0.23.11
|
||||
google.golang.org/grpc v1.62.1
|
||||
k8s.io/klog v1.0.0
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -73,8 +73,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/microsoft/moc v0.23.7 h1:YYw6hobH2cNuqfUbq0JDpUORyMFMAz79U9X/tKBxnDM=
|
||||
github.com/microsoft/moc v0.23.7/go.mod h1:TE8K8CXgXF+VqnILHqSf93qUamy2BJgWCkuiNBeARhM=
|
||||
github.com/microsoft/moc v0.23.11 h1:aA6xQRjemjB+rFjECNoGKSGCdqBkHPO3Qwiu4soPwIA=
|
||||
github.com/microsoft/moc v0.23.11/go.mod h1:TE8K8CXgXF+VqnILHqSf93qUamy2BJgWCkuiNBeARhM=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
|
|
|
@ -56,9 +56,13 @@ func getVirtualharddisktype(enum string) wssdcloudstorage.ContainerType {
|
|||
func getContainer(c *wssdcloudstorage.Container, location string) *storage.Container {
|
||||
var totalSize string
|
||||
var availSize string
|
||||
var node string
|
||||
var zone string
|
||||
if c.Info != nil {
|
||||
totalSize = bytefmt.ByteSize(c.Info.Capacity.TotalBytes)
|
||||
availSize = bytefmt.ByteSize(c.Info.Capacity.AvailableBytes)
|
||||
node = c.Info.Node
|
||||
zone = c.Info.Zone
|
||||
}
|
||||
return &storage.Container{
|
||||
Name: &c.Name,
|
||||
|
@ -70,6 +74,8 @@ func getContainer(c *wssdcloudstorage.Container, location string) *storage.Conta
|
|||
ContainerInfo: &storage.ContainerInfo{
|
||||
AvailableSize: availSize,
|
||||
TotalSize: totalSize,
|
||||
Node: node,
|
||||
Zone: zone,
|
||||
},
|
||||
},
|
||||
Version: &c.Status.Version.Number,
|
||||
|
|
|
@ -63,6 +63,8 @@ type VirtualHardDisk struct {
|
|||
type ContainerInfo struct {
|
||||
AvailableSize string `json:"AvailableSize,omitempty"`
|
||||
TotalSize string `json:"TotalSize,omitempty"`
|
||||
Node string `json:"Node,omitempty"`
|
||||
Zone string `json:"Zone,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerProperties defines the structure of a Load Balancer
|
||||
|
|
Загрузка…
Ссылка в новой задаче