From c9bccdf21bdd461e85b03bf98a5683180fdd3ec9 Mon Sep 17 00:00:00 2001 From: Kieran Jacobsen Date: Mon, 11 Mar 2019 18:30:24 +1100 Subject: [PATCH] Adding support for new Chile and Brazil regions --- .../Get-MicrosoftAzureDatacenterIPRange.ps1 | 12 +++++++++--- tests/AzurePublicIPAddresses.Tests.ps1 | 19 ++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/functions/Get-MicrosoftAzureDatacenterIPRange.ps1 b/functions/Get-MicrosoftAzureDatacenterIPRange.ps1 index cd57726..e532025 100644 --- a/functions/Get-MicrosoftAzureDatacenterIPRange.ps1 +++ b/functions/Get-MicrosoftAzureDatacenterIPRange.ps1 @@ -92,9 +92,12 @@ function Get-MicrosoftAzureDatacenterIPRange 'West India', 'West US 2', 'West US', - 'North Europe 2', #Placeholder until azure region name is confirmed - 'East Europe', #Placeholder until azure region name is confirmed - 'Korea South 2' #Placeholder until azure region name is confirmed + 'North Europe 2', #Placeholder until azure region name is confirmed + 'East Europe', #Placeholder until azure region name is confirmed + 'Korea South 2', #Placeholder until azure region name is confirmed + 'Brazil Southeast', #Placeholder until azure region name is confirmed + 'Brazil Northeast', #Placeholder until azure region name is confirmed + 'Chile Central' #Placeholder until azure region name is confirmed )] [ValidateNotNullOrEmpty()] [String[]] @@ -178,6 +181,9 @@ function Get-MicrosoftAzureDatacenterIPRange 'North Europe 2' = 'europenorth2' #Placeholder until azure region name is confirmed 'East Europe' = 'europeeast' #Placeholder until azure region name is confirmed 'Korea South 2' = 'koreas2' #Placeholder until azure region name is confirmed + 'Brazil Southeast' = 'brazilse' #Placeholder until azure region name is confirmed + 'Brazil Northeast' = 'brazilne' #Placeholder until azure region name is confirmed + 'Chile Central' = 'chilec' #Placeholder until azure region name is confirmed } } diff --git a/tests/AzurePublicIPAddresses.Tests.ps1 b/tests/AzurePublicIPAddresses.Tests.ps1 index 829d99e..1561852 100644 --- a/tests/AzurePublicIPAddresses.Tests.ps1 +++ b/tests/AzurePublicIPAddresses.Tests.ps1 @@ -1,6 +1,5 @@ Import-Module $PSScriptRoot\..\AzurePublicIPAddresses.psm1 -Force - Describe 'AzurePublicIPAddresses' { Context 'Get-MicrosoftAzureDatacenterIPRange Parameter validation' { It 'throws an error for an invalid region is specified' { @@ -226,6 +225,24 @@ Describe 'AzurePublicIPAddresses' { } #> + <# As there are no IP addresses, so disable these tests. + It 'returns output for Korea South 2' { + Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Brazil Southeast' | Should not be $null + } + #> + + <# As there are no IP addresses, so disable these tests. + It 'returns output for Korea South 2' { + Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Brazil Northeast' | Should not be $null + } + #> + + <# As there are no IP addresses, so disable these tests. + It 'returns output for Korea South 2' { + Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Chile Central' | Should not be $null + } + #> + It 'accepts an Azure region from the pipeline' { {'West US 2' | Get-MicrosoftAzureDatacenterIPRange} | Should not be $null }