refactor: generated

This commit is contained in:
Clayton Coleman
2016-12-09 13:16:33 -05:00
parent 596d9de8fa
commit c52d510a24
83 changed files with 11705 additions and 27639 deletions

View File

@@ -29,11 +29,12 @@ go_library(
"//pkg/api/util:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apimachinery/registered:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"//pkg/apis/meta/v1/unstructured:go_default_library",
"//pkg/apis/meta/v1/validation:go_default_library",
"//pkg/apis/storage/util:go_default_library",
"//pkg/capabilities:go_default_library",
"//pkg/labels:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/security/apparmor:go_default_library",
"//pkg/util/config:go_default_library",

View File

@@ -193,7 +193,7 @@ func ValidateEndpointsSpecificAnnotations(annotations map[string]string, fldPath
return allErrs
}
func validateOwnerReference(ownerReference api.OwnerReference, fldPath *field.Path) field.ErrorList {
func validateOwnerReference(ownerReference metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
gvk := schema.FromAPIVersionAndKind(ownerReference.APIVersion, ownerReference.Kind)
// gvk.Group is empty for the legacy group.
@@ -215,7 +215,7 @@ func validateOwnerReference(ownerReference api.OwnerReference, fldPath *field.Pa
return allErrs
}
func ValidateOwnerReferences(ownerReferences []api.OwnerReference, fldPath *field.Path) field.ErrorList {
func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
controllerName := ""
for _, ref := range ownerReferences {

View File

@@ -105,13 +105,13 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) {
falseVar := false
testCases := []struct {
description string
ownerReferences []api.OwnerReference
ownerReferences []metav1.OwnerReference
expectError bool
expectedErrorMessage string
}{
{
description: "simple success - third party extension.",
ownerReferences: []api.OwnerReference{
ownerReferences: []metav1.OwnerReference{
{
APIVersion: "thirdpartyVersion",
Kind: "thirdpartyKind",
@@ -124,7 +124,7 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) {
},
{
description: "simple failures - event shouldn't be set as an owner",
ownerReferences: []api.OwnerReference{
ownerReferences: []metav1.OwnerReference{
{
APIVersion: "v1",
Kind: "Event",
@@ -137,7 +137,7 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) {
},
{
description: "simple controller ref success - one reference with Controller set",
ownerReferences: []api.OwnerReference{
ownerReferences: []metav1.OwnerReference{
{
APIVersion: "thirdpartyVersion",
Kind: "thirdpartyKind",
@@ -171,7 +171,7 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) {
},
{
description: "simple controller ref failure - two references with Controller set",
ownerReferences: []api.OwnerReference{
ownerReferences: []metav1.OwnerReference{
{
APIVersion: "thirdpartyVersion",
Kind: "thirdpartyKind",