diff --git a/adaptor/PCM-CORE/api/internal/config/config.go b/adaptor/PCM-CORE/api/internal/config/config.go index 1a862052..21e0d04c 100644 --- a/adaptor/PCM-CORE/api/internal/config/config.go +++ b/adaptor/PCM-CORE/api/internal/config/config.go @@ -32,4 +32,5 @@ type Config struct { ModelArtsRpcConf zrpc.RpcClientConf CephRpcConf zrpc.RpcClientConf OctopusRpcConf zrpc.RpcClientConf + NexusUrl string } diff --git a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go index b9c6faed..cab880f0 100644 --- a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go @@ -28,7 +28,7 @@ func NewImageListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageLi func (l *ImageListLogic) ImageList() (resp *types.ImageListResp, err error) { client := &http.Client{} - url := fmt.Sprintf("%s/repository/%s/v2/_catalog", "http://10.101.15.175:8081", "pcm") + url := fmt.Sprintf("%s/repository/%s/v2/_catalog", l.svcCtx.Config.NexusUrl, "pcm") req, err := http.NewRequest("GET", url, nil) if err != nil { return nil, err diff --git a/adaptor/PCM-CORE/api/internal/logic/image/imagetagslogic.go b/adaptor/PCM-CORE/api/internal/logic/image/imagetagslogic.go index afc4bea5..72484687 100644 --- a/adaptor/PCM-CORE/api/internal/logic/image/imagetagslogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/image/imagetagslogic.go @@ -28,7 +28,7 @@ func NewImageTagsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageTa func (l *ImageTagsLogic) ImageTags(req *types.ImageTagsReq) (resp *types.ImageTagsResp, err error) { client := &http.Client{} - url := fmt.Sprintf("%s/repository/%s/v2/%s/tags/list", "http://10.101.15.175:8081", "pcm", req.Name) + url := fmt.Sprintf("%s/repository/%s/v2/%s/tags/list", l.svcCtx.Config.NexusUrl, "pcm", req.Name) httpReq, err := http.NewRequest("GET", url, nil) if err != nil { return nil, err