mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
vpcagent: apihelper: do not set details=true by default
This commit is contained in:
@@ -45,11 +45,12 @@ func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, batchSize int)
|
||||
for i, msNew := range mssNews.ModelSetList() {
|
||||
minUpdatedAt := ModelSetMaxUpdatedAt(mss[i])
|
||||
err = GetModels(&GetModelsOptions{
|
||||
ClientSession: s,
|
||||
ModelManager: msNew.ModelManager(),
|
||||
MinUpdatedAt: minUpdatedAt,
|
||||
ModelSet: msNew,
|
||||
BatchListSize: batchSize,
|
||||
ClientSession: s,
|
||||
ModelManager: msNew.ModelManager(),
|
||||
MinUpdatedAt: minUpdatedAt,
|
||||
ModelSet: msNew,
|
||||
BatchListSize: batchSize,
|
||||
IncludeDetails: true,
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
@@ -38,8 +38,9 @@ type GetModelsOptions struct {
|
||||
ModelManager mcclient_modulebase.IBaseManager
|
||||
ModelSet IModelSet
|
||||
|
||||
BatchListSize int
|
||||
MinUpdatedAt time.Time
|
||||
BatchListSize int
|
||||
MinUpdatedAt time.Time
|
||||
IncludeDetails bool
|
||||
}
|
||||
|
||||
func GetModels(opts *GetModelsOptions) error {
|
||||
@@ -100,7 +101,7 @@ func GetModels(opts *GetModelsOptions) error {
|
||||
|
||||
listOptions := options.BaseListOptions{
|
||||
Admin: options.Bool(true),
|
||||
Details: options.Bool(true),
|
||||
Details: options.Bool(opts.IncludeDetails),
|
||||
Filter: []string{
|
||||
minUpdatedAtFilter(minUpdatedAt), // order matters, filter.0
|
||||
"manager_id.isnullorempty()", // len(manager_id) > 0 is for pubcloud objects
|
||||
|
||||
Reference in New Issue
Block a user