Add support for installing custom object APIs

This commit is contained in:
Brendan Burns
2015-08-19 22:08:26 -07:00
parent 7bfc8b5f37
commit b196d0f84b
16 changed files with 603 additions and 158 deletions

View File

@@ -257,3 +257,15 @@ func ValidateDeployment(obj *expapi.Deployment) errs.ValidationErrorList {
allErrs = append(allErrs, ValidateDeploymentSpec(&obj.Spec).Prefix("spec")...)
return allErrs
}
func ValidateThirdPartyResourceDataUpdate(old, update *expapi.ThirdPartyResourceData) errs.ValidationErrorList {
return ValidateThirdPartyResourceData(update)
}
func ValidateThirdPartyResourceData(obj *expapi.ThirdPartyResourceData) errs.ValidationErrorList {
allErrs := errs.ValidationErrorList{}
if len(obj.Name) == 0 {
allErrs = append(allErrs, errs.NewFieldInvalid("name", obj.Name, "name must be non-empty"))
}
return allErrs
}