File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed
src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -398,27 +398,29 @@ function Get-SasUri
398
398
# Get a Location according to resource provider.
399
399
function Get-ResourceProviderLocation
400
400
{
401
- if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer ]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode ]::Playback)
402
- {
403
- $namespace = $provider.Split (" /" )[0 ]
404
- if ($provider.Contains (" /" ))
405
- {
406
- $type = $provider.Substring ($namespace.Length + 1 )
407
- $location = Get-AzureRmResourceProvider - ProviderNamespace $namespace | where {$_.ResourceTypes [0 ].ResourceTypeName -eq $type }
401
+ param ([string ] $provider )
402
+ if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer ]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode ]::Playback)
403
+ {
404
+ $namespace = $provider.Split (" /" )[0 ]
405
+ if ($provider.Contains (" /" ))
406
+ {
407
+ $type = $provider.Substring ($namespace.Length + 1 )
408
+ $location = Get-AzureRmResourceProvider - ProviderNamespace $namespace | where {$_.ResourceTypes [0 ].ResourceTypeName -eq $type }
408
409
409
- if ($location -eq $null )
410
- {
411
- return " West US"
412
- } else
413
- {
414
- return $location.Locations [0 ]
415
- }
416
- }
410
+ if ($location -eq $null )
411
+ {
412
+ return " West US"
413
+ }
414
+ else
415
+ {
416
+ return $location.Locations [0 ]
417
+ }
418
+ }
417
419
418
- return " West US"
419
- }
420
+ return " West US"
421
+ }
420
422
421
- return " WestUS"
423
+ return " WestUS"
422
424
}
423
425
424
426
function Get-ComputeVMLocation
You can’t perform that action at this time.
0 commit comments