Skip to content

Commit 41954d2

Browse files
[skip ci] Archive d05eb42 (Azure#27662)
1 parent 06723fb commit 41954d2

Some content is hidden

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

49 files changed

+1698
-602
lines changed

generated/ElasticSan/ElasticSan.Autorest/Az.ElasticSan.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>ElasticSan</PsModuleName>
44
<PsRootModuleName>ElasticSan</PsRootModuleName>
5+
<PsModuleFolder>ElasticSan.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - ElasticSan")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
23-
24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("5ded21ac-a5c9-469a-8e63-03cd96ad2f1d")]
27-
[assembly: AssemblyVersion("1.2.1")]
28-
[assembly: AssemblyFileVersion("1.2.1")]
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ElasticSan")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.1")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

generated/ElasticSan/ElasticSan.Autorest/exports/Add-AzElasticSanVolumeGroupNetworkRule.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ begin {
156156
$PSBoundParameters['OutBuffer'] = 1
157157
}
158158
$parameterSet = $PSCmdlet.ParameterSetName
159+
160+
$testPlayback = $false
161+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
162+
163+
$context = Get-AzContext
164+
if (-not $context -and -not $testPlayback) {
165+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
166+
exit
167+
}
159168

160169
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
161170
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -179,8 +188,6 @@ begin {
179188
NetworkRuleResourceId = 'Az.ElasticSan.custom\Add-AzElasticSanVolumeGroupNetworkRule';
180189
}
181190
if (('NetworkRuleObject', 'NetworkRuleResourceId') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
182-
$testPlayback = $false
183-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
184191
if ($testPlayback) {
185192
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
186193
} else {
@@ -194,6 +201,9 @@ begin {
194201
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
195202
}
196203
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
204+
if ($wrappedCmd -eq $null) {
205+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
206+
}
197207
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
198208
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
199209
$steppablePipeline.Begin($PSCmdlet)

generated/ElasticSan/ElasticSan.Autorest/exports/Get-AzElasticSan.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ begin {
137137
$PSBoundParameters['OutBuffer'] = 1
138138
}
139139
$parameterSet = $PSCmdlet.ParameterSetName
140+
141+
$testPlayback = $false
142+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
143+
144+
$context = Get-AzContext
145+
if (-not $context -and -not $testPlayback) {
146+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
147+
exit
148+
}
140149

141150
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
142151
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -162,8 +171,6 @@ begin {
162171
List1 = 'Az.ElasticSan.private\Get-AzElasticSan_List1';
163172
}
164173
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
165-
$testPlayback = $false
166-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
167174
if ($testPlayback) {
168175
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
169176
} else {
@@ -177,6 +184,9 @@ begin {
177184
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
178185
}
179186
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
187+
if ($wrappedCmd -eq $null) {
188+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
189+
}
180190
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
181191
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
182192
$steppablePipeline.Begin($PSCmdlet)

generated/ElasticSan/ElasticSan.Autorest/exports/Get-AzElasticSanSkuList.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ begin {
100100
$PSBoundParameters['OutBuffer'] = 1
101101
}
102102
$parameterSet = $PSCmdlet.ParameterSetName
103+
104+
$testPlayback = $false
105+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
106+
107+
$context = Get-AzContext
108+
if (-not $context -and -not $testPlayback) {
109+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
110+
exit
111+
}
103112

104113
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
105114
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -122,8 +131,6 @@ begin {
122131
List = 'Az.ElasticSan.private\Get-AzElasticSanSkuList_List';
123132
}
124133
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
125-
$testPlayback = $false
126-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
127134
if ($testPlayback) {
128135
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
129136
} else {
@@ -137,6 +144,9 @@ begin {
137144
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
138145
}
139146
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
147+
if ($wrappedCmd -eq $null) {
148+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
149+
}
140150
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
141151
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
142152
$steppablePipeline.Begin($PSCmdlet)

generated/ElasticSan/ElasticSan.Autorest/exports/Get-AzElasticSanVolume.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ begin {
183183
$PSBoundParameters['OutBuffer'] = 1
184184
}
185185
$parameterSet = $PSCmdlet.ParameterSetName
186+
187+
$testPlayback = $false
188+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
189+
190+
$context = Get-AzContext
191+
if (-not $context -and -not $testPlayback) {
192+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
193+
exit
194+
}
186195

187196
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
188197
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -209,8 +218,6 @@ begin {
209218
List = 'Az.ElasticSan.private\Get-AzElasticSanVolume_List';
210219
}
211220
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
212-
$testPlayback = $false
213-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
214221
if ($testPlayback) {
215222
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
216223
} else {
@@ -224,6 +231,9 @@ begin {
224231
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
225232
}
226233
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
234+
if ($wrappedCmd -eq $null) {
235+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
236+
}
227237
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
228238
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
229239
$steppablePipeline.Begin($PSCmdlet)

generated/ElasticSan/ElasticSan.Autorest/exports/Get-AzElasticSanVolumeGroup.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ begin {
158158
$PSBoundParameters['OutBuffer'] = 1
159159
}
160160
$parameterSet = $PSCmdlet.ParameterSetName
161+
162+
$testPlayback = $false
163+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
164+
165+
$context = Get-AzContext
166+
if (-not $context -and -not $testPlayback) {
167+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
168+
exit
169+
}
161170

162171
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
163172
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -183,8 +192,6 @@ begin {
183192
List = 'Az.ElasticSan.private\Get-AzElasticSanVolumeGroup_List';
184193
}
185194
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
186-
$testPlayback = $false
187-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
188195
if ($testPlayback) {
189196
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
190197
} else {
@@ -198,6 +205,9 @@ begin {
198205
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
199206
}
200207
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
208+
if ($wrappedCmd -eq $null) {
209+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
210+
}
201211
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
202212
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
203213
$steppablePipeline.Begin($PSCmdlet)

generated/ElasticSan/ElasticSan.Autorest/exports/Get-AzElasticSanVolumeSnapshot.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ begin {
190190
$PSBoundParameters['OutBuffer'] = 1
191191
}
192192
$parameterSet = $PSCmdlet.ParameterSetName
193+
194+
$testPlayback = $false
195+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
196+
197+
$context = Get-AzContext
198+
if (-not $context -and -not $testPlayback) {
199+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
200+
exit
201+
}
193202

194203
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
195204
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -216,8 +225,6 @@ begin {
216225
List = 'Az.ElasticSan.private\Get-AzElasticSanVolumeSnapshot_List';
217226
}
218227
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
219-
$testPlayback = $false
220-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
221228
if ($testPlayback) {
222229
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
223230
} else {
@@ -231,6 +238,9 @@ begin {
231238
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
232239
}
233240
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
241+
if ($wrappedCmd -eq $null) {
242+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
243+
}
234244
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
235245
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
236246
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)