Skip to content

Conversation

@HemantErappa
Copy link
Member

@HemantErappa HemantErappa commented Oct 21, 2020

Description

Implements the cmdlets to support application gateway private link feature.

Design Review PR:
Azure/azure-powershell-cmdlet-review-pr#654

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

Copy link
Collaborator

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

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

It looks to me you do not need so many cmdlet:
New-AzApplicationGatewayClientAuthConfiguration
New-AzApplicationGatewaySslProfile
New-AzApplicationGatewayTrustedClientCertificate

are enough, other cmdlets can be done by having a new cmdlet update-azapplicationgateway

Copy link
Collaborator

Choose a reason for hiding this comment

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

please rename TrustedClientCertificates as TrustedClientCertificate,
powershell use singularity for parameter names:
https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/cmdlet-best-practices.md

Copy link
Member Author

Choose a reason for hiding this comment

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

This is consistent with other parameter names in NewAzureApplicationGatewayCommand, like SslCertificates, HttpListeners, FrontendPorts, etc., which take a list of PSObjects. Also, the naming TrustedClientCertificates makes it clear to the customer that this parameter takes a list of PSObjects verses a parameter like SslPolicy which takes on a single PSObject.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.commands.network.newazureapplicationgatewaycommand?view=azurerm-ps

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this parameter takes a list of objects, but it also takes one signle object, aka -TrustedClientCertificates @{...} is totally OK. That is why we ask everyone to use singular name.

Considering exisiting parameters I won't request you to revise, but I do hope you understand why.

Copy link
Collaborator

Choose a reason for hiding this comment

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

please rename SslProfiles as SslProfile
powershell use singularity for parameter names:
https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/cmdlet-best-practices.md

Copy link
Member Author

Choose a reason for hiding this comment

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

Same reason as above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this operation sending any request to azure?
It looks like this cmdlet only update ps object in memory. If so, no need for support should process

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

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

can you remove localfeed and use published SDK instead?

@HemantErappa
Copy link
Member Author

It looks to me you do not need so many cmdlet:
New-AzApplicationGatewayClientAuthConfiguration
New-AzApplicationGatewaySslProfile
New-AzApplicationGatewayTrustedClientCertificate

are enough, other cmdlets can be done by having a new cmdlet update-azapplicationgateway

ClientAuthConfiguration, SslProfile and TrustedClientCertificate also have parameters which cannot be set using set-azapplicationgateway. Please refer to Test-ApplicationGatewayCRUDWithMutualAuthentication in src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 for examples. Also we have these cmndlets for other objects like sslcertificate, httplistener, etc., would be better to keep it for consistency :)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this parameter takes a list of objects, but it also takes one signle object, aka -TrustedClientCertificates @{...} is totally OK. That is why we ask everyone to use singular name.

Considering exisiting parameters I won't request you to revise, but I do hope you understand why.

@isra-fel
Copy link
Member

/azp run azure-powershell - windows-powershell

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel isra-fel merged commit c63a5ce into Azure:master Oct 29, 2020
@isra-fel isra-fel mentioned this pull request Nov 9, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants