fix terminal api

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-04-12 12:27:33 +08:00
committed by zryfish
parent eea2bb3724
commit 8e862cafb2
34 changed files with 259 additions and 194 deletions

View File

@@ -41,14 +41,14 @@ func addWebService(c *restful.Container) error {
tags := []string{"Terminal"}
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pods}").
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pod}").
To(terminal.CreateTerminalSession).
Doc("create terminal session").
Metadata(restfulspec.KeyOpenAPITags, tags).
Writes(models.PodInfo{}))
path := runtime.ApiRootPath + "/" + GroupVersion.String() + "/sockjs"
c.Handle(path, terminal.NewTerminalHandler(path))
c.Handle(path+"/", terminal.NewTerminalHandler(path))
c.Add(webservice)