Skip to content

Commit 411a00f

Browse files
author
Chenglong Liu
committed
Rename afd command
1 parent 539bceb commit 411a00f

File tree

90 files changed

+892
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+892
-311
lines changed

src/Cdn/Cdn.Autorest/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ internal
66
exports
77
tools
88
custom/*.psm1
9+
custom/autogen-model-cmdlets
910
test/*-TestResults.xml
1011
/*.ps1
1112
/*.ps1xml

src/Cdn/Cdn.Autorest/Az.Cdn.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Cdn.private.dll'
1313
FormatsToProcess = './Az.Cdn.format.ps1xml'
14-
FunctionsToExport = 'Clear-AzCdnAfdEndpointContent', 'Clear-AzCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnAfdCustomDomain', 'Get-AzCdnAfdEndpoint', 'Get-AzCdnAfdEndpointResourceUsage', 'Get-AzCdnAfdOrigin', 'Get-AzCdnAfdOriginGroup', 'Get-AzCdnAfdOriginGroupResourceUsage', 'Get-AzCdnAfdProfileResourceUsage', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnLogAnalyticLocation', 'Get-AzCdnLogAnalyticMetric', 'Get-AzCdnLogAnalyticRanking', 'Get-AzCdnLogAnalyticResource', 'Get-AzCdnLogAnalyticWafLogAnalyticMetric', 'Get-AzCdnLogAnalyticWafLogAnalyticRanking', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnResourceUsage', 'Get-AzCdnRoute', 'Get-AzCdnRule', 'Get-AzCdnRuleSet', 'Get-AzCdnRuleSetResourceUsage', 'Get-AzCdnSecret', 'Get-AzCdnSecurityPolicy', 'Get-AzFrontDoorCdnProfile', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnAfdCustomDomain', 'New-AzCdnAfdEndpoint', 'New-AzCdnAfdOrigin', 'New-AzCdnAfdOriginGroup', 'New-AzCdnCustomDomain', 'New-AzCdnEndpoint', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnPolicy', 'New-AzCdnProfileSsoUri', 'New-AzCdnRoute', 'New-AzCdnRule', 'New-AzCdnSecret', 'New-AzCdnSecurityPolicy', 'New-AzFrontDoorCdnProfile', 'Remove-AzCdnAfdCustomDomain', 'Remove-AzCdnAfdEndpoint', 'Remove-AzCdnAfdOrigin', 'Remove-AzCdnAfdOriginGroup', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnRoute', 'Remove-AzCdnRule', 'Remove-AzCdnRuleSet', 'Remove-AzCdnSecret', 'Remove-AzCdnSecurityPolicy', 'Remove-AzFrontDoorCdnProfile', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnAfdEndpointCustomDomain', 'Test-AzCdnAfdProfileHostNameAvailability', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnEndpointNameAvailability', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Update-AzCdnAfdCustomDomain', 'Update-AzCdnAfdCustomDomainValidationToken', 'Update-AzCdnAfdEndpoint', 'Update-AzCdnAfdOrigin', 'Update-AzCdnAfdOriginGroup', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnRoute', 'Update-AzCdnRule', 'Update-AzCdnSecurityPolicy', 'Update-AzFrontDoorCdnProfile', '*'
14+
FunctionsToExport = 'Clear-AzCdnEndpointContent', 'Clear-AzFrontDoorCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnLogAnalyticLocation', 'Get-AzCdnLogAnalyticMetric', 'Get-AzCdnLogAnalyticRanking', 'Get-AzCdnLogAnalyticResource', 'Get-AzCdnLogAnalyticWafLogAnalyticMetric', 'Get-AzCdnLogAnalyticWafLogAnalyticRanking', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnResourceUsage', 'Get-AzCdnRoute', 'Get-AzCdnRule', 'Get-AzCdnRuleSet', 'Get-AzCdnRuleSetResourceUsage', 'Get-AzCdnSecret', 'Get-AzCdnSecurityPolicy', 'Get-AzFrontDoorCdnCustomDomain', 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnEndpointResourceUsage', 'Get-AzFrontDoorCdnOrigin', 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnOriginGroupResourceUsage', 'Get-AzFrontDoorCdnProfile', 'Get-AzFrontDoorCdnProfileResourceUsage', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnCustomDomain', 'New-AzCdnEndpoint', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnPolicy', 'New-AzCdnProfileSsoUri', 'New-AzCdnRoute', 'New-AzCdnRule', 'New-AzCdnSecret', 'New-AzCdnSecurityPolicy', 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', 'New-AzFrontDoorCdnProfile', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnRoute', 'Remove-AzCdnRule', 'Remove-AzCdnRuleSet', 'Remove-AzCdnSecret', 'Remove-AzCdnSecurityPolicy', 'Remove-AzFrontDoorCdnCustomDomain', 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnOriginGroup', 'Remove-AzFrontDoorCdnProfile', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnEndpointNameAvailability', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Test-AzFrontDoorCdnEndpointCustomDomain', 'Test-AzFrontDoorCdnProfileHostNameAvailability', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnRoute', 'Update-AzCdnRule', 'Update-AzCdnSecurityPolicy', 'Update-AzFrontDoorCdnCustomDomain', 'Update-AzFrontDoorCdnCustomDomainValidationToken', 'Update-AzFrontDoorCdnEndpoint', 'Update-AzFrontDoorCdnOrigin', 'Update-AzFrontDoorCdnOriginGroup', 'Update-AzFrontDoorCdnProfile', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Cdn/Cdn.Autorest/custom/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For `Az.Cdn` to use custom cmdlets, it does this two different ways. We **highly
1212

1313
For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Cdn.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
1414

15-
For script cmdlets, these are loaded via the `Az.Cdn.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
15+
For script cmdlets, these are loaded via the `Az.Cdn.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
1818
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
@@ -32,10 +32,10 @@ These provide functionality to our HTTP pipeline and other useful features. In s
3232
### Attributes
3333
For processing the cmdlets, we've created some additional attributes:
3434
- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.DescriptionAttribute`
35-
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
35+
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
3636
- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Cdn`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Cdn`. For more information, see [readme.md](../internal/readme.md) in the `../internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Cdn`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

0 commit comments

Comments
 (0)