update restmapping to indicate fully qualified resource

This commit is contained in:
David Eads
2018-05-01 13:02:44 -04:00
parent dc7f074213
commit 9a48066749
26 changed files with 82 additions and 87 deletions

View File

@@ -146,7 +146,11 @@ func (o PauseConfig) RunPause() error {
for _, patch := range set.CalculatePatches(o.Infos, cmdutil.InternalVersionJSONEncoder(), o.Pauser) {
info := patch.Info
if patch.Err != nil {
allErrs = append(allErrs, fmt.Errorf("error: %s %q %v", info.Mapping.Resource, info.Name, patch.Err))
resourceString := info.Mapping.Resource.Resource
if len(info.Mapping.Resource.Group) > 0 {
resourceString = resourceString + "." + info.Mapping.Resource.Group
}
allErrs = append(allErrs, fmt.Errorf("error: %s %q %v", resourceString, info.Name, patch.Err))
continue
}