Browse Source

fix:modify virtual machine interfaces

Former-commit-id: 3c32995455
pull/41/head
qiwang 1 year ago
parent
commit
d9f0f3d204
100 changed files with 280 additions and 1441 deletions
  1. +8
    -4
      api/internal/handler/adapters/adapterslisthandler.go
  2. +8
    -4
      api/internal/handler/adapters/clusterlisthandler.go
  3. +8
    -4
      api/internal/handler/adapters/createadapterhandler.go
  4. +8
    -4
      api/internal/handler/adapters/createclusterhandler.go
  5. +8
    -4
      api/internal/handler/adapters/deleteadapterhandler.go
  6. +8
    -4
      api/internal/handler/adapters/deleteclusterhandler.go
  7. +8
    -4
      api/internal/handler/adapters/getadapterhandler.go
  8. +8
    -4
      api/internal/handler/adapters/getadapterrelationhandler.go
  9. +8
    -4
      api/internal/handler/adapters/getclusterhandler.go
  10. +8
    -4
      api/internal/handler/adapters/getclustersumhandler.go
  11. +8
    -4
      api/internal/handler/adapters/updateadapterhandler.go
  12. +8
    -4
      api/internal/handler/adapters/updateclusterhandler.go
  13. +0
    -14
      api/internal/handler/ai/createalgorithmhandler.go
  14. +0
    -14
      api/internal/handler/ai/createdatasethandler.go
  15. +0
    -14
      api/internal/handler/ai/createexporttaskhandler.go
  16. +0
    -14
      api/internal/handler/ai/createnotebookhandler.go
  17. +0
    -14
      api/internal/handler/ai/createprocessortaskhandler.go
  18. +0
    -14
      api/internal/handler/ai/createservicehandler.go
  19. +0
    -14
      api/internal/handler/ai/createtaskhandler.go
  20. +0
    -14
      api/internal/handler/ai/createtrainingjobhandler.go
  21. +0
    -14
      api/internal/handler/ai/createvisualizationjobhandler.go
  22. +0
    -14
      api/internal/handler/ai/deletealgorithmhandler.go
  23. +0
    -14
      api/internal/handler/ai/deletedatasethandler.go
  24. +0
    -14
      api/internal/handler/ai/deleteservicehandler.go
  25. +0
    -14
      api/internal/handler/ai/deletetrainingjobhandler.go
  26. +0
    -14
      api/internal/handler/ai/getexporttasksofdatasethandler.go
  27. +0
    -14
      api/internal/handler/ai/getexporttaskstatusofdatasethandler.go
  28. +0
    -14
      api/internal/handler/ai/getlisttrainingjobshandler.go
  29. +0
    -14
      api/internal/handler/ai/getnotebookstoragehandler.go
  30. +0
    -14
      api/internal/handler/ai/getvisualizationjobhandler.go
  31. +0
    -14
      api/internal/handler/ai/listalgorithmshandler.go
  32. +0
    -14
      api/internal/handler/ai/listclustershandler.go
  33. +0
    -14
      api/internal/handler/ai/listdatasethandler.go
  34. +0
    -14
      api/internal/handler/ai/listimporthandler.go
  35. +0
    -14
      api/internal/handler/ai/listnotebookhandler.go
  36. +0
    -14
      api/internal/handler/ai/listserviceshandler.go
  37. +0
    -14
      api/internal/handler/ai/mountnotebookstoragehandler.go
  38. +0
    -14
      api/internal/handler/ai/showalgorithmbyuuidhandler.go
  39. +0
    -14
      api/internal/handler/ai/showservicehandler.go
  40. +0
    -14
      api/internal/handler/ai/startnotebookhandler.go
  41. +0
    -14
      api/internal/handler/ai/stopnotebookhandler.go
  42. +8
    -4
      api/internal/handler/apps/appdetailhandler.go
  43. +8
    -4
      api/internal/handler/apps/applisthandler.go
  44. +8
    -4
      api/internal/handler/apps/apppodshandler.go
  45. +8
    -4
      api/internal/handler/apps/deleteappbyappnamehandler.go
  46. +8
    -4
      api/internal/handler/apps/getappbyappnamehandler.go
  47. +8
    -4
      api/internal/handler/apps/pauseappbyappnamehandler.go
  48. +8
    -4
      api/internal/handler/apps/restartappbyappnamehandler.go
  49. +8
    -4
      api/internal/handler/apps/startappbyappnamehandler.go
  50. +8
    -4
      api/internal/handler/apps/updateappbyappnamehandler.go
  51. +8
    -17
      api/internal/handler/cloud/cloudlisthandler.go
  52. +5
    -2
      api/internal/handler/cloud/controllermetricshandler.go
  53. +0
    -14
      api/internal/handler/cloud/deleteyamlhandler.go
  54. +0
    -24
      api/internal/handler/cloud/listcloudclusterhandler.go
  55. +8
    -3
      api/internal/handler/cloud/noticetenanthandler.go
  56. +8
    -4
      api/internal/handler/cloud/registerclusterhandler.go
  57. +0
    -14
      api/internal/handler/hpc/listhistoryjobhandler.go
  58. +0
    -14
      api/internal/handler/hpc/listjobhandler.go
  59. +6
    -16
      api/internal/handler/hpc/queueassetshandler.go
  60. +7
    -194
      api/internal/handler/image/chunkhandler.go
  61. +5
    -16
      api/internal/handler/image/datasetcheckhandler.go
  62. +6
    -16
      api/internal/handler/image/imagelisthandler.go
  63. +11
    -62
      api/internal/handler/image/uploaddatasethandler.go
  64. +8
    -105
      api/internal/handler/image/uploadhandler.go
  65. +8
    -3
      api/internal/handler/schedule/schedulegetairesourcetypeshandler.go
  66. +8
    -3
      api/internal/handler/schedule/schedulegetaitasktypeshandler.go
  67. +8
    -3
      api/internal/handler/schedule/schedulegetdatasetshandler.go
  68. +8
    -3
      api/internal/handler/schedule/schedulegetstrategyhandler.go
  69. +8
    -4
      api/internal/handler/schedule/schedulesubmithandler.go
  70. +0
    -14
      api/internal/handler/storage/dailypowerscreenhandler.go
  71. +0
    -14
      api/internal/handler/storage/percentercomputerpowershandler.go
  72. +0
    -14
      api/internal/handler/storage/screenstoragehandler.go
  73. +0
    -14
      api/internal/handler/storelink/deletelinkimagehandler.go
  74. +0
    -14
      api/internal/handler/storelink/deletelinktaskhandler.go
  75. +0
    -14
      api/internal/handler/storelink/getaispecshandler.go
  76. +0
    -14
      api/internal/handler/storelink/getlinkimagelisthandler.go
  77. +0
    -14
      api/internal/handler/storelink/getlinktaskhandler.go
  78. +0
    -14
      api/internal/handler/storelink/getparticipantshandler.go
  79. +0
    -14
      api/internal/handler/storelink/submitlinktaskhandler.go
  80. +0
    -14
      api/internal/handler/storelink/uploadlinkimagehandler.go
  81. +0
    -14
      api/internal/handler/vm/bulkcreatenetworkshandler.go
  82. +0
    -14
      api/internal/handler/vm/createimagehandler.go
  83. +0
    -14
      api/internal/handler/vm/createnetworkhandler.go
  84. +0
    -14
      api/internal/handler/vm/createnodehandler.go
  85. +0
    -14
      api/internal/handler/vm/createserverhandler.go
  86. +0
    -14
      api/internal/handler/vm/createsubnethandler.go
  87. +0
    -14
      api/internal/handler/vm/createvolumehandler.go
  88. +0
    -14
      api/internal/handler/vm/createvolumetypeshandler.go
  89. +0
    -14
      api/internal/handler/vm/deleteimagehandler.go
  90. +0
    -14
      api/internal/handler/vm/deletenetworkhandler.go
  91. +0
    -14
      api/internal/handler/vm/deletenodehandler.go
  92. +0
    -14
      api/internal/handler/vm/deleteserverhandler.go
  93. +0
    -14
      api/internal/handler/vm/deletevolumehandler.go
  94. +0
    -14
      api/internal/handler/vm/deletevolumetypehandler.go
  95. +0
    -14
      api/internal/handler/vm/getcomputelimitshandler.go
  96. +0
    -14
      api/internal/handler/vm/getserversdetailedbyidhandler.go
  97. +0
    -14
      api/internal/handler/vm/getvolumedetailedbyidhandler.go
  98. +0
    -14
      api/internal/handler/vm/getvolumelimitshandler.go
  99. +0
    -14
      api/internal/handler/vm/listflavorsdetailhandler.go
  100. +0
    -14
      api/internal/handler/vm/listimageshandler.go

