summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers.go31
-rw-r--r--pkg/api/handlers/compat/volumes.go28
-rw-r--r--pkg/api/handlers/libpod/volumes.go51
-rw-r--r--pkg/api/server/register_containers.go62
-rw-r--r--pkg/bindings/containers/types_attach_options.go4
-rw-r--r--pkg/bindings/containers/types_checkpoint_options.go4
-rw-r--r--pkg/bindings/containers/types_commit_options.go4
-rw-r--r--pkg/bindings/containers/types_create_options.go4
-rw-r--r--pkg/bindings/containers/types_diff_options.go4
-rw-r--r--pkg/bindings/containers/types_execinspect_options.go4
-rw-r--r--pkg/bindings/containers/types_execstart_options.go4
-rw-r--r--pkg/bindings/containers/types_execstartandattach_options.go4
-rw-r--r--pkg/bindings/containers/types_export_options.go4
-rw-r--r--pkg/bindings/containers/types_healthcheck_options.go4
-rw-r--r--pkg/bindings/containers/types_init_options.go4
-rw-r--r--pkg/bindings/containers/types_inspect_options.go4
-rw-r--r--pkg/bindings/containers/types_kill_options.go4
-rw-r--r--pkg/bindings/containers/types_list_options.go2
-rw-r--r--pkg/bindings/containers/types_log_options.go4
-rw-r--r--pkg/bindings/containers/types_mount_options.go4
-rw-r--r--pkg/bindings/containers/types_mountedcontainerpaths_options.go4
-rw-r--r--pkg/bindings/containers/types_pause_options.go4
-rw-r--r--pkg/bindings/containers/types_prune_options.go4
-rw-r--r--pkg/bindings/containers/types_remove_options.go4
-rw-r--r--pkg/bindings/containers/types_resizeexectty_options.go4
-rw-r--r--pkg/bindings/containers/types_resizetty_options.go4
-rw-r--r--pkg/bindings/containers/types_restart_options.go4
-rw-r--r--pkg/bindings/containers/types_restore_options.go4
-rw-r--r--pkg/bindings/containers/types_shouldrestart_options.go4
-rw-r--r--pkg/bindings/containers/types_start_options.go4
-rw-r--r--pkg/bindings/containers/types_stats_options.go4
-rw-r--r--pkg/bindings/containers/types_stop_options.go4
-rw-r--r--pkg/bindings/containers/types_top_options.go4
-rw-r--r--pkg/bindings/containers/types_unmount_options.go4
-rw-r--r--pkg/bindings/containers/types_unpause_options.go4
-rw-r--r--pkg/bindings/containers/types_wait_options.go4
-rw-r--r--pkg/bindings/generate/types_kube_options.go4
-rw-r--r--pkg/bindings/generate/types_systemd_options.go4
-rw-r--r--pkg/bindings/generator/generator.go6
-rw-r--r--pkg/bindings/images/types_diff_options.go4
-rw-r--r--pkg/bindings/images/types_export_options.go4
-rw-r--r--pkg/bindings/images/types_get_options.go4
-rw-r--r--pkg/bindings/images/types_history_options.go4
-rw-r--r--pkg/bindings/images/types_import_options.go4
-rw-r--r--pkg/bindings/images/types_list_options.go4
-rw-r--r--pkg/bindings/images/types_load_options.go4
-rw-r--r--pkg/bindings/images/types_prune_options.go4
-rw-r--r--pkg/bindings/images/types_pull_options.go4
-rw-r--r--pkg/bindings/images/types_push_options.go4
-rw-r--r--pkg/bindings/images/types_remove_options.go4
-rw-r--r--pkg/bindings/images/types_search_options.go4
-rw-r--r--pkg/bindings/images/types_tag_options.go4
-rw-r--r--pkg/bindings/images/types_tree_options.go4
-rw-r--r--pkg/bindings/images/types_untag_options.go4
-rw-r--r--pkg/bindings/manifests/types_add_options.go4
-rw-r--r--pkg/bindings/manifests/types_create_options.go4
-rw-r--r--pkg/bindings/manifests/types_inspect_options.go4
-rw-r--r--pkg/bindings/manifests/types_push_options.go4
-rw-r--r--pkg/bindings/manifests/types_remove_options.go4
-rw-r--r--pkg/bindings/network/types_connect_options.go4
-rw-r--r--pkg/bindings/network/types_create_options.go8
-rw-r--r--pkg/bindings/network/types_disconnect_options.go4
-rw-r--r--pkg/bindings/network/types_inspect_options.go4
-rw-r--r--pkg/bindings/network/types_list_options.go4
-rw-r--r--pkg/bindings/network/types_remove_options.go4
-rw-r--r--pkg/bindings/play/types_kube_options.go4
-rw-r--r--pkg/bindings/pods/types_create_options.go4
-rw-r--r--pkg/bindings/pods/types_inspect_options.go4
-rw-r--r--pkg/bindings/pods/types_kill_options.go4
-rw-r--r--pkg/bindings/pods/types_list_options.go4
-rw-r--r--pkg/bindings/pods/types_pause_options.go4
-rw-r--r--pkg/bindings/pods/types_prune_options.go4
-rw-r--r--pkg/bindings/pods/types_remove_options.go4
-rw-r--r--pkg/bindings/pods/types_restart_options.go4
-rw-r--r--pkg/bindings/pods/types_start_options.go4
-rw-r--r--pkg/bindings/pods/types_stats_options.go4
-rw-r--r--pkg/bindings/pods/types_stop_options.go4
-rw-r--r--pkg/bindings/pods/types_top_options.go4
-rw-r--r--pkg/bindings/pods/types_unpause_options.go4
-rw-r--r--pkg/bindings/system/types_disk_options.go4
-rw-r--r--pkg/bindings/system/types_events_options.go4
-rw-r--r--pkg/bindings/system/types_info_options.go4
-rw-r--r--pkg/bindings/system/types_prune_options.go4
-rw-r--r--pkg/bindings/system/types_version_options.go4
-rw-r--r--pkg/bindings/volumes/types_create_options.go4
-rw-r--r--pkg/bindings/volumes/types_inspect_options.go4
-rw-r--r--pkg/bindings/volumes/types_list_options.go4
-rw-r--r--pkg/bindings/volumes/types_prune_options.go4
-rw-r--r--pkg/bindings/volumes/types_remove_options.go4
-rw-r--r--pkg/domain/entities/containers.go6
-rw-r--r--pkg/domain/entities/engine_container.go1
-rw-r--r--pkg/domain/entities/volumes.go35
-rw-r--r--pkg/domain/infra/abi/containers.go16
-rw-r--r--pkg/domain/infra/abi/containers_stat.go17
-rw-r--r--pkg/domain/infra/abi/system.go12
-rw-r--r--pkg/domain/infra/abi/volumes.go34
-rw-r--r--pkg/domain/infra/tunnel/containers.go5
97 files changed, 351 insertions, 291 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 0f89c859e..6e1945db1 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -465,3 +465,34 @@ func formatCapabilities(slice []string) {
slice[i] = strings.TrimPrefix(slice[i], "CAP_")
}
}
+
+func RenameContainer(w http.ResponseWriter, r *http.Request) {
+ runtime := r.Context().Value("runtime").(*libpod.Runtime)
+ decoder := r.Context().Value("decoder").(*schema.Decoder)
+
+ name := utils.GetName(r)
+ query := struct {
+ Name string `schema:"name"`
+ }{}
+ if err := decoder.Decode(&query, r.URL.Query()); err != nil {
+ utils.Error(w, "Something went wrong.", http.StatusBadRequest, errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
+ return
+ }
+
+ ctr, err := runtime.LookupContainer(name)
+ if err != nil {
+ utils.ContainerNotFound(w, name, err)
+ return
+ }
+
+ if _, err := runtime.RenameContainer(r.Context(), ctr, query.Name); err != nil {
+ if errors.Cause(err) == define.ErrPodExists || errors.Cause(err) == define.ErrCtrExists {
+ utils.Error(w, "Something went wrong.", http.StatusConflict, err)
+ return
+ }
+ utils.InternalServerError(w, err)
+ return
+ }
+
+ utils.WriteResponse(w, http.StatusNoContent, nil)
+}
diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go
index 4903bbad4..82e70eb90 100644
--- a/pkg/api/handlers/compat/volumes.go
+++ b/pkg/api/handlers/compat/volumes.go
@@ -58,10 +58,15 @@ func ListVolumes(w http.ResponseWriter, r *http.Request) {
}
volumeConfigs := make([]*docker_api_types.Volume, 0, len(vols))
for _, v := range vols {
+ mp, err := v.MountPoint()
+ if err != nil {
+ utils.InternalServerError(w, err)
+ return
+ }
config := docker_api_types.Volume{
Name: v.Name(),
Driver: v.Driver(),
- Mountpoint: v.MountPoint(),
+ Mountpoint: mp,
CreatedAt: v.CreatedTime().Format(time.RFC3339),
Labels: v.Labels(),
Scope: v.Scope(),
@@ -106,11 +111,16 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
// if using the compat layer and the volume already exists, we
// must return a 201 with the same information as create
if existingVolume != nil && !utils.IsLibpodRequest(r) {
+ mp, err := existingVolume.MountPoint()
+ if err != nil {
+ utils.InternalServerError(w, err)
+ return
+ }
response := docker_api_types.Volume{
CreatedAt: existingVolume.CreatedTime().Format(time.RFC3339),
Driver: existingVolume.Driver(),
Labels: existingVolume.Labels(),
- Mountpoint: existingVolume.MountPoint(),
+ Mountpoint: mp,
Name: existingVolume.Name(),
Options: existingVolume.Options(),
Scope: existingVolume.Scope(),
@@ -146,10 +156,15 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
+ mp, err := vol.MountPoint()
+ if err != nil {
+ utils.InternalServerError(w, err)
+ return
+ }
volResponse := docker_api_types.Volume{
Name: config.Name,
Driver: config.Driver,
- Mountpoint: config.MountPoint,
+ Mountpoint: mp,
CreatedAt: config.CreatedTime.Format(time.RFC3339),
Labels: config.Labels,
Options: config.Options,
@@ -173,10 +188,15 @@ func InspectVolume(w http.ResponseWriter, r *http.Request) {
utils.VolumeNotFound(w, name, err)
return
}
+ mp, err := vol.MountPoint()
+ if err != nil {
+ utils.InternalServerError(w, err)
+ return
+ }
volResponse := docker_api_types.Volume{
Name: vol.Name(),
Driver: vol.Driver(),
- Mountpoint: vol.MountPoint(),
+ Mountpoint: mp,
CreatedAt: vol.CreatedTime().Format(time.RFC3339),
Labels: vol.Labels(),
Options: vol.Options(),
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go
index 6f9537515..38fdf1b4d 100644
--- a/pkg/api/handlers/libpod/volumes.go
+++ b/pkg/api/handlers/libpod/volumes.go
@@ -60,20 +60,13 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- config, err := vol.Config()
+ inspectOut, err := vol.Inspect()
if err != nil {
utils.InternalServerError(w, err)
return
}
volResponse := entities.VolumeConfigResponse{
- Name: config.Name,
- Driver: config.Driver,
- Mountpoint: config.MountPoint,
- CreatedAt: config.CreatedTime,
- Labels: config.Labels,
- Options: config.Options,
- UID: config.UID,
- GID: config.GID,
+ InspectVolumeData: *inspectOut,
}
utils.WriteResponse(w, http.StatusCreated, volResponse)
}
@@ -88,27 +81,13 @@ func InspectVolume(w http.ResponseWriter, r *http.Request) {
utils.VolumeNotFound(w, name, err)
return
}
- var uid, gid int
- uid, err = vol.UID()
+ inspectOut, err := vol.Inspect()
if err != nil {
- utils.Error(w, "Error fetching volume UID", http.StatusInternalServerError, err)
- return
- }
- gid, err = vol.GID()
- if err != nil {
- utils.Error(w, "Error fetching volume GID", http.StatusInternalServerError, err)
+ utils.InternalServerError(w, err)
return
}
volResponse := entities.VolumeConfigResponse{
- Name: vol.Name(),
- Driver: vol.Driver(),
- Mountpoint: vol.MountPoint(),
- CreatedAt: vol.CreatedTime(),
- Labels: vol.Labels(),
- Scope: vol.Scope(),
- Options: vol.Options(),
- UID: uid,
- GID: gid,
+ InspectVolumeData: *inspectOut,
}
utils.WriteResponse(w, http.StatusOK, volResponse)
}
@@ -143,27 +122,13 @@ func ListVolumes(w http.ResponseWriter, r *http.Request) {
}
volumeConfigs := make([]*entities.VolumeListReport, 0, len(vols))
for _, v := range vols {
- var uid, gid int
- uid, err = v.UID()
+ inspectOut, err := v.Inspect()
if err != nil {
- utils.Error(w, "Error fetching volume UID", http.StatusInternalServerError, err)
- return
- }
- gid, err = v.GID()
- if err != nil {
- utils.Error(w, "Error fetching volume GID", http.StatusInternalServerError, err)
+ utils.InternalServerError(w, err)
return
}
config := entities.VolumeConfigResponse{
- Name: v.Name(),
- Driver: v.Driver(),
- Mountpoint: v.MountPoint(),
- CreatedAt: v.CreatedTime(),
- Labels: v.Labels(),
- Scope: v.Scope(),
- Options: v.Options(),
- UID: uid,
- GID: gid,
+ InspectVolumeData: *inspectOut,
}
volumeConfigs = append(volumeConfigs, &entities.VolumeListReport{VolumeConfigResponse: config})
}
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index b80dea545..74a04b2e6 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -291,9 +291,6 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
r.HandleFunc(VersionedPath("/containers/{name}/pause"), s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
// Added non version path to URI to support docker non versioned paths
r.HandleFunc("/containers/{name}/pause", s.APIHandler(compat.PauseContainer)).Methods(http.MethodPost)
- r.HandleFunc(VersionedPath("/containers/{name}/rename"), s.APIHandler(compat.UnsupportedHandler)).Methods(http.MethodPost)
- // Added non version path to URI to support docker non versioned paths
- r.HandleFunc("/containers/{name}/rename", s.APIHandler(compat.UnsupportedHandler)).Methods(http.MethodPost)
// swagger:operation POST /containers/{name}/restart compat restartContainer
// ---
// tags:
@@ -610,6 +607,36 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/containers/{name}/export"), s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
r.HandleFunc("/containers/{name}/export", s.APIHandler(compat.ExportContainer)).Methods(http.MethodGet)
+ // swagger:operation POST /containers/{name}/rename compat renameContainer
+ // ---
+ // tags:
+ // - containers (compat)
+ // summary: Rename an existing container
+ // description: Change the name of an existing container.
+ // parameters:
+ // - in: path
+ // name: name
+ // type: string
+ // required: true
+ // description: Full or partial ID or full name of the container to rename
+ // - in: query
+ // name: name
+ // type: string
+ // required: true
+ // description: New name for the container
+ // produces:
+ // - application/json
+ // responses:
+ // 204:
+ // description: no error
+ // 404:
+ // $ref: "#/responses/NoSuchContainer"
+ // 409:
+ // $ref: "#/responses/ConflictError"
+ // 500:
+ // $ref: "#/responses/InternalError"
+ r.HandleFunc(VersionedPath("/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
+ r.HandleFunc("/containers/{name}/rename", s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
/*
libpod endpoints
@@ -1463,5 +1490,34 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name}/init"), s.APIHandler(libpod.InitContainer)).Methods(http.MethodPost)
+ // swagger:operation POST /libpod/containers/{name}/rename libpod libpodRenameContainer
+ // ---
+ // tags:
+ // - containers
+ // summary: Rename an existing container
+ // description: Change the name of an existing container.
+ // parameters:
+ // - in: path
+ // name: name
+ // type: string
+ // required: true
+ // description: Full or partial ID or full name of the container to rename
+ // - in: query
+ // name: name
+ // type: string
+ // required: true
+ // description: New name for the container
+ // produces:
+ // - application/json
+ // responses:
+ // 204:
+ // description: no error
+ // 404:
+ // $ref: "#/responses/NoSuchContainer"
+ // 409:
+ // $ref: "#/responses/ConflictError"
+ // 500:
+ // $ref: "#/responses/InternalError"
+ r.HandleFunc(VersionedPath("/libpod/containers/{name}/rename"), s.APIHandler(compat.RenameContainer)).Methods(http.MethodPost)
return nil
}
diff --git a/pkg/bindings/containers/types_attach_options.go b/pkg/bindings/containers/types_attach_options.go
index 4ffb8ab17..6d8c1cb01 100644
--- a/pkg/bindings/containers/types_attach_options.go
+++ b/pkg/bindings/containers/types_attach_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:18.566804404 -0600 CST m=+0.000258831
*/
// Changed
@@ -39,6 +38,7 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_checkpoint_options.go b/pkg/bindings/containers/types_checkpoint_options.go
index d03dc8231..ec766de4a 100644
--- a/pkg/bindings/containers/types_checkpoint_options.go
+++ b/pkg/bindings/containers/types_checkpoint_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:18.714853285 -0600 CST m=+0.000319103
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_commit_options.go b/pkg/bindings/containers/types_commit_options.go
index a8b215141..b745bebe2 100644
--- a/pkg/bindings/containers/types_commit_options.go
+++ b/pkg/bindings/containers/types_commit_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:18.420656951 -0600 CST m=+0.000259662
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_create_options.go b/pkg/bindings/containers/types_create_options.go
index 4dbce0203..4b9574cf1 100644
--- a/pkg/bindings/containers/types_create_options.go
+++ b/pkg/bindings/containers/types_create_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.011789618 -0600 CST m=+0.000259413
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_diff_options.go b/pkg/bindings/containers/types_diff_options.go
index be3bbf554..55fa6930d 100644
--- a/pkg/bindings/containers/types_diff_options.go
+++ b/pkg/bindings/containers/types_diff_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.159128927 -0600 CST m=+0.000255635
*/
// Changed
@@ -39,6 +38,7 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_execinspect_options.go b/pkg/bindings/containers/types_execinspect_options.go
index 3c4c870be..c5d1f931a 100644
--- a/pkg/bindings/containers/types_execinspect_options.go
+++ b/pkg/bindings/containers/types_execinspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.303239014 -0600 CST m=+0.000256861
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_execstart_options.go b/pkg/bindings/containers/types_execstart_options.go
index 66fdc82cb..9ecb70a3e 100644
--- a/pkg/bindings/containers/types_execstart_options.go
+++ b/pkg/bindings/containers/types_execstart_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.447714428 -0600 CST m=+0.000257278
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_execstartandattach_options.go b/pkg/bindings/containers/types_execstartandattach_options.go
index 43900d29d..a5a691e35 100644
--- a/pkg/bindings/containers/types_execstartandattach_options.go
+++ b/pkg/bindings/containers/types_execstartandattach_options.go
@@ -6,6 +6,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -13,8 +14,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.827903078 -0600 CST m=+0.000269906
*/
// Changed
@@ -41,6 +40,7 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_export_options.go b/pkg/bindings/containers/types_export_options.go
index e325bd2cd..55e413c72 100644
--- a/pkg/bindings/containers/types_export_options.go
+++ b/pkg/bindings/containers/types_export_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.101679998 -0600 CST m=+0.000261669
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_healthcheck_options.go b/pkg/bindings/containers/types_healthcheck_options.go
index 8c4300366..9d8b25bf4 100644
--- a/pkg/bindings/containers/types_healthcheck_options.go
+++ b/pkg/bindings/containers/types_healthcheck_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.593883686 -0600 CST m=+0.000289845
*/
// Changed
@@ -39,6 +38,7 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_init_options.go b/pkg/bindings/containers/types_init_options.go
index 655362f62..6fb5795c0 100644
--- a/pkg/bindings/containers/types_init_options.go
+++ b/pkg/bindings/containers/types_init_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.245077233 -0600 CST m=+0.000255461
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InitOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_inspect_options.go b/pkg/bindings/containers/types_inspect_options.go
index 884f5524d..722372414 100644
--- a/pkg/bindings/containers/types_inspect_options.go
+++ b/pkg/bindings/containers/types_inspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.635987603 -0600 CST m=+0.000260270
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_kill_options.go b/pkg/bindings/containers/types_kill_options.go
index 3d6fa6224..dd84f0d9f 100644
--- a/pkg/bindings/containers/types_kill_options.go
+++ b/pkg/bindings/containers/types_kill_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.781581076 -0600 CST m=+0.000259040
*/
// Changed
@@ -39,6 +38,7 @@ func (o *KillOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_list_options.go b/pkg/bindings/containers/types_list_options.go
index dd74d37b7..43326fa59 100644
--- a/pkg/bindings/containers/types_list_options.go
+++ b/pkg/bindings/containers/types_list_options.go
@@ -12,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.199081744 -0600 CST m=+0.000270626
*/
// Changed
diff --git a/pkg/bindings/containers/types_log_options.go b/pkg/bindings/containers/types_log_options.go
index a6958242f..364f29de4 100644
--- a/pkg/bindings/containers/types_log_options.go
+++ b/pkg/bindings/containers/types_log_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:18.273264471 -0600 CST m=+0.000274536
*/
// Changed
@@ -39,6 +38,7 @@ func (o *LogOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_mount_options.go b/pkg/bindings/containers/types_mount_options.go
index c0e253094..6f4349b73 100644
--- a/pkg/bindings/containers/types_mount_options.go
+++ b/pkg/bindings/containers/types_mount_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.740822464 -0600 CST m=+0.000250074
*/
// Changed
@@ -39,6 +38,7 @@ func (o *MountOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_mountedcontainerpaths_options.go b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
index e368ff131..0d8b69654 100644
--- a/pkg/bindings/containers/types_mountedcontainerpaths_options.go
+++ b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.048233253 -0600 CST m=+0.000307223
*/
// Changed
@@ -39,6 +38,7 @@ func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_pause_options.go b/pkg/bindings/containers/types_pause_options.go
index 26ad86793..0cc65f64e 100644
--- a/pkg/bindings/containers/types_pause_options.go
+++ b/pkg/bindings/containers/types_pause_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.929891294 -0600 CST m=+0.000261081
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_prune_options.go b/pkg/bindings/containers/types_prune_options.go
index e3c0f4de7..10adf0a2a 100644
--- a/pkg/bindings/containers/types_prune_options.go
+++ b/pkg/bindings/containers/types_prune_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.344278799 -0600 CST m=+0.000263499
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_remove_options.go b/pkg/bindings/containers/types_remove_options.go
index 6f59f0ed5..e21fb41f7 100644
--- a/pkg/bindings/containers/types_remove_options.go
+++ b/pkg/bindings/containers/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:20.489968735 -0600 CST m=+0.000264450
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_resizeexectty_options.go b/pkg/bindings/containers/types_resizeexectty_options.go
index 33bb4e78b..0212adeb2 100644
--- a/pkg/bindings/containers/types_resizeexectty_options.go
+++ b/pkg/bindings/containers/types_resizeexectty_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.680735758 -0600 CST m=+0.000267081
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_resizetty_options.go b/pkg/bindings/containers/types_resizetty_options.go
index 29ec54988..cee607902 100644
--- a/pkg/bindings/containers/types_resizetty_options.go
+++ b/pkg/bindings/containers/types_resizetty_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.535788375 -0600 CST m=+0.000266528
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_restart_options.go b/pkg/bindings/containers/types_restart_options.go
index 13ac099b1..8dcc6b5b7 100644
--- a/pkg/bindings/containers/types_restart_options.go
+++ b/pkg/bindings/containers/types_restart_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.076709643 -0600 CST m=+0.000303354
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_restore_options.go b/pkg/bindings/containers/types_restore_options.go
index be6e94736..491d678a5 100644
--- a/pkg/bindings/containers/types_restore_options.go
+++ b/pkg/bindings/containers/types_restore_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:18.861536405 -0600 CST m=+0.000300026
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RestoreOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_shouldrestart_options.go b/pkg/bindings/containers/types_shouldrestart_options.go
index c833d0d8b..30ab618c7 100644
--- a/pkg/bindings/containers/types_shouldrestart_options.go
+++ b/pkg/bindings/containers/types_shouldrestart_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:22.388596051 -0600 CST m=+0.000253693
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_start_options.go b/pkg/bindings/containers/types_start_options.go
index 5918af89b..4050a8993 100644
--- a/pkg/bindings/containers/types_start_options.go
+++ b/pkg/bindings/containers/types_start_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.221364502 -0600 CST m=+0.000276575
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_stats_options.go b/pkg/bindings/containers/types_stats_options.go
index f821ea1cd..74f419913 100644
--- a/pkg/bindings/containers/types_stats_options.go
+++ b/pkg/bindings/containers/types_stats_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.370213399 -0600 CST m=+0.000264334
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_stop_options.go b/pkg/bindings/containers/types_stop_options.go
index 14d7633a0..db692dbf0 100644
--- a/pkg/bindings/containers/types_stop_options.go
+++ b/pkg/bindings/containers/types_stop_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.95469621 -0600 CST m=+0.000261399
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StopOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_top_options.go b/pkg/bindings/containers/types_top_options.go
index 95a1ee686..5f2717c28 100644
--- a/pkg/bindings/containers/types_top_options.go
+++ b/pkg/bindings/containers/types_top_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.515867629 -0600 CST m=+0.000257106
*/
// Changed
@@ -39,6 +38,7 @@ func (o *TopOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_unmount_options.go b/pkg/bindings/containers/types_unmount_options.go
index a29bd8216..060327c4a 100644
--- a/pkg/bindings/containers/types_unmount_options.go
+++ b/pkg/bindings/containers/types_unmount_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:19.891657824 -0600 CST m=+0.000326668
*/
// Changed
@@ -39,6 +38,7 @@ func (o *UnmountOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_unpause_options.go b/pkg/bindings/containers/types_unpause_options.go
index 44c077df2..e02bf2c95 100644
--- a/pkg/bindings/containers/types_unpause_options.go
+++ b/pkg/bindings/containers/types_unpause_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.661356277 -0600 CST m=+0.000262608
*/
// Changed
@@ -39,6 +38,7 @@ func (o *UnpauseOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/containers/types_wait_options.go b/pkg/bindings/containers/types_wait_options.go
index 18d36c377..470d67611 100644
--- a/pkg/bindings/containers/types_wait_options.go
+++ b/pkg/bindings/containers/types_wait_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
"github.com/containers/podman/v2/libpod/define"
jsoniter "github.com/json-iterator/go"
@@ -12,8 +13,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 13:33:21.809397978 -0600 CST m=+0.000267049
*/
// Changed
@@ -40,6 +39,7 @@ func (o *WaitOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/generate/types_kube_options.go b/pkg/bindings/generate/types_kube_options.go
index 68488aaee..5fb965c9f 100644
--- a/pkg/bindings/generate/types_kube_options.go
+++ b/pkg/bindings/generate/types_kube_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:20.522950566 -0600 CST m=+0.000154384
*/
// Changed
@@ -39,6 +38,7 @@ func (o *KubeOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index 0e8a46aa0..ce7286b3a 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:20.661450253 -0600 CST m=+0.000135779
*/
// Changed
@@ -39,6 +38,7 @@ func (o *SystemdOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/generator/generator.go b/pkg/bindings/generator/generator.go
index 8c79aebae..6a7f600a8 100644
--- a/pkg/bindings/generator/generator.go
+++ b/pkg/bindings/generator/generator.go
@@ -19,13 +19,10 @@ var bodyTmpl = `package {{.PackageName}}
import (
{{range $import := .Imports}} {{$import}}
{{end}}
-
)
/*
This file is generated automatically by go generate. Do not edit.
-
-Created {{.Date}}
*/
// Changed
@@ -52,6 +49,7 @@ func (o *{{.StructName}}) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
@@ -239,7 +237,7 @@ func main() {
closed = true
// go fmt file
- gofmt := exec.Command("gofmt", "-w", "-s", out.Name())
+ gofmt := exec.Command("go", "fmt", out.Name())
gofmt.Stderr = os.Stdout
if err := gofmt.Run(); err != nil {
fmt.Println(err)
diff --git a/pkg/bindings/images/types_diff_options.go b/pkg/bindings/images/types_diff_options.go
index d27c8945e..34a5bf2df 100644
--- a/pkg/bindings/images/types_diff_options.go
+++ b/pkg/bindings/images/types_diff_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.320022698 -0600 CST m=+0.000277796
*/
// Changed
@@ -39,6 +38,7 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go
index 078b27fc0..172cb2b5c 100644
--- a/pkg/bindings/images/types_export_options.go
+++ b/pkg/bindings/images/types_export_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.173810543 -0600 CST m=+0.000239871
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_get_options.go b/pkg/bindings/images/types_get_options.go
index 1161657f7..c91ddb170 100644
--- a/pkg/bindings/images/types_get_options.go
+++ b/pkg/bindings/images/types_get_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.609005517 -0600 CST m=+0.000241828
*/
// Changed
@@ -39,6 +38,7 @@ func (o *GetOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_history_options.go b/pkg/bindings/images/types_history_options.go
index 6f9854e03..bd4224cd8 100644
--- a/pkg/bindings/images/types_history_options.go
+++ b/pkg/bindings/images/types_history_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.890854681 -0600 CST m=+0.000243668
*/
// Changed
@@ -39,6 +38,7 @@ func (o *HistoryOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_import_options.go b/pkg/bindings/images/types_import_options.go
index f5e6c8f7e..81eda946e 100644
--- a/pkg/bindings/images/types_import_options.go
+++ b/pkg/bindings/images/types_import_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.740585278 -0600 CST m=+0.000340441
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ImportOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_list_options.go b/pkg/bindings/images/types_list_options.go
index 209d72e34..5dc4242fc 100644
--- a/pkg/bindings/images/types_list_options.go
+++ b/pkg/bindings/images/types_list_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.462967928 -0600 CST m=+0.000289760
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ListOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_load_options.go b/pkg/bindings/images/types_load_options.go
index 6bba573d4..7bbd56c09 100644
--- a/pkg/bindings/images/types_load_options.go
+++ b/pkg/bindings/images/types_load_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.031848205 -0600 CST m=+0.000279409
*/
// Changed
@@ -39,6 +38,7 @@ func (o *LoadOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_prune_options.go b/pkg/bindings/images/types_prune_options.go
index c29fdae12..c290bb379 100644
--- a/pkg/bindings/images/types_prune_options.go
+++ b/pkg/bindings/images/types_prune_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.316938584 -0600 CST m=+0.000239843
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go
index 07f3e079d..5163a6341 100644
--- a/pkg/bindings/images/types_pull_options.go
+++ b/pkg/bindings/images/types_pull_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
"github.com/containers/common/pkg/config"
jsoniter "github.com/json-iterator/go"
@@ -12,8 +13,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:28.164648348 -0600 CST m=+0.000243264
*/
// Changed
@@ -40,6 +39,7 @@ func (o *PullOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go
index f9ce1b835..15210f30b 100644
--- a/pkg/bindings/images/types_push_options.go
+++ b/pkg/bindings/images/types_push_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.881232044 -0600 CST m=+0.000242458
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PushOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go
index c9692c2b7..66a6bea7d 100644
--- a/pkg/bindings/images/types_remove_options.go
+++ b/pkg/bindings/images/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.180391541 -0600 CST m=+0.000290244
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_search_options.go b/pkg/bindings/images/types_search_options.go
index e6168ac33..299d27505 100644
--- a/pkg/bindings/images/types_search_options.go
+++ b/pkg/bindings/images/types_search_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:28.023569573 -0600 CST m=+0.000245548
*/
// Changed
@@ -39,6 +38,7 @@ func (o *SearchOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_tag_options.go b/pkg/bindings/images/types_tag_options.go
index f6396e590..40cd4a35b 100644
--- a/pkg/bindings/images/types_tag_options.go
+++ b/pkg/bindings/images/types_tag_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.457906682 -0600 CST m=+0.000245071
*/
// Changed
@@ -39,6 +38,7 @@ func (o *TagOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_tree_options.go b/pkg/bindings/images/types_tree_options.go
index fb2493f85..a671fa4e0 100644
--- a/pkg/bindings/images/types_tree_options.go
+++ b/pkg/bindings/images/types_tree_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:26.749625305 -0600 CST m=+0.000267624
*/
// Changed
@@ -39,6 +38,7 @@ func (o *TreeOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/images/types_untag_options.go b/pkg/bindings/images/types_untag_options.go
index 8faf5c14e..e38c5f18e 100644
--- a/pkg/bindings/images/types_untag_options.go
+++ b/pkg/bindings/images/types_untag_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:27.600379913 -0600 CST m=+0.000251449
*/
// Changed
@@ -39,6 +38,7 @@ func (o *UntagOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index d45effedc..1e588c668 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:57:55.92237379 -0600 CST m=+0.000150701
*/
// Changed
@@ -39,6 +38,7 @@ func (o *AddOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go
index da07f1abf..3a564a92b 100644
--- a/pkg/bindings/manifests/types_create_options.go
+++ b/pkg/bindings/manifests/types_create_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:57:55.784206871 -0600 CST m=+0.000157049
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/manifests/types_inspect_options.go b/pkg/bindings/manifests/types_inspect_options.go
index 0d32d5bb9..2af4190d4 100644
--- a/pkg/bindings/manifests/types_inspect_options.go
+++ b/pkg/bindings/manifests/types_inspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:57:55.631746481 -0600 CST m=+0.000143104
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/manifests/types_push_options.go b/pkg/bindings/manifests/types_push_options.go
index 4226733c9..1d689f699 100644
--- a/pkg/bindings/manifests/types_push_options.go
+++ b/pkg/bindings/manifests/types_push_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:57:56.197438009 -0600 CST m=+0.000149060
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PushOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/manifests/types_remove_options.go b/pkg/bindings/manifests/types_remove_options.go
index f99220f6c..3b35c38b8 100644
--- a/pkg/bindings/manifests/types_remove_options.go
+++ b/pkg/bindings/manifests/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:57:56.059954408 -0600 CST m=+0.000146015
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/network/types_connect_options.go b/pkg/bindings/network/types_connect_options.go
index 6fcc4536e..b6081ba57 100644
--- a/pkg/bindings/network/types_connect_options.go
+++ b/pkg/bindings/network/types_connect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:34.075822786 -0600 CST m=+0.000167237
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ConnectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go
index daec6a254..5b0abe870 100644
--- a/pkg/bindings/network/types_create_options.go
+++ b/pkg/bindings/network/types_create_options.go
@@ -5,6 +5,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -12,8 +13,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:33.37307678 -0600 CST m=+0.000176739
*/
// Changed
@@ -40,6 +39,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
@@ -193,9 +193,9 @@ func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions {
// GetIPRange
func (o *CreateOptions) GetIPRange() net.IPNet {
- var ipRange net.IPNet
+ var iPRange net.IPNet
if o.IPRange == nil {
- return ipRange
+ return iPRange
}
return *o.IPRange
}
diff --git a/pkg/bindings/network/types_disconnect_options.go b/pkg/bindings/network/types_disconnect_options.go
index 821279976..8b2a9cb71 100644
--- a/pkg/bindings/network/types_disconnect_options.go
+++ b/pkg/bindings/network/types_disconnect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:33.936088242 -0600 CST m=+0.000168680
*/
// Changed
@@ -39,6 +38,7 @@ func (o *DisconnectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/network/types_inspect_options.go b/pkg/bindings/network/types_inspect_options.go
index 7704904ce..cec5ef7b2 100644
--- a/pkg/bindings/network/types_inspect_options.go
+++ b/pkg/bindings/network/types_inspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:33.520438264 -0600 CST m=+0.000172934
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/network/types_list_options.go b/pkg/bindings/network/types_list_options.go
index bbd2a71db..6a33fb7b6 100644
--- a/pkg/bindings/network/types_list_options.go
+++ b/pkg/bindings/network/types_list_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:33.796794129 -0600 CST m=+0.000180368
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ListOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/network/types_remove_options.go b/pkg/bindings/network/types_remove_options.go
index b24835ae4..861fe1f2c 100644
--- a/pkg/bindings/network/types_remove_options.go
+++ b/pkg/bindings/network/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:33.658228151 -0600 CST m=+0.000172527
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/play/types_kube_options.go b/pkg/bindings/play/types_kube_options.go
index 91cdd30aa..5aec4b479 100644
--- a/pkg/bindings/play/types_kube_options.go
+++ b/pkg/bindings/play/types_kube_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:02.386833736 -0600 CST m=+0.000171080
*/
// Changed
@@ -39,6 +38,7 @@ func (o *KubeOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_create_options.go b/pkg/bindings/pods/types_create_options.go
index b6cf0fc53..b501d1151 100644
--- a/pkg/bindings/pods/types_create_options.go
+++ b/pkg/bindings/pods/types_create_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.05490508 -0600 CST m=+0.000156396
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_inspect_options.go b/pkg/bindings/pods/types_inspect_options.go
index 1c881ce9c..a2eb25fef 100644
--- a/pkg/bindings/pods/types_inspect_options.go
+++ b/pkg/bindings/pods/types_inspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.258801519 -0600 CST m=+0.000175055
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_kill_options.go b/pkg/bindings/pods/types_kill_options.go
index cb5bdfd01..f9cad3579 100644
--- a/pkg/bindings/pods/types_kill_options.go
+++ b/pkg/bindings/pods/types_kill_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.398857339 -0600 CST m=+0.000160135
*/
// Changed
@@ -39,6 +38,7 @@ func (o *KillOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_list_options.go b/pkg/bindings/pods/types_list_options.go
index d095bf3db..02e7adf2d 100644
--- a/pkg/bindings/pods/types_list_options.go
+++ b/pkg/bindings/pods/types_list_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.818123838 -0600 CST m=+0.000164328
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ListOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_pause_options.go b/pkg/bindings/pods/types_pause_options.go
index 06ee6f81d..2e4fdb4a6 100644
--- a/pkg/bindings/pods/types_pause_options.go
+++ b/pkg/bindings/pods/types_pause_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.538407099 -0600 CST m=+0.000193274
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_prune_options.go b/pkg/bindings/pods/types_prune_options.go
index 6610aa7cc..616ad6dc9 100644
--- a/pkg/bindings/pods/types_prune_options.go
+++ b/pkg/bindings/pods/types_prune_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.678507342 -0600 CST m=+0.000183891
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_remove_options.go b/pkg/bindings/pods/types_remove_options.go
index 8f18e43c9..6960d8839 100644
--- a/pkg/bindings/pods/types_remove_options.go
+++ b/pkg/bindings/pods/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.80320679 -0600 CST m=+0.000158149
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_restart_options.go b/pkg/bindings/pods/types_restart_options.go
index 9030de1e7..427833044 100644
--- a/pkg/bindings/pods/types_restart_options.go
+++ b/pkg/bindings/pods/types_restart_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:40.958315383 -0600 CST m=+0.000168360
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_start_options.go b/pkg/bindings/pods/types_start_options.go
index 0fce21099..e98798459 100644
--- a/pkg/bindings/pods/types_start_options.go
+++ b/pkg/bindings/pods/types_start_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.099102916 -0600 CST m=+0.000159629
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StartOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_stats_options.go b/pkg/bindings/pods/types_stats_options.go
index d38a9a115..845a534a3 100644
--- a/pkg/bindings/pods/types_stats_options.go
+++ b/pkg/bindings/pods/types_stats_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.658228243 -0600 CST m=+0.000160769
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_stop_options.go b/pkg/bindings/pods/types_stop_options.go
index ac698b8c5..86000eb57 100644
--- a/pkg/bindings/pods/types_stop_options.go
+++ b/pkg/bindings/pods/types_stop_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.237892781 -0600 CST m=+0.000155040
*/
// Changed
@@ -39,6 +38,7 @@ func (o *StopOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_top_options.go b/pkg/bindings/pods/types_top_options.go
index 895f62957..ada0b1e25 100644
--- a/pkg/bindings/pods/types_top_options.go
+++ b/pkg/bindings/pods/types_top_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.375876994 -0600 CST m=+0.000154839
*/
// Changed
@@ -39,6 +38,7 @@ func (o *TopOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/pods/types_unpause_options.go b/pkg/bindings/pods/types_unpause_options.go
index 3d647cf25..6a9ee8fcd 100644
--- a/pkg/bindings/pods/types_unpause_options.go
+++ b/pkg/bindings/pods/types_unpause_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:41.515225789 -0600 CST m=+0.000158667
*/
// Changed
@@ -39,6 +38,7 @@ func (o *UnpauseOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/system/types_disk_options.go b/pkg/bindings/system/types_disk_options.go
index f7d2cca06..c5eb2f94c 100644
--- a/pkg/bindings/system/types_disk_options.go
+++ b/pkg/bindings/system/types_disk_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:08.087362343 -0600 CST m=+0.000150636
*/
// Changed
@@ -39,6 +38,7 @@ func (o *DiskOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/system/types_events_options.go b/pkg/bindings/system/types_events_options.go
index 6dd64b055..2e95339e6 100644
--- a/pkg/bindings/system/types_events_options.go
+++ b/pkg/bindings/system/types_events_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:07.675150173 -0600 CST m=+0.000140977
*/
// Changed
@@ -39,6 +38,7 @@ func (o *EventsOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/system/types_info_options.go b/pkg/bindings/system/types_info_options.go
index 3a8960e1b..263513b0f 100644
--- a/pkg/bindings/system/types_info_options.go
+++ b/pkg/bindings/system/types_info_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:08.233760126 -0600 CST m=+0.000142369
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InfoOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/system/types_prune_options.go b/pkg/bindings/system/types_prune_options.go
index 2cd3c8000..a9a6a6cda 100644
--- a/pkg/bindings/system/types_prune_options.go
+++ b/pkg/bindings/system/types_prune_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:07.812719858 -0600 CST m=+0.000143214
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/system/types_version_options.go b/pkg/bindings/system/types_version_options.go
index 4974e8d8f..be07581fa 100644
--- a/pkg/bindings/system/types_version_options.go
+++ b/pkg/bindings/system/types_version_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:07.950759332 -0600 CST m=+0.000140376
*/
// Changed
@@ -39,6 +38,7 @@ func (o *VersionOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/volumes/types_create_options.go b/pkg/bindings/volumes/types_create_options.go
index 80bdac2d2..171090afe 100644
--- a/pkg/bindings/volumes/types_create_options.go
+++ b/pkg/bindings/volumes/types_create_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:14.043860791 -0600 CST m=+0.000188944
*/
// Changed
@@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/volumes/types_inspect_options.go b/pkg/bindings/volumes/types_inspect_options.go
index ba8c70b63..3a1d396a7 100644
--- a/pkg/bindings/volumes/types_inspect_options.go
+++ b/pkg/bindings/volumes/types_inspect_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:14.189902005 -0600 CST m=+0.000151439
*/
// Changed
@@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/volumes/types_list_options.go b/pkg/bindings/volumes/types_list_options.go
index 99dec132c..56033a575 100644
--- a/pkg/bindings/volumes/types_list_options.go
+++ b/pkg/bindings/volumes/types_list_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:14.326721724 -0600 CST m=+0.000172471
*/
// Changed
@@ -39,6 +38,7 @@ func (o *ListOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/volumes/types_prune_options.go b/pkg/bindings/volumes/types_prune_options.go
index cdbc03fc9..c043d69d0 100644
--- a/pkg/bindings/volumes/types_prune_options.go
+++ b/pkg/bindings/volumes/types_prune_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:14.463307398 -0600 CST m=+0.000180868
*/
// Changed
@@ -39,6 +38,7 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go
index 923d1353c..1f8ba4e22 100644
--- a/pkg/bindings/volumes/types_remove_options.go
+++ b/pkg/bindings/volumes/types_remove_options.go
@@ -4,6 +4,7 @@ import (
"net/url"
"reflect"
"strconv"
+ "strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@@ -11,8 +12,6 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-
-Created 2020-12-18 15:58:14.60278922 -0600 CST m=+0.000134408
*/
// Changed
@@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
if !o.Changed(fieldName) {
continue
}
+ fieldName = strings.ToLower(fieldName)
f := s.Field(i)
if reflect.Ptr == f.Kind() {
f = f.Elem()
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go
index 96687b1de..d8576c101 100644
--- a/pkg/domain/entities/containers.go
+++ b/pkg/domain/entities/containers.go
@@ -434,3 +434,9 @@ type ContainerStatsReport struct {
// Results, set when there is no error.
Stats []define.ContainerStats
}
+
+// ContainerRenameOptions describes input options for renaming a container.
+type ContainerRenameOptions struct {
+ // NewName is the new name that will be given to the container.
+ NewName string
+}
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 7d38a97f2..d2552770c 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -37,6 +37,7 @@ type ContainerEngine interface {
ContainerPause(ctx context.Context, namesOrIds []string, options PauseUnPauseOptions) ([]*PauseUnpauseReport, error)
ContainerPort(ctx context.Context, nameOrID string, options ContainerPortOptions) ([]*ContainerPortReport, error)
ContainerPrune(ctx context.Context, options ContainerPruneOptions) ([]*reports.PruneReport, error)
+ ContainerRename(ctr context.Context, nameOrID string, options ContainerRenameOptions) error
ContainerRestart(ctx context.Context, namesOrIds []string, options RestartOptions) ([]*RestartReport, error)
ContainerRestore(ctx context.Context, namesOrIds []string, options RestoreOptions) ([]*RestoreReport, error)
ContainerRm(ctx context.Context, namesOrIds []string, options RmOptions) ([]*RmReport, error)
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index 06438f5e9..c826ee389 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -2,8 +2,8 @@ package entities
import (
"net/url"
- "time"
+ "github.com/containers/podman/v2/libpod/define"
docker_api_types "github.com/docker/docker/api/types"
docker_api_types_volume "github.com/docker/docker/api/types/volume"
)
@@ -26,38 +26,7 @@ type IDOrNameResponse struct {
}
type VolumeConfigResponse struct {
- // Name is the name of the volume.
- Name string `json:"Name"`
- // Driver is the driver used to create the volume.
- // This will be properly implemented in a future version.
- Driver string `json:"Driver"`
- // Mountpoint is the path on the host where the volume is mounted.
- Mountpoint string `json:"Mountpoint"`
- // CreatedAt is the date and time the volume was created at. This is not
- // stored for older Libpod volumes; if so, it will be omitted.
- CreatedAt time.Time `json:"CreatedAt,omitempty"`
- // Status is presently unused and provided only for Docker compatibility.
- // In the future it will be used to return information on the volume's
- // current state.
- Status map[string]string `json:"Status,omitempty"`
- // Labels includes the volume's configured labels, key:value pairs that
- // can be passed during volume creation to provide information for third
- // party tools.
- Labels map[string]string `json:"Labels"`
- // Scope is unused and provided solely for Docker compatibility. It is
- // unconditionally set to "local".
- Scope string `json:"Scope"`
- // Options is a set of options that were used when creating the volume.
- // It is presently not used.
- Options map[string]string `json:"Options"`
- // UID is the UID that the volume was created with.
- UID int `json:"UID"`
- // GID is the GID that the volume was created with.
- GID int `json:"GID"`
- // Anonymous indicates that the volume was created as an anonymous
- // volume for a specific container, and will be be removed when any
- // container using it is removed.
- Anonymous bool `json:"Anonymous"`
+ define.InspectVolumeData
}
// VolumeInfo Volume list response
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index b5f5a0e91..a8f4d44a8 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -902,7 +902,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
if err := ic.Libpod.RemoveContainer(ctx, ctr, false, true); err != nil {
if errors.Cause(err) == define.ErrNoSuchCtr ||
errors.Cause(err) == define.ErrCtrRemoved {
- logrus.Warnf("Container %s does not exist: %v", ctr.ID(), err)
+ logrus.Infof("Container %s was already removed, skipping --rm", ctr.ID())
} else {
logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
}
@@ -1312,3 +1312,17 @@ func (ic *ContainerEngine) ShouldRestart(ctx context.Context, nameOrID string) (
return &entities.BoolReport{Value: ctr.ShouldRestart(ctx)}, nil
}
+
+// ContainerRename renames the given container.
+func (ic *ContainerEngine) ContainerRename(ctx context.Context, nameOrID string, opts entities.ContainerRenameOptions) error {
+ ctr, err := ic.Libpod.LookupContainer(nameOrID)
+ if err != nil {
+ return err
+ }
+
+ if _, err := ic.Libpod.RenameContainer(ctx, ctr, opts.NewName); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/pkg/domain/infra/abi/containers_stat.go b/pkg/domain/infra/abi/containers_stat.go
index 5b43ee2f4..931e77026 100644
--- a/pkg/domain/infra/abi/containers_stat.go
+++ b/pkg/domain/infra/abi/containers_stat.go
@@ -144,16 +144,29 @@ func resolveContainerPaths(container *libpod.Container, mountPoint string, conta
}
if volume != nil {
logrus.Debugf("Container path %q resolved to volume %q on path %q", containerPath, volume.Name(), searchPath)
+
+ // TODO: We really need to force the volume to mount
+ // before doing this, but that API is not exposed
+ // externally right now and doing so is beyond the scope
+ // of this commit.
+ mountPoint, err := volume.MountPoint()
+ if err != nil {
+ return "", "", err
+ }
+ if mountPoint == "" {
+ return "", "", errors.Errorf("volume %s is not mounted, cannot copy into it", volume.Name())
+ }
+
// We found a matching volume for searchPath. We now
// need to first find the relative path of our input
// path to the searchPath, and then join it with the
// volume's mount point.
pathRelativeToVolume := strings.TrimPrefix(pathRelativeToContainerMountPoint, searchPath)
- absolutePathOnTheVolumeMount, err := securejoin.SecureJoin(volume.MountPoint(), pathRelativeToVolume)
+ absolutePathOnTheVolumeMount, err := securejoin.SecureJoin(mountPoint, pathRelativeToVolume)
if err != nil {
return "", "", err
}
- return volume.MountPoint(), absolutePathOnTheVolumeMount, nil
+ return mountPoint, absolutePathOnTheVolumeMount, nil
}
if mount := findBindMount(container, searchPath); mount != nil {
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index 97fa9d374..f29b98696 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -312,7 +312,17 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System
var reclaimableSize int64
for _, v := range vols {
var consInUse int
- volSize, err := sizeOfPath(v.MountPoint())
+ mountPoint, err := v.MountPoint()
+ if err != nil {
+ return nil, err
+ }
+ if mountPoint == "" {
+ // We can't get any info on this volume, as it's not
+ // mounted.
+ // TODO: fix this.
+ continue
+ }
+ volSize, err := sizeOfPath(mountPoint)
if err != nil {
return nil, err
}
diff --git a/pkg/domain/infra/abi/volumes.go b/pkg/domain/infra/abi/volumes.go
index 3c9dd9fc0..823605052 100644
--- a/pkg/domain/infra/abi/volumes.go
+++ b/pkg/domain/infra/abi/volumes.go
@@ -103,25 +103,12 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin
}
reports := make([]*entities.VolumeInspectReport, 0, len(vols))
for _, v := range vols {
- var uid, gid int
- uid, err = v.UID()
- if err != nil {
- return nil, nil, err
- }
- gid, err = v.GID()
+ inspectOut, err := v.Inspect()
if err != nil {
return nil, nil, err
}
config := entities.VolumeConfigResponse{
- Name: v.Name(),
- Driver: v.Driver(),
- Mountpoint: v.MountPoint(),
- CreatedAt: v.CreatedTime(),
- Labels: v.Labels(),
- Scope: v.Scope(),
- Options: v.Options(),
- UID: uid,
- GID: gid,
+ InspectVolumeData: *inspectOut,
}
reports = append(reports, &entities.VolumeInspectReport{VolumeConfigResponse: &config})
}
@@ -155,25 +142,12 @@ func (ic *ContainerEngine) VolumeList(ctx context.Context, opts entities.VolumeL
}
reports := make([]*entities.VolumeListReport, 0, len(vols))
for _, v := range vols {
- var uid, gid int
- uid, err = v.UID()
- if err != nil {
- return nil, err
- }
- gid, err = v.GID()
+ inspectOut, err := v.Inspect()
if err != nil {
return nil, err
}
config := entities.VolumeConfigResponse{
- Name: v.Name(),
- Driver: v.Driver(),
- Mountpoint: v.MountPoint(),
- CreatedAt: v.CreatedTime(),
- Labels: v.Labels(),
- Scope: v.Scope(),
- Options: v.Options(),
- UID: uid,
- GID: gid,
+ InspectVolumeData: *inspectOut,
}
reports = append(reports, &entities.VolumeListReport{VolumeConfigResponse: config})
}
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index 49bcdec98..8aab4a9cd 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -820,3 +820,8 @@ func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []stri
func (ic *ContainerEngine) ShouldRestart(_ context.Context, id string) (bool, error) {
return containers.ShouldRestart(ic.ClientCtx, id, nil)
}
+
+// ContainerRename renames the given container.
+func (ic *ContainerEngine) ContainerRename(ctx context.Context, nameOrID string, opts entities.ContainerRenameOptions) error {
+ return errors.Errorf("NOT YET IMPLEMENTED")
+}