|
| 1 | +package mom |
| 2 | + |
| 3 | +import ( |
| 4 | + "context" |
| 5 | + |
| 6 | + "github.com/openshift/multi-operator-manager/pkg/library/libraryinputresources" |
| 7 | + "github.com/openshift/multi-operator-manager/pkg/library/libraryoutputresources" |
| 8 | + "github.com/spf13/cobra" |
| 9 | + "k8s.io/cli-runtime/pkg/genericiooptions" |
| 10 | +) |
| 11 | + |
| 12 | +func NewInputResourcesCommand(streams genericiooptions.IOStreams) *cobra.Command { |
| 13 | + return libraryinputresources.NewInputResourcesCommand(runInputResources, runOutputResources, streams) |
| 14 | +} |
| 15 | + |
| 16 | +func runInputResources(ctx context.Context) (*libraryinputresources.InputResources, error) { |
| 17 | + return &libraryinputresources.InputResources{ |
| 18 | + ApplyConfigurationResources: libraryinputresources.ResourceList{ |
| 19 | + ExactResources: []libraryinputresources.ExactResourceID{ |
| 20 | + // TODO: Fill in discovered resources |
| 21 | + }, |
| 22 | + }, |
| 23 | + }, nil |
| 24 | +} |
| 25 | + |
| 26 | +// runOutputResources is defined here to support the input-resources command |
| 27 | +// The actual implementation will be in output_resources_command.go |
| 28 | +func runOutputResources(ctx context.Context) (*libraryoutputresources.OutputResources, error) { |
| 29 | + return &libraryoutputresources.OutputResources{ |
| 30 | + ConfigurationResources: libraryoutputresources.ResourceList{ |
| 31 | + ExactResources: []libraryoutputresources.ExactResourceID{}, |
| 32 | + }, |
| 33 | + ManagementResources: libraryoutputresources.ResourceList{ |
| 34 | + ExactResources: []libraryoutputresources.ExactResourceID{}, |
| 35 | + }, |
| 36 | + UserWorkloadResources: libraryoutputresources.ResourceList{ |
| 37 | + ExactResources: []libraryoutputresources.ExactResourceID{}, |
| 38 | + }, |
| 39 | + }, nil |
| 40 | +} |
0 commit comments