-
Notifications
You must be signed in to change notification settings - Fork 4k
Implement Add/Remove Cmdlets for VMSS diagnostics extension, add rela… #2899
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
Hi @zhencui, 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? |
@zhencui Hey Zhenhua, please merge the latest changes from dev to fix the conflicts |
@zhencui There are merge conflicts, please update |
@cormacpayne @markcowl Conflicts have been resolved. |
@azuresdkci add to whitelist |
1 similar comment
@azuresdkci add to whitelist |
Mandatory = false, | ||
Position = 1, | ||
ValueFromPipelineByPropertyName = true)] | ||
public string Name { get; set; } |
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.
Should the remove have an alias for Name property in order to be consistent with the Add-AzureRmVmssDiagnosticsExtension cmdlet Name property?
-ImageReferenceOffer $imgRef.Offer -ImageReferenceSku $imgRef.Skus -ImageReferenceVersion $imgRef.Version ` | ||
-ImageReferencePublisher $imgRef.PublisherName -VhdContainer $vhdContainer ` | ||
| Add-AzureRmVmssDiagnosticsExtension -Name $extname -SettingFilePath "$TestOutputRoot\ConfigFiles\DiagnosticsExtensionPublicConfig.json" ` |
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.
Any reason, no tests have not been added for covering rest of the parameters for AddAzureRmVmssdianosticsExtension (e.g. VirtualMachineScaleSet, PrtectedSettingFilePath, TypeHandlerVersion)
If you are planning to add those test later, can you create an issue and link to this PR or if you think those tests are not needed, please mention in the PR.
39fcc34
to
7e2557e
Compare
@azuresdkci retest this please |
@zhencui The PR is failing due to cmdlet signature issues for the two new cmdlets caught by the static analysis tools. I have placed comments in the two cmdlets that need to be changed. See http://azuresdkci.cloudapp.net/job/powershell/6512/artifact/src/Package/SignatureIssues.csv for the static analysis report. |
@zhencui the following test is failing:
|
@zhencui Hey Zhenhua, would you mind pulling from dev to get the latest changes that fix the on-demand build? |
|
||
if (diagnosticsExtensions.Any()) | ||
{ | ||
if (Force.IsPresent || |
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.
Is this really necessary? Seems liek the ShouldContinue is going to happen every time anythiung is deleted, so not much of a reason for the prompt or for the Force parameter. I would remove it.
@zhencui One comment on the lack of need for Force parameter. Otherwise LGTM |
Comments
This checklist is used to make sure that common issues in a pull request are covered by the creator. You can find a more complete discussion of PowerShell cmdlet best practices here.
Below in Overall Changes, check off the boxes that apply to your PR. For the categories that you did not check off, you can remove them from this body. Within each of the categories that you did select, make sure that you can check off all of the boxes.
For information on cleaning up the commits in your pull request, click here.
Overall Changes
General
Tests
Cmdlet Signature
VerbsCommon
,VerbsCommunication
,VerbsLifecycle
,VerbsOther
whenever possibleOutputType
attribute if any output is produced; if the cmdlet produces no output, it should implement aPassThrough
parameterShouldProcess
and haveSupportShouldProcess = true
specified in the cmdlet attribute. See a discussion about correctShouldProcess
implementation hereDefaultParameterSetName
in its cmdlet attributeParameters
object
.ResourceGroup
type string marked as [ValueFromPipelineByPropertyName]ResourceName
type string marked as [ValueFromPipelineByPropertyName]HashTable
Parameters and the Pipeline
object
ResourceGroupName
andName
from the pipeline by property valueGet
andNew
cmdlets to the input ofSet
,Update
,Remove
and other action cmdlets for that resource…ted test case and scenario records