Skip to content

Commit

Permalink
Update PackageManfiest table handler
Browse files Browse the repository at this point in the history
After the Kube 1.16 rebase, the `oc get packagemanfiest` command would
return an error complaining that no table handler was registered. This
is due to the fact that the expected function signature was changed.

This commit introduces a change that updates the function signature.
  • Loading branch information
awgreene committed Oct 16, 2019
1 parent 586a673 commit 3ebc413
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/package-server/storage/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ func addTableHandlers(h printers.PrintHandler) {

}

func printPackage(manifest *operators.PackageManifest, options printers.PrintOptions) ([]metav1beta1.TableRow, error) {
func printPackage(manifest *operators.PackageManifest, options printers.GenerateOptions) ([]metav1beta1.TableRow, error) {
row := metav1beta1.TableRow{
Object: runtime.RawExtension{Object: manifest},
}
row.Cells = append(row.Cells, manifest.Name, manifest.Status.CatalogSourceDisplayName, translateTimestampSince(manifest.CreationTimestamp))
return []metav1beta1.TableRow{row}, nil
}

func printPackageList(manifestList *operators.PackageManifestList, options printers.PrintOptions) ([]metav1beta1.TableRow, error) {
func printPackageList(manifestList *operators.PackageManifestList, options printers.GenerateOptions) ([]metav1beta1.TableRow, error) {
rows := make([]metav1beta1.TableRow, 0, len(manifestList.Items))
for i := range manifestList.Items {
r, err := printPackage(&manifestList.Items[i], options)
Expand Down

0 comments on commit 3ebc413

Please sign in to comment.