Add the API of listing all PVC of the specific storageclass

This commit is contained in:
wnxn
2018-05-24 17:21:41 +08:00
parent d2402b33c1
commit b7307da620
3 changed files with 83 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
package storage
import (
"github.com/emicklei/go-restful"
"kubesphere.io/kubesphere/pkg/filter/route"
"kubesphere.io/kubesphere/pkg/models"
)
func Register(ws *restful.WebService, subPath string) {
ws.Route(ws.GET(subPath+"/storageclasses/{storageclass}/persistentvolumeclaims").
To(models.GetPvcListBySc).Filter(route.RouteLogging)).
Consumes(restful.MIME_JSON, restful.MIME_XML).
Produces(restful.MIME_JSON)
}