Merge pull request #23427 from wojtek-t/conversions_with_framework_4

Automatic merge from submit-queue

Migrate to the new conversion generator - part1

This PR contains two commits:
- few more fixes to the generator
- migration of the pkg/api/v1 to use the new generator

The second commit is big, but I reviewed the changes and they contain:
- conversions between types that we didn't even generating conversion between
- changes in how we handle maps/pointers/slices - previously we were explicitly referencing fields, now we are using "shadowing in, out" to make the code more generic
- lack of auto-generated method for ReplicationControllerSpec (because these types are different (*int vs int for Replicas) and a preexisting conversion already exists

Most of issues in the first commit (e.g. adding references to "in" and "out" for slices/maps/points) were discovered by our tests. So I'm pretty confident that this change is correct now.
This commit is contained in:
k8s-merge-robot
2016-03-31 17:28:36 -07:00
8 changed files with 4716 additions and 4097 deletions

View File

@@ -30,15 +30,6 @@ func DeepCopy_unversioned_Duration(in Duration, out *Duration, c *conversion.Clo
return nil
}
func DeepCopy_unversioned_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
if err := DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err
}
out.Export = in.Export
out.Exact = in.Exact
return nil
}
func DeepCopy_unversioned_GroupKind(in GroupKind, out *GroupKind, c *conversion.Cloner) error {
out.Group = in.Group
out.Kind = in.Kind

File diff suppressed because it is too large Load Diff

View File

@@ -1816,6 +1816,7 @@ type ServiceSpec struct {
// API for compatibility until at least 8/20/2016. It will be removed from
// any new API revisions. If both deprecatedPublicIPs *and* externalIPs are
// set, deprecatedPublicIPs is used.
// +genconversion=false
DeprecatedPublicIPs []string `json:"deprecatedPublicIPs,omitempty"`
// Supports "ClientIP" and "None". Used to maintain session affinity.