Skip to content

Commit f07f1a3

Browse files
Refresh autorest-selected modules from wyunchi/generation/pipeline-refresh-autorest to main (#24678)
1 parent 5d8ae46 commit f07f1a3

File tree

299 files changed

+10764
-3008
lines changed

Some content is hidden

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

299 files changed

+10764
-3008
lines changed

src/DiskPool/DiskPool.Autorest/Az.DiskPool.format.ps1xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
<TableColumnHeader>
8686
<Label>Name</Label>
8787
</TableColumnHeader>
88+
<TableColumnHeader>
89+
<Label>ResourceGroupName</Label>
90+
</TableColumnHeader>
8891
<TableColumnHeader>
8992
<Label>Location</Label>
9093
</TableColumnHeader>
@@ -97,16 +100,16 @@
97100
<TableColumnHeader>
98101
<Label>AvailabilityZone</Label>
99102
</TableColumnHeader>
100-
<TableColumnHeader>
101-
<Label>ResourceGroupName</Label>
102-
</TableColumnHeader>
103103
</TableHeaders>
104104
<TableRowEntries>
105105
<TableRowEntry>
106106
<TableColumnItems>
107107
<TableColumnItem>
108108
<PropertyName>Name</PropertyName>
109109
</TableColumnItem>
110+
<TableColumnItem>
111+
<PropertyName>ResourceGroupName</PropertyName>
112+
</TableColumnItem>
110113
<TableColumnItem>
111114
<PropertyName>Location</PropertyName>
112115
</TableColumnItem>
@@ -119,9 +122,6 @@
119122
<TableColumnItem>
120123
<PropertyName>AvailabilityZone</PropertyName>
121124
</TableColumnItem>
122-
<TableColumnItem>
123-
<PropertyName>ResourceGroupName</PropertyName>
124-
</TableColumnItem>
125125
</TableColumnItems>
126126
</TableRowEntry>
127127
</TableRowEntries>
Lines changed: 21 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,24 @@
1-
#
2-
# Module manifest for module 'Az.DiskPool'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
6-
# Generated on: 10/28/2021
7-
#
8-
91
@{
10-
11-
# Script module or binary module file associated with this manifest.
12-
RootModule = './Az.DiskPool.psm1'
13-
14-
# Version number of this module.
15-
ModuleVersion = '0.3.0'
16-
17-
# Supported PSEditions
18-
CompatiblePSEditions = 'Core', 'Desktop'
19-
20-
# ID used to uniquely identify this module
21-
GUID = '4ef9a257-25da-4db7-832b-0c44a0e44cf0'
22-
23-
# Author of this module
24-
Author = 'Microsoft Corporation'
25-
26-
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
28-
29-
# Copyright statement for this module
30-
Copyright = 'Microsoft Corporation. All rights reserved.'
31-
32-
# Description of the functionality provided by this module
33-
Description = 'Microsoft Azure PowerShell: DiskPool cmdlets'
34-
35-
# Minimum version of the PowerShell engine required by this module
36-
PowerShellVersion = '5.1'
37-
38-
# Name of the PowerShell host required by this module
39-
# PowerShellHostName = ''
40-
41-
# Minimum version of the PowerShell host required by this module
42-
# PowerShellHostVersion = ''
43-
44-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45-
DotNetFrameworkVersion = '4.7.2'
46-
47-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# ClrVersion = ''
49-
50-
# Processor architecture (None, X86, Amd64) required by this module
51-
# ProcessorArchitecture = ''
52-
53-
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.4'; })
55-
56-
# Assemblies that must be loaded prior to importing this module
57-
RequiredAssemblies = './bin/Az.DiskPool.private.dll'
58-
59-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61-
62-
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64-
65-
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = './Az.DiskPool.format.ps1xml'
67-
68-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69-
# NestedModules = @()
70-
71-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'Get-AzDiskPool', 'Get-AzDiskPoolIscsiTarget',
73-
'Get-AzDiskPoolOutboundNetworkDependencyEndpoint',
74-
'Get-AzDiskPoolResourceSku', 'Get-AzDiskPoolZone',
75-
'Invoke-AzDiskPoolRedeployment', 'New-AzDiskPool',
76-
'New-AzDiskPoolAclObject', 'New-AzDiskPoolIscsiLunObject',
77-
'New-AzDiskPoolIscsiTarget', 'Remove-AzDiskPool',
78-
'Remove-AzDiskPoolIscsiTarget', 'Start-AzDiskPool', 'Stop-AzDiskPool',
79-
'Update-AzDiskPool', 'Update-AzDiskPoolIscsiTarget'
80-
81-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
82-
CmdletsToExport = @()
83-
84-
# Variables to export from this module
85-
# VariablesToExport = @()
86-
87-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
88-
AliasesToExport = '*'
89-
90-
# DSC resources to export from this module
91-
# DscResourcesToExport = @()
92-
93-
# List of all modules packaged with this module
94-
# ModuleList = @()
95-
96-
# List of all files packaged with this module
97-
# FileList = @()
98-
99-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
100-
PrivateData = @{
101-
2+
GUID = '6ee0ccda-b0ba-4017-92fe-6eb1cfacfc66'
3+
RootModule = './Az.DiskPool.psm1'
4+
ModuleVersion = '0.1.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: DiskPool cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.DiskPool.private.dll'
13+
FormatsToProcess = './Az.DiskPool.format.ps1xml'
14+
FunctionsToExport = 'Get-AzDiskPool', 'Get-AzDiskPoolIscsiTarget', 'Get-AzDiskPoolOutboundNetworkDependencyEndpoint', 'Get-AzDiskPoolResourceSku', 'Get-AzDiskPoolZone', 'Invoke-AzDiskPoolRedeployment', 'New-AzDiskPool', 'New-AzDiskPoolAclObject', 'New-AzDiskPoolIscsiLunObject', 'New-AzDiskPoolIscsiTarget', 'Remove-AzDiskPool', 'Remove-AzDiskPoolIscsiTarget', 'Start-AzDiskPool', 'Stop-AzDiskPool', 'Update-AzDiskPool', 'Update-AzDiskPoolIscsiTarget', '*'
15+
AliasesToExport = '*'
16+
PrivateData = @{
10217
PSData = @{
103-
104-
# Tags applied to this module. These help with module discovery in online galleries.
105-
Tags = 'Azure','ResourceManager','ARM','PSModule','DiskPool'
106-
107-
# A URL to the license for this module.
108-
LicenseUri = 'https://aka.ms/azps-license'
109-
110-
# A URL to the main website for this project.
111-
ProjectUri = 'https://github.com/Azure/azure-powershell'
112-
113-
# A URL to an icon representing this module.
114-
# IconUri = ''
115-
116-
# ReleaseNotes of this module
117-
ReleaseNotes = '* Upgraded API version to 2021-08-01 and added two cmdlets: ''Invoke-AzDiskPoolRedeployment'' and ''Get-AzDiskPoolResourceSku'' '
118-
119-
# Prerelease string of this module
120-
# Prerelease = ''
121-
122-
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
123-
# RequireLicenseAcceptance = $false
124-
125-
# External dependent modules of this module
126-
# ExternalModuleDependencies = @()
127-
128-
} # End of PSData hashtable
129-
130-
} # End of PrivateData hashtable
131-
132-
# HelpInfo URI of this module
133-
# HelpInfoURI = ''
134-
135-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
136-
# DefaultCommandPrefix = ''
137-
18+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DiskPool'
19+
LicenseUri = 'https://aka.ms/azps-license'
20+
ProjectUri = 'https://github.com/Azure/azure-powershell'
21+
ReleaseNotes = ''
22+
}
23+
}
13824
}
139-

