modify API URL
This commit is contained in:
@@ -22,7 +22,7 @@ func Register(ws *restful.WebService, subPath string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List all PersistentVolumeClaims of a specific StorageClass
|
// List all PersistentVolumeClaims of a specific StorageClass
|
||||||
// Extended API URL: "GET /api/v1alpha/storage/storageclasses/{name}/persistentvolumeclaims"
|
// Extended API URL: "GET /api/v1alpha1/storage/storageclasses/{name}/persistentvolumeclaims"
|
||||||
func GetPvcListBySc(request *restful.Request, response *restful.Response) {
|
func GetPvcListBySc(request *restful.Request, response *restful.Response) {
|
||||||
scName := request.PathParameter("storageclass")
|
scName := request.PathParameter("storageclass")
|
||||||
claims, err := models.GetPvcListBySc(scName)
|
claims, err := models.GetPvcListBySc(scName)
|
||||||
@@ -35,7 +35,7 @@ func GetPvcListBySc(request *restful.Request, response *restful.Response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get metrics of a specific StorageClass
|
// Get metrics of a specific StorageClass
|
||||||
// Extended API URL: "GET /api/v1alpha/storage/storageclasses/{name}/metrics"
|
// Extended API URL: "GET /api/v1alpha1/storage/storageclasses/{name}/metrics"
|
||||||
func GetScMetrics(request *restful.Request, response *restful.Response) {
|
func GetScMetrics(request *restful.Request, response *restful.Response) {
|
||||||
scName := request.PathParameter("storageclass")
|
scName := request.PathParameter("storageclass")
|
||||||
metrics, err := models.GetScMetrics(scName)
|
metrics, err := models.GetScMetrics(scName)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ func Register(ws *restful.WebService, subPath string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List all pods of a specific PVC
|
// List all pods of a specific PVC
|
||||||
// Extended API URL: "GET /api/v1alpha/volumes/namespaces/{namespace}/persistentvolumeclaims/{name}/pods"
|
// Extended API URL: "GET /api/v1alpha1/volumes/namespaces/{namespace}/persistentvolumeclaims/{name}/pods"
|
||||||
func GetPodListByPvc(request *restful.Request, response *restful.Response) {
|
func GetPodListByPvc(request *restful.Request, response *restful.Response) {
|
||||||
pvcName := request.PathParameter("pvc")
|
pvcName := request.PathParameter("pvc")
|
||||||
nsName := request.PathParameter("namespace")
|
nsName := request.PathParameter("namespace")
|
||||||
|
|||||||
Reference in New Issue
Block a user