@@ -49,11 +49,11 @@ func addWebService(c *restful.Container) error {
|
|||||||
|
|
||||||
webservice.Route(webservice.POST("/namespaces/{namespace}/jobs/{job}").
|
webservice.Route(webservice.POST("/namespaces/{namespace}/jobs/{job}").
|
||||||
To(operations.RerunJob).
|
To(operations.RerunJob).
|
||||||
Doc("Job rerun").
|
Doc("Rerun job whether the job is complete or not").
|
||||||
Deprecate().
|
Deprecate().
|
||||||
Param(webservice.PathParameter("job", "job name")).
|
Param(webservice.PathParameter("job", "job name")).
|
||||||
Param(webservice.PathParameter("namespace", "job's namespace")).
|
Param(webservice.PathParameter("namespace", "the namespace where the job runs in")).
|
||||||
Param(webservice.QueryParameter("a", "action")).
|
Param(webservice.QueryParameter("action", "action must be \"rerun\"")).
|
||||||
Returns(http.StatusOK, ok, errors.Error{}))
|
Returns(http.StatusOK, ok, errors.Error{}))
|
||||||
|
|
||||||
c.Add(webservice)
|
c.Add(webservice)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ func addWebService(c *restful.Container) error {
|
|||||||
Doc("Rerun job whether the job is complete or not").
|
Doc("Rerun job whether the job is complete or not").
|
||||||
Param(webservice.PathParameter("job", "job name")).
|
Param(webservice.PathParameter("job", "job name")).
|
||||||
Param(webservice.PathParameter("namespace", "the namespace where the job runs in")).
|
Param(webservice.PathParameter("namespace", "the namespace where the job runs in")).
|
||||||
Param(webservice.QueryParameter("a", "action")).
|
Param(webservice.QueryParameter("action", "action must be \"rerun\"")).
|
||||||
Returns(http.StatusOK, ok, errors.Error{}))
|
Returns(http.StatusOK, ok, errors.Error{}))
|
||||||
|
|
||||||
webservice.Route(webservice.GET("/{resources}").
|
webservice.Route(webservice.GET("/{resources}").
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ func RerunJob(req *restful.Request, resp *restful.Response) {
|
|||||||
|
|
||||||
job := req.PathParameter("job")
|
job := req.PathParameter("job")
|
||||||
namespace := req.PathParameter("namespace")
|
namespace := req.PathParameter("namespace")
|
||||||
action := req.QueryParameter("a")
|
action := req.QueryParameter("action")
|
||||||
|
|
||||||
switch action {
|
switch action {
|
||||||
case "rerun":
|
case "rerun":
|
||||||
|
|||||||
Reference in New Issue
Block a user