@@ -84,30 +84,12 @@ public class SetAzureVMChefExtensionCommand : VirtualMachineChefExtensionCmdletB
84
84
[ ValidateNotNullOrEmpty ]
85
85
public string OrganizationName { get ; set ; }
86
86
87
- [ Parameter (
88
- ValueFromPipelineByPropertyName = true ,
89
- HelpMessage = "Flag to opt for auto chef-client update. Chef-client update is false by default." ) ]
90
- [ ValidateNotNullOrEmpty ]
91
- public SwitchParameter AutoUpdateChefClient { get ; set ; }
92
-
93
- [ Parameter (
94
- ValueFromPipelineByPropertyName = true ,
95
- HelpMessage = "Delete the chef config files during update/uninstall extension. Default is false." ) ]
96
- [ ValidateNotNullOrEmpty ]
97
- public SwitchParameter DeleteChefConfig { get ; set ; }
98
-
99
87
[ Parameter (
100
88
ValueFromPipelineByPropertyName = true ,
101
89
HelpMessage = "Chef client version to be installed with the extension" ) ]
102
90
[ ValidateNotNullOrEmpty ]
103
91
public string BootstrapVersion { get ; set ; }
104
92
105
- [ Parameter (
106
- ValueFromPipelineByPropertyName = true ,
107
- HelpMessage = "Uninstall Chef client during update/uninstall extension. Default is false." ) ]
108
- [ ValidateNotNullOrEmpty ]
109
- public SwitchParameter UninstallChefClient { get ; set ; }
110
-
111
93
[ Parameter (
112
94
Mandatory = true ,
113
95
ParameterSetName = LinuxParameterSetName ,
@@ -177,10 +159,7 @@ private void SetPublicConfig()
177
159
bool IsValidationClientNameEmpty = string . IsNullOrEmpty ( this . ValidationClientName ) ;
178
160
bool IsRunListEmpty = string . IsNullOrEmpty ( this . RunList ) ;
179
161
bool IsBootstrapOptionsEmpty = string . IsNullOrEmpty ( this . BootstrapOptions ) ;
180
- string AutoUpdateChefClient = this . AutoUpdateChefClient . IsPresent ? "true" : "false" ;
181
- string DeleteChefConfig = this . DeleteChefConfig . IsPresent ? "true" : "false" ;
182
162
string BootstrapVersion = this . BootstrapVersion ;
183
- string UninstallChefClient = this . UninstallChefClient . IsPresent ? "true" : "false" ;
184
163
185
164
//Cases handled:
186
165
// 1. When clientRb given by user and:
@@ -234,46 +213,34 @@ private void SetPublicConfig()
234
213
{
235
214
if ( IsBootstrapOptionsEmpty )
236
215
{
237
- this . PublicConfiguration = string . Format ( "{{{0},{1},{2},{3},{4}}}" ,
238
- string . Format ( AutoUpdateTemplate , AutoUpdateChefClient ) ,
239
- string . Format ( DeleteChefConfigTemplate , DeleteChefConfig ) ,
216
+ this . PublicConfiguration = string . Format ( "{{{0},{1}}}" ,
240
217
string . Format ( ClientRbTemplate , ClientConfig ) ,
241
- string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ,
242
- string . Format ( UninstallChefClientTemplate , UninstallChefClient ) ) ;
218
+ string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ) ;
243
219
}
244
220
else
245
221
{
246
- this . PublicConfiguration = string . Format ( "{{{0},{1},{2},{3},{4},{5}}}" ,
247
- string . Format ( AutoUpdateTemplate , AutoUpdateChefClient ) ,
248
- string . Format ( DeleteChefConfigTemplate , DeleteChefConfig ) ,
222
+ this . PublicConfiguration = string . Format ( "{{{0},{1},{2}}}" ,
249
223
string . Format ( ClientRbTemplate , ClientConfig ) ,
250
224
string . Format ( BootStrapOptionsTemplate , this . BootstrapOptions ) ,
251
- string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ,
252
- string . Format ( UninstallChefClientTemplate , UninstallChefClient ) ) ;
225
+ string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ) ;
253
226
}
254
227
}
255
228
else
256
229
{
257
230
if ( IsBootstrapOptionsEmpty )
258
231
{
259
- this . PublicConfiguration = string . Format ( "{{{0},{1},{2},{3},{4},{5}}}" ,
260
- string . Format ( AutoUpdateTemplate , AutoUpdateChefClient ) ,
261
- string . Format ( DeleteChefConfigTemplate , DeleteChefConfig ) ,
232
+ this . PublicConfiguration = string . Format ( "{{{0},{1},{2}}}" ,
262
233
string . Format ( ClientRbTemplate , ClientConfig ) ,
263
234
string . Format ( RunListTemplate , this . RunList ) ,
264
- string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ,
265
- string . Format ( UninstallChefClientTemplate , UninstallChefClient ) ) ;
235
+ string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ) ;
266
236
}
267
237
else
268
238
{
269
- this . PublicConfiguration = string . Format ( "{{{0},{1},{2},{3},{4},{5},{6}}}" ,
270
- string . Format ( AutoUpdateTemplate , AutoUpdateChefClient ) ,
271
- string . Format ( DeleteChefConfigTemplate , DeleteChefConfig ) ,
239
+ this . PublicConfiguration = string . Format ( "{{{0},{1},{2},{3}}}" ,
272
240
string . Format ( ClientRbTemplate , ClientConfig ) ,
273
241
string . Format ( RunListTemplate , this . RunList ) ,
274
242
string . Format ( BootStrapOptionsTemplate , this . BootstrapOptions ) ,
275
- string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ,
276
- string . Format ( UninstallChefClientTemplate , UninstallChefClient ) ) ;
243
+ string . Format ( BootstrapVersionTemplate , BootstrapVersion ) ) ;
277
244
}
278
245
}
279
246
}
0 commit comments