移除ceph

Former-commit-id: 15b1d86045e6a08a0b0d6f3330b89a76eccee7f9
This commit is contained in:
zhangwei 2024-10-22 19:02:23 +08:00
parent 057e36c455
commit 9114f4e82c
5 changed files with 1 additions and 72 deletions

2
go.mod
View File

@ -23,8 +23,6 @@ require (
gitlink.org.cn/JointCloud/pcm-octopus v0.0.0-20240817071412-44397870b110
gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240403033338-e7edabad4203
gitlink.org.cn/JointCloud/pcm-slurm v0.0.0-20240301080743-8b94bbaf57f5
gitlink.org.cn/jcce-pcm/pcm-participant-ceph v0.0.0-20230904090036-24fc730ec87d
gitlink.org.cn/jcce-pcm/utils v0.0.1
go.opentelemetry.io/otel/trace v1.30.0
gonum.org/v1/gonum v0.11.0
google.golang.org/grpc v1.66.2

4
go.sum
View File

@ -476,10 +476,6 @@ gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240403033338-e7edabad4203 h1:s6
gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240403033338-e7edabad4203/go.mod h1:i2rrbMQ+Fve345BY9Heh4MUqVTAimZQElQhzzRee5B8=
gitlink.org.cn/JointCloud/pcm-slurm v0.0.0-20240301080743-8b94bbaf57f5 h1:+/5vnzkJBfMRnya1NrhOzlroUtRa5ePiYbPKlHLoLV0=
gitlink.org.cn/JointCloud/pcm-slurm v0.0.0-20240301080743-8b94bbaf57f5/go.mod h1:97AlUXN13g9UN3+9/DzCHpeoU5sbdyv0IQuTEHNexzQ=
gitlink.org.cn/jcce-pcm/pcm-participant-ceph v0.0.0-20230904090036-24fc730ec87d h1:DHjl/rLuH2gKYtY0MKMGNQDHFT12APg25RlMUQo+tHk=
gitlink.org.cn/jcce-pcm/pcm-participant-ceph v0.0.0-20230904090036-24fc730ec87d/go.mod h1:r/KLzUpupCV5jdxSfgDhc2pVjP0fBi3VhAWRttsBn30=
gitlink.org.cn/jcce-pcm/utils v0.0.1 h1:3PH93Z/JFTH5JRO9MFf3dD1Gnd12aGiIIViWBlQGuhE=
gitlink.org.cn/jcce-pcm/utils v0.0.1/go.mod h1:5cwaaqM0+HK5GXVbYozGlWvgwoUby0KytdvhbwQW1ks=
go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0=
go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28=
go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q=

View File

@ -9,7 +9,6 @@ import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
"gitlink.org.cn/jcce-pcm/utils/tool"
"gorm.io/gorm"
"log"
@ -54,7 +53,7 @@ func (l *PullTaskInfoLogic) PullTaskInfo(req *clientCore.PullTaskInfoReq) (*clie
}
var clusterType string
l.svcCtx.DbEngin.Raw("SELECT label FROM `t_cluster` where id = ? ", hpcInfo.ClusterId).Scan(&clusterType)
tool.Convert(hpcInfo.Environment, &resp.HpcInfoList[i].Environment)
utils.Convert(hpcInfo.Environment, &resp.HpcInfoList[i].Environment)
resp.HpcInfoList[i].ClusterType = clusterType
}
}

View File

@ -1,61 +0,0 @@
/*
Copyright (c) [2023] [pcm]
[pcm-coordinator] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
package storage
import (
"context"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/helper/xerr"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
"gitlink.org.cn/jcce-pcm/pcm-participant-ceph/ceph"
"k8s.io/apimachinery/pkg/util/json"
"github.com/zeromicro/go-zero/core/logx"
)
type ScreenStorageLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewScreenStorageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ScreenStorageLogic {
return &ScreenStorageLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *ScreenStorageLogic) ScreenStorage(req *types.StorageScreenReq) (resp *types.StorageScreenResp, err error) {
// todo: add your logic here and delete this line
storageScreenReq := &ceph.StorageScreenReq{}
err = copier.CopyWithOption(storageScreenReq, req, copier.Option{Converters: utils.Converters})
StorageScreenResp, err := l.svcCtx.CephRpc.StorageScreen(l.ctx, storageScreenReq)
if err != nil {
return nil, errors.Wrapf(xerr.NewErrMsg("Failed to get db storage list"), "Failed to get db storage list err : %v ,req:%+v", err, req)
}
marshal, err := json.Marshal(&StorageScreenResp)
if err != nil {
return nil, result.NewDefaultError(err.Error())
}
json.Unmarshal(marshal, &resp)
err = copier.CopyWithOption(&resp, &StorageScreenResp, copier.Option{Converters: utils.Converters})
return resp, nil
}

View File

@ -33,7 +33,6 @@ import (
"gitlink.org.cn/JointCloud/pcm-octopus/octopusclient"
"gitlink.org.cn/JointCloud/pcm-openstack/openstackclient"
slurmClient "gitlink.org.cn/JointCloud/pcm-slurm/slurmclient"
"gitlink.org.cn/jcce-pcm/pcm-participant-ceph/cephclient"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
@ -51,7 +50,6 @@ type ServiceContext struct {
ACRpc hpcacclient.HpcAC
THRpc slurmClient.Slurm
OctopusRpc octopusclient.Octopus
CephRpc cephclient.Ceph
OpenstackRpc openstackclient.Openstack
MonitorClient map[int64]tracker.Prometheus
PromClient tracker.Prometheus
@ -128,7 +126,6 @@ func NewServiceContext(c config.Config) *ServiceContext {
RedisClient: redisClient,
ModelArtsRpc: modelartsservice.NewModelArtsService(zrpc.MustNewClient(c.ModelArtsRpcConf)),
ModelArtsImgRpc: imagesservice.NewImagesService(zrpc.MustNewClient(c.ModelArtsImgRpcConf)),
CephRpc: cephclient.NewCeph(zrpc.MustNewClient(c.CephRpcConf)),
ACRpc: hpcacclient.NewHpcAC(zrpc.MustNewClient(c.ACRpcConf)),
OctopusRpc: octopusclient.NewOctopus(zrpc.MustNewClient(c.OctopusRpcConf)),
OpenstackRpc: openstackclient.NewOpenstack(zrpc.MustNewClient(c.OpenstackRpcConf)),