+ 8
- 4
api/internal/handler/adapters/adapterslisthandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func AdaptersListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterQueryReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewAdaptersListLogic(r.Context(), svcCtx)
resp, err := l.AdaptersList(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/clusterlisthandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ClusterListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewClusterListLogic(r.Context(), svcCtx)
resp, err := l.ClusterList(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/createadapterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func CreateAdapterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterCreateReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewCreateAdapterLogic(r.Context(), svcCtx)
resp, err := l.CreateAdapter(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/createclusterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func CreateClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewCreateClusterLogic(r.Context(), svcCtx)
resp, err := l.CreateCluster(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/deleteadapterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func DeleteAdapterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterDelReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewDeleteAdapterLogic(r.Context(), svcCtx)
resp, err := l.DeleteAdapter(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/deleteclusterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func DeleteClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterDelReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewDeleteClusterLogic(r.Context(), svcCtx)
resp, err := l.DeleteCluster(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/getadapterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func GetAdapterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterDelReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewGetAdapterLogic(r.Context(), svcCtx)
resp, err := l.GetAdapter(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/getadapterrelationhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func GetAdapterRelationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterQueryReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewGetAdapterRelationLogic(r.Context(), svcCtx)
resp, err := l.GetAdapterRelation(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/getclusterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func GetClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterDelReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewGetClusterLogic(r.Context(), svcCtx)
resp, err := l.GetCluster(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/getclustersumhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func GetClusterSumHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterSumReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewGetClusterSumLogic(r.Context(), svcCtx)
resp, err := l.GetClusterSum(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/updateadapterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func UpdateAdapterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdapterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewUpdateAdapterLogic(r.Context(), svcCtx)
resp, err := l.UpdateAdapter(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/adapters/updateclusterhandler.go View File

@@ -1,24 +1,28 @@
package adapters

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/adapters"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func UpdateClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ClusterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := adapters.NewUpdateClusterLogic(r.Context(), svcCtx)
resp, err := l.UpdateCluster(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 0
- 14
api/internal/handler/ai/createalgorithmhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createdatasethandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createexporttaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createnotebookhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createprocessortaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createservicehandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createtaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createtrainingjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/createvisualizationjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/deletealgorithmhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/deletedatasethandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/deleteservicehandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/deletetrainingjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/getexporttasksofdatasethandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/getexporttaskstatusofdatasethandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/getlisttrainingjobshandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/getnotebookstoragehandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/getvisualizationjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listalgorithmshandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listclustershandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listdatasethandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listimporthandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listnotebookhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/listserviceshandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/mountnotebookstoragehandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/showalgorithmbyuuidhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/showservicehandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/startnotebookhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 0
- 14
api/internal/handler/ai/stopnotebookhandler.go View File

@@ -1,17 +1,3 @@
/*

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 ai

import (


+ 8
- 4
api/internal/handler/apps/appdetailhandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func AppDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewAppDetailLogic(r.Context(), svcCtx)
resp, err := l.AppDetail(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/applisthandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func AppListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppListReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewAppListLogic(r.Context(), svcCtx)
resp, err := l.AppList(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/apppodshandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func AppPodsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewAppPodsLogic(r.Context(), svcCtx)
resp, err := l.AppPods(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/deleteappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func DeleteAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewDeleteAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.DeleteAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/getappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func GetAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AppDetailReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewGetAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.GetAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/pauseappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func PauseAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewPauseAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.PauseAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/restartappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func RestartAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewRestartAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.RestartAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/startappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func StartAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewStartAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.StartAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/apps/updateappbyappnamehandler.go View File

@@ -1,24 +1,28 @@
package apps

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/apps"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func UpdateAppByAppNameHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteAppReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := apps.NewUpdateAppByAppNameLogic(r.Context(), svcCtx)
resp, err := l.UpdateAppByAppName(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 17
api/internal/handler/cloud/cloudlisthandler.go View File

@@ -1,30 +1,21 @@
/*

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 cloud

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func CloudListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := cloud.NewCloudListLogic(r.Context(), svcCtx)
resp, err := l.CloudList()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 5
- 2
api/internal/handler/cloud/controllermetricshandler.go View File

@@ -1,7 +1,6 @@
package cloud

import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
@@ -20,6 +19,10 @@ func ControllerMetricsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {

l := cloud.NewControllerMetricsLogic(r.Context(), svcCtx)
resp, err := l.ControllerMetrics(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 0
- 14
api/internal/handler/cloud/deleteyamlhandler.go View File

@@ -1,17 +1,3 @@
/*

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 cloud

import (


+ 0
- 24
api/internal/handler/cloud/listcloudclusterhandler.go View File

@@ -1,24 +0,0 @@
package cloud

import (
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ListCloudClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ListClusterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
return
}

l := cloud.NewListCloudClusterLogic(r.Context(), svcCtx)
resp, err := l.ListCloudCluster(&req)
result.HttpResult(r, w, resp, err)
}
}

+ 8
- 3
api/internal/handler/cloud/noticetenanthandler.go View File

@@ -1,16 +1,21 @@
package cloud

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func NoticeTenantHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := cloud.NewNoticeTenantLogic(r.Context(), svcCtx)
resp, err := l.NoticeTenant()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/cloud/registerclusterhandler.go View File

@@ -1,24 +1,28 @@
package cloud

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/cloud"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func RegisterClusterHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.RegisterClusterReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := cloud.NewRegisterClusterLogic(r.Context(), svcCtx)
resp, err := l.RegisterCluster(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 0
- 14
api/internal/handler/hpc/listhistoryjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 hpc

import (


+ 0
- 14
api/internal/handler/hpc/listjobhandler.go View File

@@ -1,17 +1,3 @@
/*

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 hpc

import (


+ 6
- 16
api/internal/handler/hpc/queueassetshandler.go View File

@@ -1,23 +1,9 @@
/*

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 hpc

import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/hpc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)
@@ -26,6 +12,10 @@ func QueueAssetsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := hpc.NewQueueAssetsLogic(r.Context(), svcCtx)
resp, err := l.QueueAssets()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 7
- 194
api/internal/handler/image/chunkhandler.go View File

@@ -1,208 +1,21 @@
/*

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 image

import (
"bufio"
"context"
"encoding/base64"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
types2 "github.com/docker/docker/api/types"
"github.com/zeromicro/go-zero/core/logx"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/fileutils"
"io/ioutil"
"k8s.io/apimachinery/pkg/util/json"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)

var dir, _ = os.Getwd()
var uploadPath = filepath.Join(dir, "uploads")

func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
size, _ := strconv.ParseInt(r.PostFormValue("size"), 10, 64)
hash := r.PostFormValue("hash")
name := r.PostFormValue("name")
dataType := r.PostFormValue("dataType")
kind := r.PostFormValue("kind")
// 对比合并请求的文件大小和已上传文件夹大小
toSize, err := fileutils.GetDirSize(filepath.Join(uploadTempPath, hash))
l := image.NewChunkLogic(r.Context(), svcCtx)
err := l.Chunk()
if err != nil {
logx.Error(err)
result.HttpResult(r, w, nil, err)
return
}
if size != toSize {
fmt.Fprintf(w, "文件上传错误")
}
chunksPath := filepath.Join(uploadTempPath, hash)
files, _ := ioutil.ReadDir(chunksPath)
// 将文件根据索引序号排序
filesSort := make(map[string]string)
for _, f := range files {
nameArr := strings.Split(f.Name(), "-")
filesSort[nameArr[1]] = f.Name()
}
saveFile := filepath.Join(uploadPath, name)
if exists, _ := fileutils.PathExists(saveFile); exists {
os.Remove(saveFile)
}
fs, _ := os.OpenFile(saveFile, os.O_CREATE|os.O_RDWR|os.O_APPEND, os.ModeAppend|os.ModePerm)

var wg sync.WaitGroup
filesCount := len(files)
if filesCount != len(filesSort) {
fmt.Fprintf(w, "文件上传错误2")
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.Ok(w)
}
wg.Add(filesCount)
for i := 0; i < filesCount; i++ {
// 这里一定要注意按顺序读取不然文件就会损坏
fileName := filepath.Join(chunksPath, filesSort[strconv.Itoa(i)])
data, err := ioutil.ReadFile(fileName)
fmt.Println(err)
fs.Write(data)
wg.Done()
}
wg.Wait()
os.RemoveAll(chunksPath)

// 保存到数据库表里
svcCtx.DbEngin.Create(&models.File{
Name: name,
Hash: hash,
DataType: dataType,
Status: "local",
Kind: kind,
Bucket: "pcm"})

// 根据数据类型按需上传(镜像推送到nexus 数据集和算法推送到云际存储)
switch kind {
case "image":
err = pushImage(svcCtx, hash, name)
case "dataSet", "algorithm":
err = uploadStorage(svcCtx, hash, name)
}
// 删除本地文件 避免占用本地存储资源
defer os.Remove(filepath.Join(uploadPath, name))
defer fs.Close()
result.HttpResult(r, w, nil, err)
}
}

// 同步数据集到modelArts
func syncDataSet() {

}

// 上传文件到云集存储
func uploadStorage(svcCtx *svc.ServiceContext, hash string, name string) error {
fileInfo, err := os.Open(filepath.Join(uploadPath, name))
if err != nil {
logx.Error(err)
return err
}
_, err = svcCtx.Uploader.Upload(&s3manager.UploadInput{
Bucket: aws.String("pcm"),
Key: aws.String(name),
Body: fileInfo,
})
if err != nil {
logx.Error(err)
return err
}
// 更新数据状态
svcCtx.DbEngin.Model(&models.File{}).Where("hash = ?", hash).Update("status", "cloud")
return nil
}

// 推送镜像到nexus仓库
func pushImage(svcCtx *svc.ServiceContext, hash string, name string) error {
// 加载镜像文件到docker
fileInfo, err := os.Open(filepath.Join(uploadPath, name))
if err != nil {
logx.Error(err)
return err
}
defer fileInfo.Close()
reader := bufio.NewReader(fileInfo)

body, err := svcCtx.DockerClient.ImageLoad(context.Background(), reader, false)

if err != nil {
logx.Error(err)
return err
}
bytes, err := ioutil.ReadAll(body.Body)
println(string(bytes))
if err != nil {
logx.Error(err)
return err
}
//time.Sleep(12 * 100 * time.Millisecond)
privateImageName := "registry.cn-hangzhou.aliyuncs.com/jointcloud/pcm:" + name
// 给镜像打上私有仓库的tag
err = svcCtx.DockerClient.ImageTag(context.Background(), name, privateImageName)
if err != nil {
logx.Error(err)
return err
}
// 删除原镜像
_, err = svcCtx.DockerClient.ImageRemove(context.Background(), name, types2.ImageRemoveOptions{})
if err != nil {
logx.Error(err)
return err
}
// 推送镜像到registry
authConfig := types2.AuthConfig{
Username: svcCtx.Config.RegistryConf.Username,
Password: svcCtx.Config.RegistryConf.Password,
}
authConfigBytes, err := json.Marshal(authConfig)
if err != nil {
logx.Error(err)
return err
}
logx.Infof(fmt.Sprintln("传输开始", time.Now()))
authStr := base64.URLEncoding.EncodeToString(authConfigBytes)
pushBody, err := svcCtx.DockerClient.ImagePush(context.Background(), privateImageName, types2.ImagePushOptions{RegistryAuth: authStr})
pushBytes, _ := ioutil.ReadAll(pushBody)
println(string(pushBytes))
if err != nil {
logx.Error(err)
return err
}
logx.Infof(fmt.Sprintln("传输完成", time.Now()))
// 删除本地镜像 避免存储资源浪费
_, err = svcCtx.DockerClient.ImageRemove(context.Background(), privateImageName, types2.ImageRemoveOptions{})
if err != nil {
logx.Error(err)
return err
}
// 更新数据状态
svcCtx.DbEngin.Model(&models.File{}).Where("hash = ?", hash).Update("status", "cloud")
return nil
}

+ 5
- 16
api/internal/handler/image/datasetcheckhandler.go View File

@@ -1,21 +1,6 @@
/*

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 image

import (
result2 "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
@@ -34,6 +19,10 @@ func DataSetCheckHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {

l := image.NewDataSetCheckLogic(r.Context(), svcCtx)
resp, err := l.DataSetCheck(&req)
result2.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 6
- 16
api/internal/handler/image/imagelisthandler.go View File

@@ -1,23 +1,9 @@
/*

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 image

import (
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)
@@ -26,6 +12,10 @@ func ImageListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := image.NewImageListLogic(r.Context(), svcCtx)
resp, err := l.ImageList()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 11
- 62
api/internal/handler/image/uploaddatasethandler.go View File

@@ -1,72 +1,21 @@
/*

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 image

import (
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)

func UploadDataSetHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
////file, fileHeader, err := r.FormFile("file")
////if err != nil {
//// return
////}
//AK := "your_access_key"
//SK := "your_secret_key"
//cred := aws.Credentials{AccessKeyID: AK, SecretAccessKey: SK}
//
//uploader := manager.NewUploader(client)
//endpointURL := "http://10.105.24.4:7480"
//
//customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
// return aws.Endpoint{
// URL: endpointURL,
// }, nil
//})
//
//client := s3.NewFromConfig(aws.Config{Credentials: credentials.NewAccessKeyCredential()})
//cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithEndpointResolverWithOptions(customResolver))
//if err != nil {
// panic(err)
//}
//
//s3Client := s3.NewFromConfig(cfg, func(options *s3.Options) {
// options.UsePathStyle = true
//})
// 上传文件
//uploader := manager.NewUploader(s3Client)
//bucket := "pcm"
//key := fileHeader.Filename
//result, err := uploader.Upload(context.TODO(), &s3.PutObjectInput{
// Bucket: &bucket,
// Key: &key,
// Body: file,
//})
//println(result)
//output, err := s3Client.ListObjectsV2(context.TODO(), &s3.ListObjectsV2Input{
// Bucket: aws.String("my-bucket"),
//})
//if err != nil {
// log.Fatal(err)
//}
//
//log.Println("first page results:")
//for _, object := range output.Contents {
// log.Printf("key=%s size=%d", aws.ToString(object.Key), object.Size)
//}
l := image.NewUploadDataSetLogic(r.Context(), svcCtx)
err := l.UploadDataSet()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.Ok(w)
}
}
}

+ 8
- 105
api/internal/handler/image/uploadhandler.go View File

@@ -1,118 +1,21 @@
/*

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 image

import (
"bufio"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/fileutils"
"io"
"net/http"
"os"
"path/filepath"
"strconv"
"syscall"
)

type LoadBody struct {
Stream string `json:"stream"`
}

var uploadTempPath = filepath.Join(uploadPath, "temp")
"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/image"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
)

func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
file, fileHeader, err := r.FormFile("file")
l := image.NewUploadLogic(r.Context(), svcCtx)
err := l.Upload()
if err != nil {
logx.Error(err)
result.HttpResult(r, w, nil, err)
return
}
index := r.PostFormValue("index")
hash := r.PostFormValue("hash")

defer file.Close()
// 合并路径
chunksPath := filepath.Join(uploadTempPath, hash)
// 文件路径
filePath := filepath.Join(chunksPath, hash+"-"+index)
// 检查临时文件夹是否存在 不存在则创建文件夹
isPathExists, err := fileutils.PathExists(chunksPath)
if !isPathExists {
err = os.MkdirAll(chunksPath, os.ModePerm)
if err != nil {
logx.Error(err)
result.HttpResult(r, w, nil, err)
return
}
}
// 检查文件是否存在
exists, err := fileutils.PathExists(filePath)
if err != nil {
logx.Error(err)
result.HttpResult(r, w, nil, err)
return
}
// 文件存在 进行断点续传
if exists {
fileInfo, _ := os.Stat(filePath)
if fileInfo.Size() == fileHeader.Size {
result.HttpResult(r, w, nil, err)
return
}
start := strconv.Itoa(int(fileInfo.Size()))
oldFile, _ := os.OpenFile(filePath, os.O_CREATE|os.O_WRONLY, os.ModePerm)
defer oldFile.Close()
count, _ := strconv.ParseInt(start, 10, 64)
fmt.Println("已上传:", count)
// 设置读,写的偏移量
file.Seek(count, 0)
oldFile.Seek(count, 0)
data := make([]byte, 1024, 1024)
for {
total, err := file.Read(data)
if err == io.EOF {
fmt.Println("文件复制完毕")
break
}
oldFile.Write(data[:total])

}
// 文件不存在 直接上传
httpx.ErrorCtx(r.Context(), w, err)
} else {
destFile, _ := os.OpenFile(filepath.Join(chunksPath, hash+"-"+index), syscall.O_CREAT|syscall.O_WRONLY, 0777)
reader := bufio.NewReader(file)
writer := bufio.NewWriter(destFile)
buf := make([]byte, 1024*1024) // 1M buf
for {
n, err := reader.Read(buf)
if err == io.EOF {
writer.Flush()
break
} else if err != nil {
return
} else {
writer.Write(buf[:n])
}
}
defer file.Close()
defer destFile.Close()
httpx.Ok(w)
}
result.HttpResult(r, w, nil, err)
}
}

+ 8
- 3
api/internal/handler/schedule/schedulegetairesourcetypeshandler.go View File

@@ -1,16 +1,21 @@
package schedule

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/schedule"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ScheduleGetAiResourceTypesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := schedule.NewScheduleGetAiResourceTypesLogic(r.Context(), svcCtx)
resp, err := l.ScheduleGetAiResourceTypes()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 3
api/internal/handler/schedule/schedulegetaitasktypeshandler.go View File

@@ -1,16 +1,21 @@
package schedule

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/schedule"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ScheduleGetAiTaskTypesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := schedule.NewScheduleGetAiTaskTypesLogic(r.Context(), svcCtx)
resp, err := l.ScheduleGetAiTaskTypes()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 3
api/internal/handler/schedule/schedulegetdatasetshandler.go View File

@@ -1,16 +1,21 @@
package schedule

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/schedule"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ScheduleGetDatasetsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := schedule.NewScheduleGetDatasetsLogic(r.Context(), svcCtx)
resp, err := l.ScheduleGetDatasets()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 3
api/internal/handler/schedule/schedulegetstrategyhandler.go View File

@@ -1,16 +1,21 @@
package schedule

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/schedule"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ScheduleGetStrategyHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := schedule.NewScheduleGetStrategyLogic(r.Context(), svcCtx)
resp, err := l.ScheduleGetStrategy()
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 8
- 4
api/internal/handler/schedule/schedulesubmithandler.go View File

@@ -1,24 +1,28 @@
package schedule

import (
"net/http"

"github.com/zeromicro/go-zero/rest/httpx"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/schedule"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"net/http"
)

func ScheduleSubmitHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ScheduleReq
if err := httpx.Parse(r, &req); err != nil {
result.ParamErrorResult(r, w, err)
httpx.ErrorCtx(r.Context(), w, err)
return
}

l := schedule.NewScheduleSubmitLogic(r.Context(), svcCtx)
resp, err := l.ScheduleSubmit(&req)
result.HttpResult(r, w, resp, err)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}

+ 0
- 14
api/internal/handler/storage/dailypowerscreenhandler.go View File

@@ -1,17 +1,3 @@
/*

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 (


+ 0
- 14
api/internal/handler/storage/percentercomputerpowershandler.go View File

@@ -1,17 +1,3 @@
/*

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 (


+ 0
- 14
api/internal/handler/storage/screenstoragehandler.go View File

@@ -1,17 +1,3 @@
/*

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 (


+ 0
- 14
api/internal/handler/storelink/deletelinkimagehandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/deletelinktaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/getaispecshandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/getlinkimagelisthandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/getlinktaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/getparticipantshandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/submitlinktaskhandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/storelink/uploadlinkimagehandler.go View File

@@ -1,17 +1,3 @@
/*

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 storelink

import (


+ 0
- 14
api/internal/handler/vm/bulkcreatenetworkshandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createimagehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createnetworkhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createnodehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createserverhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createsubnethandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createvolumehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/createvolumetypeshandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deleteimagehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deletenetworkhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deletenodehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deleteserverhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deletevolumehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/deletevolumetypehandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/getcomputelimitshandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/getserversdetailedbyidhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/getvolumedetailedbyidhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/getvolumelimitshandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/listflavorsdetailhandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


+ 0
- 14
api/internal/handler/vm/listimageshandler.go View File

@@ -1,17 +1,3 @@
/*

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 vm

import (


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save