v1.6.8
This commit is contained in:
19
pkg/cloudbroker/grid/ids.go
Normal file
19
pkg/cloudbroker/grid/ids.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package grid
|
||||
|
||||
// IDs gets array of GRIDID from ListGrids struct
|
||||
func (lg ListGrids) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(lg.Data))
|
||||
for _, e := range lg.Data {
|
||||
res = append(res, e.GID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// IDs gets array of GRIDID from ListResourceConsumption struct
|
||||
func (lg ListResourceConsumption) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(lg.Data))
|
||||
for _, e := range lg.Data {
|
||||
res = append(res, e.GID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user