Skip to content

Update property name for get bgp service community cmdlets and remove name property for stats cmdlets #3572

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

Merged
merged 4 commits into from
Mar 8, 2017

Conversation

dihan0604
Copy link
Contributor

@dihan0604 dihan0604 commented Mar 3, 2017

Description


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@msftgits
Copy link

msftgits commented Mar 3, 2017

Closing and reopening to try and ping the CLA bot.

@msftgits msftgits closed this Mar 3, 2017
@msftgits msftgits reopened this Mar 3, 2017
@msftgits
Copy link

msftgits commented Mar 3, 2017

Trying again to bump CLA bot

@dihan0604
Copy link
Contributor Author

Fix issue: #3564

<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="8.3.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="8.6.0-preview" targetFramework="net45" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dihan0604 the build is failing because this is not 9.0.0-preview

@markcowl
Copy link
Member

markcowl commented Mar 3, 2017

@azuresdkci retest this please

@cormacpayne cormacpayne assigned markcowl and unassigned dihan0604 Mar 6, 2017
@markcowl
Copy link
Member

markcowl commented Mar 6, 2017

@dihan0604 Please update the PR title to be more descriptive, and please clean up the commits. We have some advice on cleaning up commits here: https://github.com/Azure/azure-powershell/blob/dev/documentation/cleaning-up-commits.md

<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.4\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not going to be able to make this change without making this change across all RPs.

@@ -98,11 +98,11 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.4\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for this reference

@@ -33,15 +33,7 @@ public enum DevicePathEnum

[Cmdlet(VerbsCommon.Get, "AzureRmExpressRouteCircuitARPTable"),OutputType(typeof(PSExpressRouteCircuitArpTable))]
public class GetAzureExpressRouteCircuitARPTableCommand : NetworkBaseCmdlet
{
[Alias("ResourceName")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to move this alias, and add an alias for Name to 'ExpressRouteCircuitName'. This applies to all of your cmdlet changes.

@dihan0604
Copy link
Contributor Author

@markcowl comments adressed.

@dihan0604 dihan0604 changed the title update property name Update property name for get bgp service community cmdlets and remove name property for stats cmdlets Mar 6, 2017
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.Chef.SetAzureVMChefExtensionCommand","Set-AzureRmVMChefExtension","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'Windows' for cmdlet 'Set-AzureRmVMChefExtension'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'Windows'."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, add the alias 'Name' to each of the ExpressRouteCircuitName parameters.

@markcowl markcowl assigned dihan0604 and unassigned markcowl Mar 7, 2017
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.Chef.SetAzureVMChefExtensionCommand","Set-AzureRmVMChefExtension","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'Windows' for cmdlet 'Set-AzureRmVMChefExtension'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'Windows'."
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.GetAzureExpressRouteCircuitARPTableCommand","Get-AzureRmExpressRouteCircuitARPTable","0","2030","The parameter 'Name' is no longer optional for the parameter set '__AllParameterSets' for cmdlet 'Get-AzureRmExpressRouteCircuitARPTable'.","Make 'Name' optional for the parameter set '__AllParameterSets'."
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.GetAzureExpressRouteCircuitARPTableCommand","Get-AzureRmExpressRouteCircuitARPTable","0","2080","The parameter 'Name' in parameter set '__AllParameterSets' for cmdlet 'Get-AzureRmExpressRouteCircuitARPTable' no longer has the attribute 'ValueFromPipelineByPropertyName'.","Add the attribute 'ValueFromPipelineByPropertyName' back to parameter 'Name' in parameter set '__AllParameterSets'."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These exceptions around GetValueByPipelineByPropertyName still apply - ExpressRouteCircuitName shoudl allow getting its value from the pipeline by property name -> this allows piping in a Get from generic cmdlets into these methods.

The other exceptions are valid

@dihan0604
Copy link
Contributor Author

@markcowl Fixed the pipelinebypropertyname exception

@markcowl
Copy link
Member

markcowl commented Mar 7, 2017

@azuresdkci retest this please

@markcowl markcowl changed the base branch from dev to release-3.7.0 March 8, 2017 00:23
@dihan0604
Copy link
Contributor Author

@markcowl
Copy link
Member

markcowl commented Mar 8, 2017

@markcowl markcowl merged commit 8a1a6d5 into Azure:release-3.7.0 Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants