• Eric Tune's avatar
    Cleanup borrowed conversion functions. · ff35d976
    Eric Tune authored
    In pkg/apis/extensions/v1beta1/conversion.go,
    some conversion code was copied from the
    legacy api because Pod conversions cannot be
    automatically generated because of something
    about deprecatedServiceAccount.
    
    This PR fixes two problems due to that copying.
    
    First, the copied code could drift from its source
    To fix that, I replaced the Convert_api_ and Convert_v1
    implementations with a call to the original function.
    I left a wrapper in case something needed to have
    a package-local function name.
    
    Second, the copied Convert_* functions, were copied,
    in a way that they refer to other conversion functions
    that aren't in the current package.  This prevented
    genconverion from working from a clean start
    (no conversion_generated.go).  Perhaps the person
    who wrote this in the first place had copied
    the conversion_generated.go file from legacy,
    so it worked.   So, I added the v1
    package name to calls to Convert_* functions.
    So, when someone Cargo-Cult copies the conversion.go
    file, like I did, they now will not have to
    wonder why genconversion complains about missing
    Convert_ functions.
    
    Deleted the conversion_generated.go and reran genconversion
    and it worked, no diffs old vs new conversion_generated.go.
    ff35d976
Name
Last commit
Last update
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
hack Loading commit data...
hooks Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
test Loading commit data...
third_party Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...
logo.pdf Loading commit data...
logo.png Loading commit data...
logo.svg Loading commit data...
logo_usage_guidelines.md Loading commit data...
shippable.yml Loading commit data...