Skip to content

Commit 79a33dd

Browse files
authored
Merge pull request #476 from donovanmms/bgpnat
removing bgpnat parameters. // Validated on 1809.
2 parents 3673113 + e7842f2 commit 79a33dd

File tree

1 file changed

+12
-77
lines changed

1 file changed

+12
-77
lines changed

Deployment/asdk-installer.ps1

Lines changed: 12 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The Azure Stack Development Kit installer UI script is based on PowerShell and t
2929

3030
#region Text
3131
$Text_Generic = @{}
32-
$Text_Generic.Version = "1.0.12"
32+
$Text_Generic.Version = "1.0.13"
3333
$Text_Generic.Password_NotMatch = "Passwords do not match"
3434
$Text_Generic.Regex_Fqdn = "<yourtenant.onmicrosoft.com> can only contain A-Z, a-z, 0-9, dots and a hyphen"
3535
$Text_Generic.Regex_Computername = "Computername must be 15 characters or less and can only contain A-Z, a-z, 0-9 and a hyphen"
@@ -65,7 +65,7 @@ $Text_Install.Mode_RightContent = "Select the Operating System to override the d
6565
$Text_Install.Reboot_Title = "Reboot"
6666
$Text_Install.NetInterface_Title = "Select Network Interface for the Azure Stack host"
6767
$Text_Install.NetInterface_Warning = "Only one adapter can be used for the Azure Stack Development Kit host. Select the adapter used for the deployment. All other adapters will be disabled by the installer. Ensure you have network connectivity to the selected network adapter before proceeding."
68-
$Text_Install.NetConfig_Title = "Network Configuration for BGPNAT01"
68+
$Text_Install.NetConfig_Title = "Network Configuration"
6969
$Text_Install.Credentials_Title = "Specify Identity Provider and Credentials"
7070
$Text_Install.Summary_Title = "Summary"
7171
$Text_Install.Summary_Content = "The following script will be used for deploying the Development Kit"
@@ -1189,17 +1189,11 @@ $Xaml = @'
11891189
<!--#region NetConfig-->
11901190
<StackPanel x:Name="Control_NetConfig_Stp" HorizontalAlignment="Left" Visibility="Collapsed">
11911191
<StackPanel Height="320">
1192-
<RadioButton x:Name="Control_NetConfig_Rbt_DHCP" GroupName="NetworkConfig" VerticalContentAlignment="Center" Cursor="Hand" Margin="0,0,0,5" IsChecked="True" >
1193-
<TextBlock FontSize="14" FontFamily="Segoe UI" Text="DHCP" Width="100" HorizontalAlignment="Left" Padding="5,0,0,0"/>
1194-
</RadioButton>
1195-
<RadioButton x:Name="Control_NetConfig_Rbt_Static" GroupName="NetworkConfig" VerticalContentAlignment="Center" Cursor="Hand" Margin="0,0,0,10" >
1196-
<TextBlock FontSize="14" FontFamily="Segoe UI" Text="Static" Width="100" HorizontalAlignment="Left" Padding="5,0,0,0"/>
1197-
</RadioButton>
1198-
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
1192+
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" x:Name="Control_NetConfig_Stp_IpAddress">
11991193
<TextBlock x:Name="Control_NetConfig_Tbl_IpAddress" FontSize="14" FontFamily="Segoe UI" Text="Ip Address:" Width="120" HorizontalAlignment="Left"/>
12001194
<TextBox x:Name="Control_NetConfig_Tbx_IpAddress" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Width="430" IsEnabled="False" AutomationProperties.LabeledBy="{Binding ElementName=Control_NetConfig_Tbl_IpAddress}"/>
12011195
</StackPanel>
1202-
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
1196+
<StackPanel Orientation="Horizontal" Margin="0,0,0,10" x:Name="Control_NetConfig_Stp_Gateway">
12031197
<TextBlock x:Name="Control_NetConfig_Tbl_Gateway" FontSize="14" FontFamily="Segoe UI" Text="Gateway:" Width="120" HorizontalAlignment="Left"/>
12041198
<TextBox x:Name="Control_NetConfig_Tbx_Gateway" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Width="430" IsEnabled="False" AutomationProperties.LabeledBy="{Binding ElementName=Control_NetConfig_Tbl_Gateway}"/>
12051199
</StackPanel>
@@ -1213,10 +1207,6 @@ $Xaml = @'
12131207
</StackPanel>
12141208
<StackPanel x:Name="Control_NetConfig_Stp_Optional">
12151209
<TextBlock FontSize="16" FontFamily="Segoe UI" Text="Optional Configuration" Margin="0,0,0,10"/>
1216-
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
1217-
<TextBlock x:Name="Control_NetConfig_Tbl_VlanID" FontSize="14" FontFamily="Segoe UI" Text="VLAN ID:" Width="120" HorizontalAlignment="Left"/>
1218-
<TextBox x:Name="Control_NetConfig_Tbx_VlanID" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Width="430" AutomationProperties.LabeledBy="{Binding ElementName=Control_NetConfig_Tbl_VlanID}" />
1219-
</StackPanel>
12201210
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
12211211
<TextBlock x:Name="Control_NetConfig_Tbl_DnsForwarder" FontSize="14" FontFamily="Segoe UI" Text="DNS Forwarder IP:" Width="120" HorizontalAlignment="Left"/>
12221212
<TextBox x:Name="Control_NetConfig_Tbx_DnsForwarder" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Width="430" AutomationProperties.LabeledBy="{Binding ElementName=Control_NetConfig_Tbl_DnsForwarder}"/>
@@ -2007,19 +1997,12 @@ Function F_VerifyFields_NetConfig {
20071997
Else {$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $false}
20081998
}
20091999
else {
2010-
if (
2011-
(
2012-
$syncHash.Control_NetConfig_Rbt_DHCP.IsChecked -eq $true -and
2013-
($syncHash.Control_NetConfig_Tbx_TimeServer.Text -and ($syncHash.Control_NetConfig_Tbx_TimeServer.BorderBrush.color -ne "#FFFF0000"))
2014-
) -or
2015-
(
2016-
$syncHash.Control_NetConfig_Rbt_Static.IsChecked -eq $true -and
2017-
($syncHash.Control_NetConfig_Tbx_IpAddress.Text -and ($syncHash.Control_NetConfig_Tbx_IpAddress.BorderBrush.color -ne "#FFFF0000")) -and
2018-
($syncHash.Control_NetConfig_Tbx_Gateway.Text -and ($syncHash.Control_NetConfig_Tbx_Gateway.BorderBrush.color -ne "#FFFF0000")) -and
2019-
($syncHash.Control_NetConfig_Tbx_TimeServer.Text -and ($syncHash.Control_NetConfig_Tbx_TimeServer.BorderBrush.color -ne "#FFFF0000"))
2020-
)
2021-
) {$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $true}
2022-
Else {$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $false}
2000+
if (($syncHash.Control_NetConfig_Tbx_TimeServer.Text -and ($syncHash.Control_NetConfig_Tbx_TimeServer.BorderBrush.color -ne "#FFFF0000"))) {
2001+
$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $true
2002+
}
2003+
Else {
2004+
$syncHash.Control_NetConfig_Btn_Next.IsEnabled = $false
2005+
}
20232006
}
20242007
}
20252008

