mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(region): wire: allow filter by bandwidth
This commit is contained in:
@@ -87,4 +87,6 @@ type WireListInput struct {
|
||||
ZonalFilterListBase
|
||||
|
||||
HostResourceInput
|
||||
|
||||
Bandwidth *int `json:"bandwidth"`
|
||||
}
|
||||
|
||||
@@ -1012,6 +1012,10 @@ func (manager *SWireManager) ListItemFilter(
|
||||
q = q.Filter(sqlchemy.In(q.Field("id"), sq.SubQuery()))
|
||||
}
|
||||
|
||||
if query.Bandwidth != nil {
|
||||
q = q.Equals("bandwidth", *query.Bandwidth)
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user