mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
With the advent of Podman 2.0.0 we crossed the magical barrier of go modules. While we were able to continue importing all packages inside of the project, the project could not be vendored anymore from the outside. Move the go module to new major version and change all imports to `github.com/containers/libpod/v2`. The renaming of the imports was done via `gomove` [1]. [1] https://github.com/KSubedi/gomove Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/containers/libpod/v2/pkg/api/handlers/libpod"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
|
|
// swagger:operation GET /libpod/generate/{name:.*}/kube libpod libpodGenerateKube
|
|
// ---
|
|
// tags:
|
|
// - containers
|
|
// - pods
|
|
// summary: Play a Kubernetes YAML file.
|
|
// description: Create and run pods based on a Kubernetes YAML file (pod or service kind).
|
|
// parameters:
|
|
// - in: path
|
|
// name: name:.*
|
|
// type: string
|
|
// required: true
|
|
// description: Name or ID of the container or pod.
|
|
// - in: query
|
|
// name: service
|
|
// type: boolean
|
|
// default: false
|
|
// description: Generate YAML for a Kubernetes service object.
|
|
// produces:
|
|
// - application/json
|
|
// responses:
|
|
// 200:
|
|
// description: no error
|
|
// schema:
|
|
// type: string
|
|
// format: binary
|
|
// 500:
|
|
// $ref: "#/responses/InternalError"
|
|
r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/kube"), s.APIHandler(libpod.GenerateKube)).Methods(http.MethodGet)
|
|
return nil
|
|
}
|