Skip to content

Commit

Permalink
Revert "Add support for Traffic selector param in VpnConnection for v…
Browse files Browse the repository at this point in the history
…irtualWan (Azure#12903)"

This reverts commit 34dcf04.
  • Loading branch information
akshatkale authored Feb 22, 2021
1 parent 34dcf04 commit 61238b5
Show file tree
Hide file tree
Showing 18 changed files with 519 additions and 34 deletions.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,7 @@ Reregister
Rescan
reservationorders
resetapikey
resetconnection
resetvpnclientsharedkey
Resolvability
resourcegraph
Expand Down
132 changes: 132 additions & 0 deletions scripts/stostools/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CurrentDir>$(MSBuildThisFileDirectory)</CurrentDir>
<RepoRootRelPath>.\</RepoRootRelPath>
<RepoRootAbspath>$([System.IO.Path]::GetFullPath($(CurrentDir)).Trim('\'))</RepoRootAbspath>
</PropertyGroup>
<PropertyGroup>
<RepoRoot>$(RepoRootAbspath)</RepoRoot>
<RepoSrcDir>$(RepoRoot)\src</RepoSrcDir>
<RepoToolsDir>$(RepoRoot)\tools</RepoToolsDir>
<RepoEngDir>$(RepoRoot)\eng</RepoEngDir>
<RepoNugetFeedDir>$(RepoToolsDir)\LocalNugetFeed</RepoNugetFeedDir>
<RepoDeveloperDir>$(RepoEngDir)\alias</RepoDeveloperDir>
<RepoNugetDir>$(RepoToolsDir)\NugetExe</RepoNugetDir>
<NugPkgSrcDir>$(RepoSrcDir)\NugetToolsPackage</NugPkgSrcDir>
<RepoNugetRestoreDir>$(RepoRoot)\restoredPackages</RepoNugetRestoreDir>
</PropertyGroup>

<PropertyGroup>
<DevMode Condition=" '$(DevMode)' == '' ">false</DevMode>
</PropertyGroup>

<PropertyGroup Label="CI paths">
<RepoCISrcDir>$(RepoSrcDir)\CI</RepoCISrcDir>
<RepoCICommonSrcDir>$(RepoCISrcDir)\CI.Common</RepoCICommonSrcDir>
<RepoCIBuildTaskDir>$(RepoCISrcDir)\CI.BuildTasks</RepoCIBuildTaskDir>
<CINugPkgSrcDir>$(NugPkgSrcDir)\CI.Tools.Package</CINugPkgSrcDir>
<CIBuildOutputDir>$(CINugPkgSrcDir)\build\tasks</CIBuildOutputDir>
<CINugPkgPublish_NetStd20Dir>$(CIBuildOutputDir)\netstandard2.0</CINugPkgPublish_NetStd20Dir>
</PropertyGroup>

<PropertyGroup Label="SToS paths">
<RepoSToSSrcDir>$(RepoSrcDir)\SwaggerToSdk</RepoSToSSrcDir>
<RepoSToSCommonSrcDir>$(RepoSToSSrcDir)\Common\SToS.Common</RepoSToSCommonSrcDir>
<RepoSToSBuildTaskSrcDir>$(RepoSToSSrcDir)\BuildTasks\SToS.BuildTasks</RepoSToSBuildTaskSrcDir>
<SToSNugPkgSrcRootDir>$(NugPkgSrcDir)\SwaggerToSdk.Tools.Package</SToSNugPkgSrcRootDir>
<SToSNugPkgSrcDir>$(SToSNugPkgSrcRootDir)\build</SToSNugPkgSrcDir>
<SToSNugPkgSdkDir>$(SToSNugPkgSrcDir)\Sdk</SToSNugPkgSdkDir>
<SToSBuildOutputDir>$(SToSNugPkgSrcDir)\tasks</SToSBuildOutputDir>
<SToSNugPkgPublish_NetStd20Dir>$(SToSBuildOutputDir)\netstandard2.0</SToSNugPkgPublish_NetStd20Dir>
<SToSNugPkgPublish_Net461Dir>$(SToSBuildOutputDir)\net461</SToSNugPkgPublish_Net461Dir>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
</PropertyGroup>

<!--
MSBuildRuntimeType can have 'Core', 'Full' and 'Mono' as three possible values
https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties?view=vs-2017
-->
<PropertyGroup>
<DotNetRuntimeContext>$(MSBuildRuntimeType)</DotNetRuntimeContext>
<FxVersionTasksToUse Condition=" '$(DotNetRuntimeContext)' == 'Core' ">netstandard2.0</FxVersionTasksToUse>
<FxVersionTasksToUse Condition=" '$(FxVersionTasksToUse)' == '' AND '$(DotNetRuntimeContext)' != 'Core' ">net461</FxVersionTasksToUse>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core'">
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>

<ItemGroup>
<TestDataProjects Include="$(RepoCISrcDir)\CI.BuildTasks\Tests\TestDataProject\*.csproj" />

<CITestProjects Include="$(RepoCISrcDir)\CI.BuildTasks\Tests\**\*.csproj" Exclude="@(TestDataProjects)" />
<SToSTestProjects Include="$(RepoSToSSrcDir)\BuildTasks\Tests\*.csproj;$(RepoSToSSrcDir)\Common\Tests\*.csproj" />
<SToSProjects Include="$(RepoSToSBuildTaskSrcDir)\*.csproj;$(RepoSToSCommonSrcDir)\*.csproj" />
<SToSNugPkgProjects Include="$(SToSNugPkgSrcDir)\*.csproj" />

<NugetPkgProjects Include="@(SToSNugPkgProjects)" />
<ProjectsToBuild Include="@(SToSProjects);@(SToSTestProjects)" />
<ProjectsToPublish Include="@(SToSProjects)" />
</ItemGroup>

<!--
Detect CI env using available env variables
https://<Jenkins server url>/systemInfo
https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
-->
<PropertyGroup>
<IsJenkinsCI Condition=" '$(JENKINS_HOME)' != '' ">true</IsJenkinsCI>
<IsTravisCI Condition=" '$(Travis)' != '' ">true</IsTravisCI>
<IsCIEnvironment Condition=" '$(IsJenkinsCI)' == 'true' OR '$(IsTravisCI)' == 'true' ">true</IsCIEnvironment>
<IsCIEnvironment Condition=" '$(IsCIEnvironment)' == '' ">false</IsCIEnvironment>
</PropertyGroup>

<!--
===========================================================================================
Developer Settings
On non-windows machine, user can setup an environment variable that will point to their developer settings props file.
The name of the file should be named as currentUser.props (case sensitive)
On windows machine, if the environment variable is not set, we will attempt to use the windows current user env. variable
Env. variables
LocalDevUserBootstrapDirPath == will point to the directory from where currentuser.props should be imported
DevMode == flags if you want to be in dev mode, which is basically avoids restoring nuget package and directly loads the build environment
Default file that will be loaded == currentUser.props (if available)
===========================================================================================
-->
<PropertyGroup Condition=" '$(DevMode)' == 'true' ">
<DefaultCurrentUserPropsFileName>currentUser.props</DefaultCurrentUserPropsFileName>
<DeveloperCurrentUserPropFilePath>$(LocalDevUserBootstrapDirPath)\$(DefaultCurrentUserPropsFileName)</DeveloperCurrentUserPropFilePath>
<DeveloperCurrentUserPropFilePath Condition=" !Exists($(DeveloperCurrentUserPropFilePath))">$(RepoDeveloperDir)\$(UserName)\$(DefaultCurrentUserPropsFileName)</DeveloperCurrentUserPropFilePath>
</PropertyGroup>

<Import Condition="Exists($(DeveloperCurrentUserPropFilePath)) AND '$(IsCIEnvironment)' != 'true' AND '$(DevMode)' == 'true' " Project="$(DeveloperCurrentUserPropFilePath)" />
<PropertyGroup Condition=" '$(IsCIEnvironment)' != 'true' AND '$(DevMode)' == 'true' ">
<LocalDevUser Condition=" '$(LocalDevUser)' == '' ">$(UserName)</LocalDevUser>
<DefaultCurrentuserTargetsFileName>$(LocalDevUser).bootStrap.targets</DefaultCurrentuserTargetsFileName>
<DeveloperCurrentUserPropFilePath>$(RepoDeveloperDir)\$(LocalDevUser)\$(DefaultCurrentUserPropsFileName)</DeveloperCurrentUserPropFilePath>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsCIEnvironment)' != 'true' AND '$(DevMode)' == 'true' ">
<LocalDevUserTargetsDir Condition="Exists('$(RepoDeveloperDir)\$(LocalDevUser)')">$(RepoDeveloperDir)\$(LocalDevUser)</LocalDevUserTargetsDir>
<LocalDevUserBootstrapPropsFile>$(LocalDevUserTargetsDir)\$(DefaultCurrentuserTargetsFileName)</LocalDevUserBootstrapPropsFile>
<CurrentUserPropsFilePath>$(LocalDevUserBootstrapDirPath)\currentUser.props</CurrentUserPropsFilePath>

<DevMode_SDK_SToSPropsFile>$(SToSNugPkgSdkDir)\SToS.props</DevMode_SDK_SToSPropsFile>
</PropertyGroup>
<Import Condition="Exists($(LocalDevUserBootstrapPropsFile)) AND '$(IsCIEnvironment)' != 'true' AND '$(DevMode)' == 'true' " Project="$(LocalDevUserBootstrapPropsFile)" />

<!-- DO NOT MAKE ANY CHANGES BELOW -->
<PropertyGroup>
<IsJenkinsCI Condition=" '$(JENKINS_HOME)' != '' ">true</IsJenkinsCI>
<IsTravisCI Condition=" '$(Travis)' != '' ">true</IsTravisCI>
<IsCIEnvironment Condition=" '$(IsJenkinsCI)' == 'true' OR '$(IsTravisCI)' == 'true' ">true</IsCIEnvironment>
<IsCIEnvironment Condition=" '$(IsCIEnvironment)' == '' ">false</IsCIEnvironment>
<DevMode Condition=" '$(IsCIEnvironment)' == 'true' ">false</DevMode>
</PropertyGroup>
</Project>
31 changes: 31 additions & 0 deletions scripts/stostools/LaunchSToS.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@echo OFF

set StartupProj=%1
set PrNumber=%2
set LastGithubCommitId=%3
set GitHubUrl=%4
set TriggerComment=%5
set DebugMode=%6
set LogVerbosity=%7

if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
set InstallDir=%%i
)

CALL "%InstallDir%\Common7\Tools\VsDevCmd.bat"

echo StartupProj: %StartupProj%
echo Pr#: %PrNumber%
echo Last Commit Id: %LastGithubCommitId%
echo GitHub Url: %GitHubUrl%
echo Trigger Comment: %TriggerComment%
echo DebugMode: %DebugMode%
echo Log Verbosity: %LogVerbosity%

dotnet msbuild %startupProj% /t:StartNetSdkCodeGeneration /v:%LogVerbosity% /p:githubprnumber=%PrNumber% /p:githubcommitid=%LastGithubCommitId% /p:giturl=%GitHubUrl% /p:DebugMode=%DebugMode% /p:triggercomment=%TriggerComment%

REM dotnet msbuild stos.proj /t:StartNetSdkCodeGeneration /v:N /p:githubprnumber=63 /p:githubcommitid=b5ee45302838515adc14857ed45c44ed99a1e517 /p:giturl=https://github.com/Azure/AzSwaggerSpecsTestClone /p:DebugMode=false /p:triggercomment=startbuild
REM LaunchSToS.bat stos.proj 63 b5ee45302838515adc14857ed45c44ed99a1e517 https://github.com/Azure/AzSwaggerSpecsTestClone startbuild false D
REM stostools\LaunchSToS.bat SToS.proj %ghprbPullId% %ghprbActualCommit% %GIT_URL% %ghprbCommentBody% false n
21 changes: 21 additions & 0 deletions scripts/stostools/nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NugetOfficialV3" value="https://api.nuget.org/v3/index.json" />
<add key="Local" value="tools/LocalNugetFeed" />
<add key="stosprodfeed" value="\\aaptfile01\ADXSDK\NetSDK\SToS\Prod" />
</packageSources>

<config>
<add key="globalPackagesFolder" value=".\restoredPackages\" />
<add key="RestorePackagesPath" value=".\restoredPackages\" />
</config>

<packageRestore>
<!-- Allow NuGet to download missing packages -->
<add key="enabled" value="True" />

<!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" />
</packageRestore>
</configuration>
43 changes: 43 additions & 0 deletions scripts/stostools/stos.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Import Condition=" '$(DevMode)' != 'true' " Project="SToS.props" Sdk="Microsoft.Internal.SwaggerToSdk.Tools" Version="0.9.0" />
<Import Condition=" '$(DevMode)' == 'true' AND Exists('$(DevMode_SDK_SToSPropsFile)') " Project="$(DevMode_SDK_SToSPropsFile)" />

<PropertyGroup>
<DotNetRuntimeContext>$(MSBuildRuntimeType)</DotNetRuntimeContext>
<FxVersionTasksToUse Condition=" '$(DotNetRuntimeContext)' == 'Core' ">netstandard2.0</FxVersionTasksToUse>
<FxVersionTasksToUse Condition=" '$(FxVersionTasksToUse)' == '' AND '$(DotNetRuntimeContext)' == 'Full' ">net461</FxVersionTasksToUse>
</PropertyGroup>
<Target Name="Fn">
<Message Text="FxVersionTasksToUse is ......... $(FxVersionTasksToUse)" />
</Target>

<Target Name="StartNetSdkCodeGeneration">
<Message Text="Commencing code generation" Importance = "High"/>
<StartNetSdkCodeGeneration
GitHubPRNumber="$(githubprnumber)"
GitHubCommitId="$(githubcommitid)"
RestSpecRepositoryUrl ="$(giturl)"
TriggerComment="$(triggercomment)"
DebugMode="$(debugmode)"
>
<Output TaskParameter="NetSdkPRMetadataRowId" PropertyName="NetSdkPRMetadataRowId" />
</StartNetSdkCodeGeneration>
</Target>

<Target Name="HandleClosedOrMergedRestApiPrs">
<Message Text="Handling closed or merged PRs" Importance = "High"/>
<HandleClosedOrMergedRestApiPrs
RepositoryUrl="$(RepositoryUrl)"
>
</HandleClosedOrMergedRestApiPrs>
</Target>

<Target Name="KV">
<GetKVSecrets>
<Output TaskParameter="Email" PropertyName="EmailAddress" />
</GetKVSecrets>

<Message Text="Email is $(EmailAddress)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2432,11 +2432,11 @@
"readOnly": true,
"description": "The IP address allocated by the gateway to which dns requests can be sent."
},
"virtualNetworkExtendedLocationResourceId": {
"vNetExtendedLocationResourceId": {
"type": "string",
"description": "MAS FIJI customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet."
},
"extendedLocation": {
"virtualNetworkExtendedLocation": {
"description": "The extended location of type local virtual network gateway.",
"$ref": "./network.json#/definitions/ExtendedLocation"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@
"isEnabled": true,
"retentionDays": 100,
"logAnalyticsResources": {
"workspaceIds": [
"workspaces": [
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
"region": "westus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
}
},
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
"region": "eastus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
}
}
],
"defaultWorkspaceId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@
"isEnabled": true,
"retentionDays": 100,
"logAnalyticsResources": {
"workspaceIds": [
"workspaces": [
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
"region": "westus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
}
},
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
"region": "eastus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
}
}
],
"defaultWorkspaceId": {
Expand Down Expand Up @@ -121,12 +127,18 @@
"isEnabled": true,
"retentionDays": 100,
"logAnalyticsResources": {
"workspaceIds": [
"workspaces": [
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
"region": "westus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
}
},
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
"region": "eastus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
}
}
],
"defaultWorkspaceId": {
Expand Down Expand Up @@ -219,12 +231,18 @@
"isEnabled": true,
"retentionDays": 100,
"logAnalyticsResources": {
"workspaceIds": [
"workspaces": [
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
"region": "westus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
}
},
{
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
"region": "eastus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
}
}
],
"defaultWorkspaceId": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"api-version": "2020-08-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"virtualNetworkGatewayConnectionName": "conn1"
},
"responses": {
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"enableInternetSecurity": false,
"ingressBytesTransferred": 0,
"egressBytesTransferred": 0,
"trafficSelectorPolicies": [],
"vpnLinkConnections": [
{
"name": "Connection-Link1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"enableInternetSecurity": false,
"ingressBytesTransferred": 0,
"egressBytesTransferred": 0,
"trafficSelectorPolicies": [],
"vpnLinkConnections": [
{
"name": "Connection-Link1",
Expand Down
Loading

0 comments on commit 61238b5

Please sign in to comment.