Skip to content

Commit 8c6356b

Browse files
author
NimishaS
committed
Made -TypeHandlerVersion mandatory parameter and Updated help file
1 parent dff3fb0 commit 8c6356b

File tree

2 files changed

+568
-4
lines changed

2 files changed

+568
-4
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/Chef/SetAzureVMChefExtension.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class SetAzureVMChefExtensionCommand : VirtualMachineExtensionBaseCmdlet
5454

5555
[Alias("HandlerVersion", "Version")]
5656
[Parameter(
57-
Mandatory = false,
57+
Mandatory = true,
5858
Position = 9,
5959
ValueFromPipelineByPropertyName = true,
6060
HelpMessage = "The extension version.")]
@@ -358,14 +358,16 @@ private void SetDefault()
358358
{
359359
this.Name = ExtensionDefaultName;
360360
}
361-
this.TypeHandlerVersion = this.TypeHandlerVersion ?? GetLatestChefExtensionVersion();
361+
362+
//Uncomment this when GetLatestChefExtensionVersion() is implemented
363+
//this.TypeHandlerVersion = this.TypeHandlerVersion ?? GetLatestChefExtensionVersion();
362364
}
363365

364366
private string GetLatestChefExtensionVersion()
365367
{
366368
//Right now chef extension's major version is freezed as 1210.
367-
//Todo: Implement proper logic to fetch the current major version number
368-
return "1210.*";
369+
//Todo: Implement proper logic to fetch the current major.minor version number
370+
return "1210.12";
369371
}
370372

371373
private void ValidateParameters()

0 commit comments

Comments
 (0)