-
Notifications
You must be signed in to change notification settings - Fork 4k
AzureRmVMDiagnostics command change [yantang] #1381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…meter for Set-AzureRmVmDiagnosticsExtension
…nsion. Also make the command work with storage account that's not under current resource group or subscription.
Hi @yantang-msft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
Can one of the admins verify this patch? |
For testing, Get and Remove is fairly easy, just specify the ResourceGroupName and VMName name. I've tested locally for the case with/without diagnostics extension. There is also a known issue, if there is already an diagnostics extension, user must first Remove the extension then Set. Let me know if you have any other questions (alias: yantang). |
@azuresdkci add to whitelist |
[Cmdlet( | ||
VerbsCommon.Set, | ||
ProfileNouns.VirtualMachineDiagnosticsExtension)] | ||
public class SetAzureVMDiagnosticsExtensionCommand : VirtualMachineExtensionBaseCmdlet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the class name to reflect cmdlet name change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
@yantang-msft please change all class names in your PR to reflect cmdlet name (see my comment in SetAzureRmVMDiagnosticsExtension.cs). |
Also add tests to verify changed functionality. |
@yantang-msft Please address review feedback. Note that code complete is EOD today, so this PR is at risk of slipping until the January release |
AzureRmVMDiagnostics command change [yantang]
Hi, this code is changed by Microsoft FTE from azure tools team. Alias: yantang
The change aimed at making AzureRmVMDiagnostics related command more reasonable to use, also fixed some bugs. Detailed changes are listed below.
Set-AzureRMVMDiagnosticsExtension
a) Make StorageContext optional, and make -StorageAccountName -StorageAccountKey as optional parameter
a. Can parse account name from config file if not specified
b. Can get the account key if not specified and account is under current subs
c. Handle storage endpoint address.
b) Fix bug so that user can use a storage account in a different subscription other than the current one.
c) Make -Name an optional parameter, default to "Microsoft.Insights.VMDiagnosticsSettings"
d) Make -Location optional, default to using the VM's location.
e) -Version Optional parameter, default is 1.5
f) -AutoUpgradeMinorVersion optional, default is true
Get-AzureRMVMDiagnosticsExtension & Remove-AzureRMVMDiagnosticsExtension
a) Make -Name optional parameter