src/DiskPool/DiskPool.Autorest/Az.DiskPool.psm1

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
}
2626
}
2727
if(-not $accountsModule) {
28-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
28+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
2929
if($hasAdequateVersion) {
30-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
30+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
3131
}
3232
}
3333
}
3434

3535
if(-not $accountsModule) {
36-
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
37-
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
38-
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
36+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
37+
} elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
38+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3939
}
4040
Write-Information "Loaded Module '$($accountsModule.Name)'"
4141

@@ -47,33 +47,41 @@
4747

4848
# Ask for the shared functionality table
4949
$VTable = Register-AzModule
50-
50+
5151
# Tweaks the pipeline on module load
5252
$instance.OnModuleLoad = $VTable.OnModuleLoad
53-
53+
54+
# Following two delegates are added for telemetry
55+
$instance.GetTelemetryId = $VTable.GetTelemetryId
56+
$instance.Telemetry = $VTable.Telemetry
57+
58+
# Delegate to sanitize the output object
59+
$instance.SanitizeOutput = $VTable.SanitizerHandler
60+
61+
# Delegate to get the telemetry info
62+
$instance.GetTelemetryInfo = $VTable.GetTelemetryInfo
5463

5564
# Tweaks the pipeline per call
5665
$instance.OnNewRequest = $VTable.OnNewRequest
57-
66+
5867
# Gets shared parameter values
5968
$instance.GetParameterValue = $VTable.GetParameterValue
60-
69+
6170
# Allows shared module to listen to events from this module
6271
$instance.EventListener = $VTable.EventListener
63-
72+
6473
# Gets shared argument completers
6574
$instance.ArgumentCompleter = $VTable.ArgumentCompleter
66-
75+
6776
# The name of the currently selected Azure profile
6877
$instance.ProfileName = $VTable.ProfileName
6978