@@ -2137,21 +2120,6 @@ Function F_Summary {
21372120
$InstallScript += " -UseADFS"
21382121
}
21392122

2140-
If ($synchash.Control_NetConfig_Rbt_Static.IsChecked) {
2141-
$NetworkID = F_GetNetworkID
2142-
$InstallScript += " -NatIPv4Subnet "
2143-
$InstallScript += $NetworkID
2144-
$InstallScript += " -NatIPv4Address "
2145-
$InstallScript += $synchash.Control_NetConfig_Tbx_IpAddress.Text.Split("/")[0]
2146-
$InstallScript += " -NatIPv4DefaultGateway "
2147-
$InstallScript += $synchash.Control_NetConfig_Tbx_Gateway.Text
2148-
}
2149-
2150-
If ($synchash.Control_NetConfig_Tbx_VlanID.Text.Length -gt 0) {
2151-
$InstallScript += " -PublicVlanId "
2152-
$InstallScript += $synchash.Control_NetConfig_Tbx_VlanID.Text
2153-
}
2154-
21552123
If ($synchash.Control_NetConfig_Tbx_DnsForwarder.Text.Length -gt 0) {
21562124
$InstallScript += " -DNSForwarder "
21572125
$InstallScript += $synchash.Control_NetConfig_Tbx_DnsForwarder.Text
@@ -2224,17 +2192,6 @@ Function F_Install {
22242192
' -UseADFS' | Add-Content $filepath -NoNewline
22252193
}
22262194

2227-
If ($synchash.Control_NetConfig_Rbt_Static.IsChecked) {
2228-
$NetworkID = F_GetNetworkID
2229-
' -NatIPv4Subnet "' + $NetworkID + '"' | Add-Content $filepath -NoNewline
2230-
' -NatIPv4Address "' + $synchash.Control_NetConfig_Tbx_IpAddress.Text.Split("/")[0] + '"' | Add-Content $filepath -NoNewline
2231-
' -NatIPv4DefaultGateway "' + $synchash.Control_NetConfig_Tbx_Gateway.Text + '"' | Add-Content $filepath -NoNewline
2232-
}
2233-
2234-
If ($synchash.Control_NetConfig_Tbx_VlanID.Text.Length -gt 0) {
2235-
' -PublicVlanId "' + $synchash.Control_NetConfig_Tbx_VlanID.Text + '"' | Add-Content $filepath -NoNewline
2236-
}
2237-
22382195
If ($synchash.Control_NetConfig_Tbx_DnsForwarder.Text.Length -gt 0) {
22392196
' -DNSForwarder "' + $synchash.Control_NetConfig_Tbx_DnsForwarder.Text + '"' | Add-Content $filepath -NoNewline
22402197
}
@@ -2567,15 +2524,15 @@ $syncHash.Control_NetInterface_Btn_Next.Add_Click({
25672524
If ($Script:Initialized -eq "SafeOS") {
25682525
$syncHash.Control_NetConfig_Stp.Visibility = "Visible"
25692526
$syncHash.Control_Header_Tbl_Title.Text = $Text_SafeOS.NetConfig_Title
2570-
$SyncHash.Control_NetConfig_Rbt_Static.Visibility="Collapsed"
2571-
$SyncHash.Control_NetConfig_Rbt_DHCP.Visibility="Collapsed"
25722527
$SyncHash.Control_NetConfig_Stp_Optional.Visibility="Collapsed"
25732528
F_CopyNicProperties
25742529
}
25752530
Else {
25762531
$syncHash.Control_NetConfig_Stp.Visibility = "Visible"
25772532
$syncHash.Control_Header_Tbl_Title.Text = $Text_Install.NetConfig_Title
25782533
$syncHash.Control_NetConfig_Stp_DNS.Visibility="Collapsed"
2534+
$syncHash.Control_NetConfig_Stp_IpAddress.Visibility="Collapsed"
2535+
$syncHash.Control_NetConfig_Stp_Gateway.Visibility="Collapsed"
25792536
}
25802537
})
25812538

@@ -2621,28 +2578,6 @@ $syncHash.Control_NetConfig_Btn_Next.Add_Click({
26212578
}
26222579
})
26232580

