@@ -113,7 +113,6 @@ function Test-NetworkInterfaceCRUD
113
113
try
114
114
{
115
115
# Create the resource group
116
- $resourceGroup = New-AzureRmResourceGroup - Name $rgname - Location $rglocation - Tags @ { testtag = " testval" }
117
116
118
117
# Create the Virtual Network
119
118
$subnet = New-AzureRmVirtualNetworkSubnetConfig - Name $subnetName - AddressPrefix 10.0 .1.0 / 24
@@ -811,22 +810,21 @@ Tests creating new simple public networkinterface.
811
810
#>
812
811
function Test-NetworkInterfaceWithAcceleratedNetworking
813
812
{
814
- # Setup
813
+ # Setup
815
814
$rgname = Get-ResourceGroupName
816
815
$vnetName = Get-ResourceName
817
816
$subnetName = Get-ResourceName
818
817
$publicIpName = Get-ResourceName
819
818
$nicName = Get-ResourceName
820
819
$domainNameLabel = Get-ResourceName
821
- $rglocation = " WestCentralUS "
820
+ $rglocation = " westcentralus "
822
821
$resourceTypeParent = " Microsoft.Network/networkInterfaces"
823
- $location = " WestCentralUS "
822
+ $location = " westcentralus "
824
823
825
824
try
826
825
{
827
826
# Create the resource group
828
827
$resourceGroup = New-AzureRmResourceGroup - Name $rgname - Location $rglocation - Tags @ { testtag = " testval" }
829
-
830
828
# Create the Virtual Network
831
829
$subnet = New-AzureRmVirtualNetworkSubnetConfig - Name $subnetName - AddressPrefix 10.0 .1.0 / 24
832
830
$vnet = New-AzureRmvirtualNetwork - Name $vnetName - ResourceGroupName $rgname - Location $location - AddressPrefix 10.0 .0.0 / 16 - Subnet $subnet
@@ -835,11 +833,9 @@ function Test-NetworkInterfaceWithAcceleratedNetworking
835
833
$publicip = New-AzureRmPublicIpAddress - ResourceGroupName $rgname - name $publicIpName - location $location - AllocationMethod Dynamic - DomainNameLabel $domainNameLabel
836
834
837
835
# Create NetworkInterface
838
- $actualNic = New-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname - Location $location - Subnet $vnet.Subnets [0 ] - PublicIpAddress $publicip - AcceleratedNetworkingEnabled
836
+ $actualNic = New-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname - Location $location - Subnet $vnet.Subnets [0 ] - PublicIpAddress $publicip - EnableAcceleratedNetworking
839
837
$expectedNic = Get-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname
840
838
841
- $setNic = $actualNic | Set-AzureRmNetworkInterface
842
-
843
839
Assert-AreEqual $expectedNic.ResourceGroupName $actualNic.ResourceGroupName
844
840
Assert-AreEqual $expectedNic.Name $actualNic.Name
845
841
Assert-AreEqual $expectedNic.Location $actualNic.Location
@@ -849,8 +845,9 @@ function Test-NetworkInterfaceWithAcceleratedNetworking
849
845
Assert-AreEqual $expectedNic.IpConfigurations [0 ].PublicIpAddress.Id $actualNic.IpConfigurations [0 ].PublicIpAddress.Id
850
846
Assert-AreEqual $expectedNic.IpConfigurations [0 ].Subnet.Id $actualNic.IpConfigurations [0 ].Subnet.Id
851
847
Assert-NotNull $expectedNic.IpConfigurations [0 ].PrivateIpAddress
848
+ Assert-AreEqual $expectedNic.EnableAcceleratedNetworking $true
852
849
Assert-AreEqual " Dynamic" $expectedNic.IpConfigurations [0 ].PrivateIpAllocationMethod
853
- Assert-AreEqual $expectedNic .AcceleratedNetworkingEnabled $true
850
+
854
851
855
852
# Check publicIp address reference
856
853
$publicip = Get-AzureRmPublicIpAddress - ResourceGroupName $rgname - name $publicIpName
0 commit comments