70-
7179
# Load the custom module
7280
$customModulePath = Join-Path $PSScriptRoot './custom/Az.DiskPool.custom.psm1'
7381
if(Test-Path $customModulePath) {
7482
$null = Import-Module -Name $customModulePath
7583
}
76-
84+
7785
# Export nothing to clear implicit exports
7886
Export-ModuleMember
7987

@@ -93,12 +101,12 @@
93101
# Load the last folder if no profile is selected
94102
$profileDirectory = $directories | Select-Object -Last 1
95103
}
96-
104+
97105
if($profileDirectory) {
98106
Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
99107
$exportsPath = $profileDirectory.FullName
100108
}
101-
109+
102110
if($exportsPath) {
103111
Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
104112
$cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath

src/DiskPool/DiskPool.Autorest/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
This directory contains the PowerShell module for the DiskPool service.
44

55
---
6-
76
## Info
87
- Modifiable: yes
98
- Generated: all
@@ -15,7 +14,7 @@ This directory contains the PowerShell module for the DiskPool service.
1514
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
1615

1716
## Module Requirements
18-
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
17+
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
1918

2019
## Authentication
2120
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
@@ -28,9 +27,9 @@ For information on how to develop for `Az.DiskPool`, see [how-to.md](how-to.md).
2827
> see https://aka.ms/autorest
2928
3029
``` yaml
31-
branch: 68acb8952caa568dc5c02d7ae4ca53d8356c9c0a
30+
commit: 68acb8952caa568dc5c02d7ae4ca53d8356c9c0a
3231
require:
33-
- $(this-folder)/../readme.azure.noprofile.md
32+
- $(this-folder)/../../readme.azure.noprofile.md
3433
# lock the commit
3534
input-file:
3635
- $(repo)/specification/storagepool/resource-manager/Microsoft.StoragePool/stable/2021-08-01/storagepool.json
@@ -42,6 +41,10 @@ identity-correction-for-post: true
4241
nested-object-to-string: true
4342
resourcegroup-append: true
4443

44+
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
45+
use-extension:
46+
"@autorest/powershell": "3.x"
47+
4548
directive:
4649
# Following is two common directive which are normally required in all the RPs
4750
# 1. Remove the unexpanded parameter set

src/DiskPool/DiskPool.Autorest/build-module.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
123123

124124
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
125125
$modelCmdlets = @('Acl', 'IscsiLun')
126+
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
127+
if (Test-Path $modelCmdletFolder) {
128+
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
129+
}
126130
if ($modelCmdlets.Count -gt 0) {
127131
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
128132
CreateModelCmdlet($modelCmdlets)
@@ -139,7 +143,8 @@ if($NoDocs) {
139143
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
140144
}
141145
$null = New-Item -ItemType Directory -Force -Path $docsFolder
142-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
146+
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
147+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
143148
}
144149

145150
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -158,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
158163
Write-Host -ForegroundColor Green 'Creating example stubs...'
159164
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
160165

166+
if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
167+
{
168+
Write-Host -ForegroundColor Green 'Creating ux metadata...'
169+
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170+
}
171+
161172
Write-Host -ForegroundColor Green '-------------Done-------------'

src/DiskPool/DiskPool.Autorest/check-dependencies.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if(-not $Isolated) {
2525
function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
2626
if($predicate) {
2727
$module = Get-Module -ListAvailable -Name $moduleName
28-
if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
28+
if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
2929
$null = New-Item -ItemType Directory -Force -Path $path
3030
Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
3131
if ($requiredVersion) {
@@ -47,7 +47,7 @@ if(Test-Path -Path $localModulesPath) {
4747
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
4848
}
4949

50-
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
50+
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5'
5151
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
5252

5353
$tools = Join-Path $PSScriptRoot 'tools'

0 commit comments

Comments
 (0)