v1.6.8
This commit is contained in:
19
pkg/cloudapi/extnet/ids.go
Normal file
19
pkg/cloudapi/extnet/ids.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package extnet
|
||||
|
||||
// IDs gets array of ExtNetIDs from ListExtNets struct
|
||||
func (le ListExtNets) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(le.Data))
|
||||
for _, e := range le.Data {
|
||||
res = append(res, e.ID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// IDs gets array of ComputeIDs from ListExtNetComputes struct
|
||||
func (le ListExtNetComputes) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(le.Data))
|
||||
for _, e := range le.Data {
|
||||
res = append(res, e.ID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user