Documentation
¶
Overview ¶
Defines helper objects used by the machine pool creation command and unit tests.
Package machinepool is a generated GoMock package.
Index ¶
- Variables
- func VerifyArguments(args Args, flags FlagSet, machineTypeListGetter MachineTypeListGetter, ...) error
- func VerifyCluster(cluster ocm.Cluster) error
- type Args
- type FlagSet
- type MachineTypeListGetter
- type MockFlagSet
- type MockFlagSetMockRecorder
- type MockMachineTypeListGetter
- type MockMachineTypeListGetterMockRecorder
Constants ¶
This section is empty.
Variables ¶
var Cmd = &cobra.Command{ Use: "machinepool --cluster={NAME|ID|EXTERNAL_ID} --instance-type=TYPE --replicas=N [flags] MACHINE_POOL_ID", Aliases: []string{"machinepools", "machine-pool", "machine-pools"}, Short: "Add machine pool to cluster", Long: "Add a machine pool to the cluster.", Example: ` # Add a machine pool mp-1 with 3 replicas and m5.xlarge instance type to a cluster ocm create machinepool --cluster mycluster --instance-type m5.xlarge --replicas 3 mp-1 # Add a machine pool mp-1 with autoscaling enabled and 3 to 6 replicas of m5.xlarge to a cluster ocm create machinepool --cluster=mycluster --enable-autoscaling \ --min-replicas=3 --max-replicas=6 --instance-type=m5.xlarge mp-1 # Add a machine pool mp-1 with labels and m5.xlarge instance type to a cluster ocm create machinepool --cluster mycluster --instance-type m5.xlarge --replicas 3 --labels "foo=bar,bar=baz" mp-1 # Add a machine pool mp-1 with taints and m5.xlarge instance type to a cluster ocm create machinepool --cluster mycluster --instance-type m5.xlarge --replicas 3 --taints "foo=bar:NoSchedule" mp-1`, RunE: run, }
Functions ¶
func VerifyArguments ¶ added in v1.0.4
func VerifyCluster ¶ added in v1.0.4
Types ¶
type MachineTypeListGetter ¶ added in v1.0.4
type MockFlagSet ¶ added in v1.0.4
type MockFlagSet struct {
// contains filtered or unexported fields
}
MockFlagSet is a mock of FlagSet interface.
func NewMockFlagSet ¶ added in v1.0.4
func NewMockFlagSet(ctrl *gomock.Controller) *MockFlagSet
NewMockFlagSet creates a new mock instance.
func (*MockFlagSet) Changed ¶ added in v1.0.4
func (m *MockFlagSet) Changed(flagId string) bool
Changed mocks base method.
func (*MockFlagSet) CheckOneOf ¶ added in v1.0.4
func (m *MockFlagSet) CheckOneOf(flagName string, options []arguments.Option) error
CheckOneOf mocks base method.
func (*MockFlagSet) EXPECT ¶ added in v1.0.4
func (m *MockFlagSet) EXPECT() *MockFlagSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFlagSetMockRecorder ¶ added in v1.0.4
type MockFlagSetMockRecorder struct {
// contains filtered or unexported fields
}
MockFlagSetMockRecorder is the mock recorder for MockFlagSet.
func (*MockFlagSetMockRecorder) Changed ¶ added in v1.0.4
func (mr *MockFlagSetMockRecorder) Changed(flagId any) *gomock.Call
Changed indicates an expected call of Changed.
func (*MockFlagSetMockRecorder) CheckOneOf ¶ added in v1.0.4
func (mr *MockFlagSetMockRecorder) CheckOneOf(flagName, options any) *gomock.Call
CheckOneOf indicates an expected call of CheckOneOf.
type MockMachineTypeListGetter ¶ added in v1.0.4
type MockMachineTypeListGetter struct {
// contains filtered or unexported fields
}
MockMachineTypeListGetter is a mock of MachineTypeListGetter interface.
func NewMockMachineTypeListGetter ¶ added in v1.0.4
func NewMockMachineTypeListGetter(ctrl *gomock.Controller) *MockMachineTypeListGetter
NewMockMachineTypeListGetter creates a new mock instance.
func (*MockMachineTypeListGetter) EXPECT ¶ added in v1.0.4
func (m *MockMachineTypeListGetter) EXPECT() *MockMachineTypeListGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMachineTypeListGetter) GetMachineTypeOptions ¶ added in v1.0.4
func (m *MockMachineTypeListGetter) GetMachineTypeOptions(arg0 ocm.Cluster) ([]arguments.Option, error)
GetMachineTypeOptions mocks base method.
type MockMachineTypeListGetterMockRecorder ¶ added in v1.0.4
type MockMachineTypeListGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockMachineTypeListGetterMockRecorder is the mock recorder for MockMachineTypeListGetter.
func (*MockMachineTypeListGetterMockRecorder) GetMachineTypeOptions ¶ added in v1.0.4
func (mr *MockMachineTypeListGetterMockRecorder) GetMachineTypeOptions(arg0 any) *gomock.Call
GetMachineTypeOptions indicates an expected call of GetMachineTypeOptions.