mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
remove some debug log
This commit is contained in:
@@ -524,7 +524,7 @@ func (dispatcher *DBModelDispatcher) tryGetModelProperty(ctx context.Context, pr
|
||||
}
|
||||
|
||||
func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
log.Debugf("Get %s", idStr)
|
||||
// log.Debugf("Get %s", idStr)
|
||||
userCred := fetchUserCredential(ctx)
|
||||
|
||||
data, err := dispatcher.tryGetModelProperty(ctx, idStr, query)
|
||||
@@ -541,7 +541,7 @@ func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, quer
|
||||
} else if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Debugf("Get found %s", model)
|
||||
// log.Debugf("Get found %s", model)
|
||||
if !model.AllowGetDetails(ctx, userCred, query) {
|
||||
return nil, httperrors.NewForbiddenError("Not allow to get details")
|
||||
}
|
||||
|
||||
@@ -161,16 +161,16 @@ func (model *SVirtualResourceBase) AllowPerformMetadata(ctx context.Context, use
|
||||
}
|
||||
|
||||
func (model *SVirtualResourceBase) GetTenantCache(ctx context.Context) (*STenant, error) {
|
||||
log.Debugf("Get tenant by Id %s", model.ProjectId)
|
||||
// log.Debugf("Get tenant by Id %s", model.ProjectId)
|
||||
return TenantCacheManager.FetchTenantById(ctx, model.ProjectId)
|
||||
}
|
||||
|
||||
func (model *SVirtualResourceBase) getMoreDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, extra *jsonutils.JSONDict) *jsonutils.JSONDict {
|
||||
if userCred.IsSystemAdmin() {
|
||||
log.Debugf("GetCustomizeColumns")
|
||||
// log.Debugf("GetCustomizeColumns")
|
||||
tobj, err := model.GetTenantCache(ctx)
|
||||
if err == nil {
|
||||
log.Debugf("GetTenantFromCache %s", jsonutils.Marshal(tobj))
|
||||
// log.Debugf("GetTenantFromCache %s", jsonutils.Marshal(tobj))
|
||||
extra.Add(jsonutils.NewString(tobj.GetName()), "tenant")
|
||||
} else {
|
||||
log.Errorf("GetTenantCache fail %s", err)
|
||||
|
||||
Reference in New Issue
Block a user