| @@ -4,7 +4,6 @@ import ( | |||||
| "context" | "context" | ||||
| "fmt" | "fmt" | ||||
| "github.com/mitchellh/mapstructure" | "github.com/mitchellh/mapstructure" | ||||
| "github.com/pkg/errors" | |||||
| "github.com/rs/zerolog/log" | "github.com/rs/zerolog/log" | ||||
| "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/schedule" | "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/schedule" | ||||
| "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models" | "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models" | ||||
| @@ -64,8 +63,9 @@ func NewCompareResourceSpecLogic(ctx context.Context, svcCtx *svc.ServiceContext | |||||
| } | } | ||||
| func (l *CompareResourceSpecLogic) CompareResourceSpec(req *types.ResourceSpecReq) (resp *types.PageResult, err error) { | func (l *CompareResourceSpecLogic) CompareResourceSpec(req *types.ResourceSpecReq) (resp *types.PageResult, err error) { | ||||
| log.Debug().Msgf("开始比较资源规格,ClusterId: %s, PageNum: %d, PageSize: %d", req.ClusterId, req.PageNum, req.PageSize) | |||||
| if req.ClusterId == "" { | if req.ClusterId == "" { | ||||
| return nil, errors.New("ClusterId is required") | |||||
| return resp, nil | |||||
| } | } | ||||
| // 获取集群资源数据 | // 获取集群资源数据 | ||||