2624-
$syncHash.Control_NetConfig_Rbt_DHCP.Add_Click({
2625-
$syncHash.Control_NetConfig_Tbx_IpAddress.IsEnabled = $false
2626-
$syncHash.Control_NetConfig_Tbx_IpAddress.Clear()
2627-
$syncHash.Control_NetConfig_Tbx_Gateway.IsEnabled = $false
2628-
$syncHash.Control_NetConfig_Tbx_Gateway.Clear()
2629-
$syncHash.Control_NetConfig_Tbx_DNS.IsEnabled = $false
2630-
$syncHash.Control_NetConfig_Tbx_DNS.Clear()
2631-
F_VerifyFields_NetConfig
2632-
})
2633-
2634-
$syncHash.Control_NetConfig_Rbt_Static.Add_Click({
2635-
$syncHash.Control_NetConfig_Tbx_IpAddress.IsEnabled = $true
2636-
$syncHash.Control_NetConfig_Tbx_Gateway.IsEnabled = $true
2637-
$syncHash.Control_NetConfig_Tbx_DNS.IsEnabled = $true
2638-
2639-
if ($script:Initialized -eq "SafeOS"){
2640-
F_CopyNicProperties
2641-
}
2642-
2643-
F_VerifyFields_NetConfig
2644-
})
2645-
26462581
$syncHash.Control_NetConfig_Tbx_IpAddress.Add_TextChanged({
26472582
F_Regex -field 'Control_NetConfig_Tbx_IpAddress' -field_value $syncHash.Control_NetConfig_Tbx_IpAddress.Text -regex $Regex.IpAddressCidr -message $Text_Generic.Regex_IpAddressCidr
26482583
F_VerifyFields_NetConfig

0 commit comments

Comments
 (0)