Skip to content

Commit 200453a

Browse files
Refresh autorest-selected modules Migrate;Monitor;Nginx;ProviderHub;Quota (#24714)
* Refresh autorest-selected modules from generation to main * suppress breaking changes in monitor * monitor changlog explain removing location --------- Co-authored-by: Yeming Liu <[email protected]>
1 parent e5e5c06 commit 200453a

File tree

1,595 files changed

+44390
-11842
lines changed

Some content is hidden

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

1,595 files changed

+44390
-11842
lines changed

src/Migrate/Migrate.Autorest/Az.Migrate.psm1

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +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
5353

5454
# Following two delegates are added for telemetry
5555
$instance.GetTelemetryId = $VTable.GetTelemetryId
5656
$instance.Telemetry = $VTable.Telemetry
57-
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
5863

5964
# Tweaks the pipeline per call
6065
$instance.OnNewRequest = $VTable.OnNewRequest
61-
66+
6267
# Gets shared parameter values
6368
$instance.GetParameterValue = $VTable.GetParameterValue
64-
69+
6570
# Allows shared module to listen to events from this module
6671
$instance.EventListener = $VTable.EventListener
67-
72+
6873
# Gets shared argument completers
6974
$instance.ArgumentCompleter = $VTable.ArgumentCompleter
70-
75+
7176
# The name of the currently selected Azure profile
7277
$instance.ProfileName = $VTable.ProfileName
7378

74-
7579
# Load the custom module
7680
$customModulePath = Join-Path $PSScriptRoot './custom/Az.Migrate.custom.psm1'
7781
if(Test-Path $customModulePath) {
7882
$null = Import-Module -Name $customModulePath
7983
}
80-
84+
8185
# Export nothing to clear implicit exports
8286
Export-ModuleMember
8387

@@ -97,12 +101,12 @@
97101
# Load the last folder if no profile is selected
98102
$profileDirectory = $directories | Select-Object -Last 1
99103
}
100-
104+
101105
if($profileDirectory) {
102106
Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
103107
$exportsPath = $profileDirectory.FullName
104108
}
105-
109+
106110
if($exportsPath) {
107111
Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
108112
$cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateDiscoveredServer.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ begin {
129129
ListInSite = 'Az.Migrate.custom\Get-AzMigrateDiscoveredServer';
130130
}
131131
if (('List', 'GetInSite', 'Get', 'ListInSite') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
132-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
132+
$testPlayback = $false
133+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
134+
if ($testPlayback) {
135+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
136+
} else {
137+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
138+
}
133139
}
134140
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
135141
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateHCIJob.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,13 @@ begin {
229229
ListById = 'Az.Migrate.custom\Get-AzMigrateHCIJob';
230230
}
231231
if (('ListByName', 'GetById', 'GetByName', 'GetByInputObject', 'ListById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
232-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
232+
$testPlayback = $false
233+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
234+
if ($testPlayback) {
235+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
236+
} else {
237+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
238+
}
233239
}
234240
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
235241
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateHCIReplicationFabric.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ begin {
213213
List1 = 'Az.Migrate.private\Get-AzMigrateHCIReplicationFabric_List1';
214214
}
215215
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
216-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
216+
$testPlayback = $false
217+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
218+
if ($testPlayback) {
219+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
220+
} else {
221+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
222+
}
217223
}
218224
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
219225
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateHCIServerReplication.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,13 @@ begin {
229229
ListById = 'Az.Migrate.custom\Get-AzMigrateHCIServerReplication';
230230
}
231231
if (('ListByName', 'GetByItemID', 'GetByMachineName', 'GetBySDSID', 'GetByInputObject', 'ListById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
232-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
232+
$testPlayback = $false
233+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
234+
if ($testPlayback) {
235+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
236+
} else {
237+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
238+
}
233239
}
234240
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
235241
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateJob.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,13 @@ begin {
224224
ListById = 'Az.Migrate.custom\Get-AzMigrateJob';
225225
}
226226
if (('ListByName', 'GetById', 'GetByName', 'GetByInputObject', 'ListById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
227-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
227+
$testPlayback = $false
228+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
229+
if ($testPlayback) {
230+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
231+
} else {
232+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
233+
}
228234
}
229235
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
230236
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateProject.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ begin {
129129
Get = 'Az.Migrate.private\Get-AzMigrateProject_Get';
130130
}
131131
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
132-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
132+
$testPlayback = $false
133+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
134+
if ($testPlayback) {
135+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
136+
} else {
137+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
138+
}
133139
}
134140
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
135141
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateReplicationFabric.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ begin {
143143
List = 'Az.Migrate.private\Get-AzMigrateReplicationFabric_List';
144144
}
145145
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
146-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
146+
$testPlayback = $false
147+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
148+
if ($testPlayback) {
149+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
150+
} else {
151+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
152+
}
147153
}
148154
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
149155
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateReplicationPolicy.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ begin {
137137
List = 'Az.Migrate.private\Get-AzMigrateReplicationPolicy_List';
138138
}
139139
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
140-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
140+
$testPlayback = $false
141+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
142+
if ($testPlayback) {
143+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
144+
} else {
145+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
146+
}
141147
}
142148
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
143149
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

src/Migrate/Migrate.Autorest/exports/Get-AzMigrateReplicationProtectionContainer.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ begin {
145145
List1 = 'Az.Migrate.private\Get-AzMigrateReplicationProtectionContainer_List1';
146146
}
147147
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
148-
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
148+
$testPlayback = $false
149+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
150+
if ($testPlayback) {
151+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
152+
} else {
153+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
154+
}
149155
}
150156
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
151157
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)

0 commit comments

Comments
 (0)