@@ -46,16 +46,16 @@ func RegisterSettings(cfg *Config) {
46
46
return ValidateBool (value )
47
47
}
48
48
49
- validateCPUs := func (value interface {}) (bool , string ) {
50
- return ValidateCPUs (value , GetPreset (cfg ))
49
+ validCPUs := func (value interface {}) (bool , string ) {
50
+ return validateCPUs (value , GetPreset (cfg ))
51
51
}
52
52
53
- validateMemory := func (value interface {}) (bool , string ) {
54
- return ValidateMemory (value , GetPreset (cfg ))
53
+ validMemory := func (value interface {}) (bool , string ) {
54
+ return validateMemory (value , GetPreset (cfg ))
55
55
}
56
56
57
- validateBundlePath := func (value interface {}) (bool , string ) {
58
- return ValidateBundlePath (value , GetPreset (cfg ))
57
+ validBundlePath := func (value interface {}) (bool , string ) {
58
+ return validateBundlePath (value , GetPreset (cfg ))
59
59
}
60
60
61
61
validateSmbSharedDirs := func (value interface {}) (bool , string ) {
@@ -73,16 +73,16 @@ func RegisterSettings(cfg *Config) {
73
73
cfg .AddSetting (Preset , version .GetDefaultPreset ().String (), validatePreset , RequiresDeleteAndSetupMsg ,
74
74
fmt .Sprintf ("Virtual machine preset (valid values are: %s)" , preset .AllPresets ()))
75
75
// Start command settings in config
76
- cfg .AddSetting (Bundle , defaultBundlePath (cfg ), validateBundlePath , SuccessfullyApplied , BundleHelpMsg (cfg ))
77
- cfg .AddSetting (CPUs , defaultCPUs (cfg ), validateCPUs , RequiresRestartMsg ,
76
+ cfg .AddSetting (Bundle , defaultBundlePath (cfg ), validBundlePath , SuccessfullyApplied , BundleHelpMsg (cfg ))
77
+ cfg .AddSetting (CPUs , defaultCPUs (cfg ), validCPUs , RequiresRestartMsg ,
78
78
fmt .Sprintf ("Number of CPU cores (must be greater than or equal to '%d')" , defaultCPUs (cfg )))
79
- cfg .AddSetting (Memory , defaultMemory (cfg ), validateMemory , RequiresRestartMsg ,
79
+ cfg .AddSetting (Memory , defaultMemory (cfg ), validMemory , RequiresRestartMsg ,
80
80
fmt .Sprintf ("Memory size in MiB (must be greater than or equal to '%d')" , defaultMemory (cfg )))
81
- cfg .AddSetting (DiskSize , constants .DefaultDiskSize , ValidateDiskSize , RequiresRestartMsg ,
81
+ cfg .AddSetting (DiskSize , constants .DefaultDiskSize , validateDiskSize , RequiresRestartMsg ,
82
82
fmt .Sprintf ("Total size in GiB of the disk (must be greater than or equal to '%d')" , constants .DefaultDiskSize ))
83
- cfg .AddSetting (NameServer , "" , ValidateIPAddress , SuccessfullyApplied ,
83
+ cfg .AddSetting (NameServer , "" , validateIPAddress , SuccessfullyApplied ,
84
84
"IPv4 address of nameserver (string, like '1.1.1.1 or 8.8.8.8')" )
85
- cfg .AddSetting (PullSecretFile , "" , ValidatePath , SuccessfullyApplied ,
85
+ cfg .AddSetting (PullSecretFile , "" , validatePath , SuccessfullyApplied ,
86
86
fmt .Sprintf ("Path of image pull secret (download from %s)" , constants .CrcLandingPageURL ))
87
87
cfg .AddSetting (DisableUpdateCheck , false , ValidateBool , SuccessfullyApplied ,
88
88
"Disable update check (true/false, default: false)" )
@@ -91,7 +91,7 @@ func RegisterSettings(cfg *Config) {
91
91
92
92
// Shared directories configs
93
93
if runtime .GOOS == "windows" {
94
- cfg .AddSetting (SharedDirPassword , Secret ("" ), ValidateString , SuccessfullyApplied ,
94
+ cfg .AddSetting (SharedDirPassword , Secret ("" ), validateString , SuccessfullyApplied ,
95
95
"Password used while using CIFS/SMB file sharing (It is the password for the current logged in user)" )
96
96
97
97
cfg .AddSetting (EnableSharedDirs , false , validateSmbSharedDirs , SuccessfullyApplied ,
@@ -109,27 +109,27 @@ func RegisterSettings(cfg *Config) {
109
109
cfg .AddSetting (HostNetworkAccess , false , validateHostNetworkAccess , RequiresCleanupAndSetupMsg ,
110
110
"Allow TCP/IP connections from the CRC VM to services running on the host (true/false, default: false)" )
111
111
// Proxy Configuration
112
- cfg .AddSetting (HTTPProxy , "" , ValidateHTTPProxy , SuccessfullyApplied ,
112
+ cfg .AddSetting (HTTPProxy , "" , validateHTTPProxy , SuccessfullyApplied ,
113
113
"HTTP proxy URL (string, like 'http://my-proxy.com:8443')" )
114
- cfg .AddSetting (HTTPSProxy , "" , ValidateHTTPSProxy , SuccessfullyApplied ,
114
+ cfg .AddSetting (HTTPSProxy , "" , validateHTTPSProxy , SuccessfullyApplied ,
115
115
"HTTPS proxy URL (string, like 'https://my-proxy.com:8443')" )
116
- cfg .AddSetting (NoProxy , "" , ValidateNoProxy , SuccessfullyApplied ,
116
+ cfg .AddSetting (NoProxy , "" , validateNoProxy , SuccessfullyApplied ,
117
117
"Hosts, ipv4 addresses or CIDR which do not use a proxy (string, comma-separated list such as '127.0.0.1,192.168.100.1/24')" )
118
- cfg .AddSetting (ProxyCAFile , "" , ValidatePath , SuccessfullyApplied ,
118
+ cfg .AddSetting (ProxyCAFile , "" , validatePath , SuccessfullyApplied ,
119
119
"Path to an HTTPS proxy certificate authority (CA)" )
120
120
121
121
cfg .AddSetting (EnableClusterMonitoring , false , ValidateBool , SuccessfullyApplied ,
122
122
"Enable cluster monitoring Operator (true/false, default: false)" )
123
123
124
124
// Telemeter Configuration
125
- cfg .AddSetting (ConsentTelemetry , "" , ValidateYesNo , SuccessfullyApplied ,
125
+ cfg .AddSetting (ConsentTelemetry , "" , validateYesNo , SuccessfullyApplied ,
126
126
"Consent to collection of anonymous usage data (yes/no)" )
127
127
128
- cfg .AddSetting (KubeAdminPassword , "" , ValidateString , SuccessfullyApplied ,
128
+ cfg .AddSetting (KubeAdminPassword , "" , validateString , SuccessfullyApplied ,
129
129
"User defined kubeadmin password" )
130
- cfg .AddSetting (IngressHTTPPort , constants .OpenShiftIngressHTTPPort , ValidatePort , RequiresHTTPPortChangeWarning ,
130
+ cfg .AddSetting (IngressHTTPPort , constants .OpenShiftIngressHTTPPort , validatePort , RequiresHTTPPortChangeWarning ,
131
131
fmt .Sprintf ("HTTP port to use for OpenShift ingress/routes on the host (1024-65535, default: %d)" , constants .OpenShiftIngressHTTPPort ))
132
- cfg .AddSetting (IngressHTTPSPort , constants .OpenShiftIngressHTTPSPort , ValidatePort , RequiresHTTPSPortChangeWarning ,
132
+ cfg .AddSetting (IngressHTTPSPort , constants .OpenShiftIngressHTTPSPort , validatePort , RequiresHTTPSPortChangeWarning ,
133
133
fmt .Sprintf ("HTTPS port to use for OpenShift ingress/routes on the host (1024-65535, default: %d)" , constants .OpenShiftIngressHTTPSPort ))
134
134
135
135
if err := cfg .RegisterNotifier (Preset , presetChanged ); err != nil {
0 commit comments