Skip to content

Commit

Permalink
KV dataplane Migration (#3103)
Browse files Browse the repository at this point in the history
* KV dataplane Migration

* fixing scoping

* updates to kv migration and property updates
  • Loading branch information
shahabhijeet authored Apr 19, 2017
1 parent 1186981 commit 4352356
Show file tree
Hide file tree
Showing 46 changed files with 538 additions and 863 deletions.
35 changes: 2 additions & 33 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="tools\buildTargets\common.targets" />




<!-- <Target Name="BuildSdk" DependsOnTargets="$(BuildTraversedProjectsDependsOn)" /> -->

<!--
<Target Name="Clean" DependsOnTargets="$(CleanTraversedProjectsDependsOn)" />
<Target Name="Build" DependsOnTargets="$(BuildTraversedProjectsDependsOn)" />
<Target Name="PublishLocal">
<Exec Command="$(NuGetCommand) push &quot;$(PackageOutputDir)\%(SdkNuGetPackage.Identity).%(SdkNuGetPackage.PackageVersion).nupkg&quot; $(NuGetKey)$(ActualSource)"
IgnoreExitCode="true"
Condition=" '%(SdkNuGetPackage.Publish)' != 'false' " />
</Target>
-->
</Project>

<!--
<Import Project="$([MSBuild]::GetPathOfFileAbove('reference.props'))" />
<Set this true only if you want to test the code sign workflow locally>
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<FxTargetList>portable;net40;net45</FxTargetList>
<FxTargetList Condition=" '$(Scope)' == 'authentication' ">net45</FxTargetList>
<ZipExeFolder>$(LibraryToolsFolder)\7-Zip</ZipExeFolder>
<ZipExe>$(ZipExeFolder)\7z.exe</ZipExe>
<NuGetCommand>&quot;$(LibraryToolsFolder)\nuget.exe&quot;</NuGetCommand>
-->
<Import Project="tools\buildTargets\common.targets" />
</Project>
54 changes: 34 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,52 @@ that take advantage of scalable cloud computing resources.

### Target Frameworks:

* .NET Framework 4.5
* Netstandard 1.5, based on the NetCore framework
* .NET Framework 4.5.2
* Netstandard 1.4, based on the NetCore framework

### Prerequisites:
Install .Net CoreCLR Preview 2 using [these steps](https://download.microsoft.com/download/A/3/8/A38489F3-9777-41DD-83F8-2CBDFAB2520C/DotNetCore.1.0.0-VS2015Tools.Preview2.exe).
Install VS 2017 (Professional or higher) + VS2017 Update 1
(https://www.visualstudio.com/).
To know more about VS 2017 and it's project system (https://docs.microsoft.com/en-us/visualstudio/#pivot=workloads&panel=windows)

###Directory Restructure
Directory structure has been simplified and consolidated in fewer directories
All Management and Data plane SDKs are now under
src\SDKs
e.g.
src\SDKs\AnalysisService
src\SDKs\Compute

### To build:

####Full Build

1. Navigate to repository root directory
2. Invoke **msbuild** build.proj
1. Open VS 2017 command prompt
2. Navigate to repository root directory
3. Invoke **msbuild** build.proj /t:FullBuild
FullBuild will Build, RunTests, Package
Local Published nugets can be found under < root >\PublishedNugets
TestResult can be found under < root >\TestResults
##### *Full Build* without any scope will build all SDK's run all tests.

####Build one nuget package
In order to build one package and run it's test

1. **msbuild** build.proj /t:build;package /p:scope=ResourceManagement\Compute

> msbuild build.proj /t:FullBuild /p:scope=SDKs\Compute /p:NugetPackageName=Microsoft.Azure.Management.Compute
####Using Visual Studio:



1. Open any solution, say, "src\ResourceManagement\Compute\Compute.sln"
1. Open any solution, say, "SDKs\Compute\Compute.sln"
2. Invoke "build" command.


### To run the tests:

Using Visual Studio:

- Build.
- "Test Explorer" window will get populated with tests. Go select and invoke.
- "Test Explorer" window will get populated with tests. Select test and Run/Debug.

Using the command line:
msbuild .\build.proj /t:"Build;Runtests" /p:Scope=SDKs\Compute
or
dotnet test SDKs\Compute\Compute.Tests\Compute.Tests.csproj

- Refer to the "To build" section to get the command window set up.
- Invoke "Test" target from "Build.proj". Likely, you need to build test project first, so put in "build" target as well.
Expand All @@ -48,17 +60,19 @@ Using the command line:

### Project Structure

In "src\ResourceManagement", you will find projects for services that have already been implemented
In "SDKs\< RPName >", you will find projects for services that have already been implemented

- Each SDK project needs to target .NET 4.5.2 and .NET Standard 1.4
- Test project needs to target NetCoreApp 1.1
- Each service contains a project for their generated/customized code
- The folder 'Generated' contains the generated code
- The folder 'Customizations' contains additions to the generated code - this can include additions to the generated partial classes, or additional classes that augment the SDK or call the generated code
- The file 'generate.cmd', used to generate library code for the given service, can also be found in this project
- Services also contain a project for their tests

### Branches: AutoRest vs. master
### Branches: vs17Dev vs. master

The **AutoRest** branch contains the code generated from AutoRest tool.
The **vs17Dev** branch contains the code generated from AutoRest tool.

The **master** branch contains the code generated from Hydra/Hyak.
- Hydra/Hyak is Azure's legacy code generation technology.
Expand Down Expand Up @@ -116,10 +130,10 @@ Once all of the above steps are met, the following process will be followed:

### Adding Tests

Regarding the test project, one thing that's important is to name the test project by adding a ".Tests" suffix to the folder name for the folder containing your project. For example, the test project for "Compute\Microsoft.Azure.Management.Compute" should be named 'Compute.Tests'
Regarding the test project, one thing that's important is to name the test project by adding a ".Tests" suffix to the folder name for the folder containing your project. For example, the test project for "Compute\Management.Compute" should be named 'Compute.Tests'

- This is for improving CI performance so to find exactly one copy of your test assembly.
- Also, due to test dependencies, the test project should build both .NET 4.5 and NETStandard 1.5. For example, check out "src\ResourceManagement\Resource\Resource.tests"
- Also, due to test dependencies, the test project should build both .NET 4.5.2 and NETStandard 1.4. For example, check out "src\SDKs\Resource\Resource.tests"

### Issues with Generated Code

Expand Down
8 changes: 4 additions & 4 deletions build.proj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project DefaultTargets="FullBuild" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Import Project="Directory.Build.targets" />
<Import Project="Directory.Build.props" />
<Import Project="test.props" />
<Import Project="AzSdk.props" />
<Import Project="AzSdk.props" />

<Target Name="Clean" DependsOnTargets="$(CleanTraversedProjectsDependsOn)" />
<Target Name="Restore" DependsOnTargets="$(RestoreTraversedProjectsDependsOn)" />
<Target Name="Build" DependsOnTargets="$(BuildTraversedProjectsDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="FullBuild" DependsOnTargets="Build;RunTests;Package;Publish" />
<Target Name="FullBuild" DependsOnTargets="Clean;Build;RunTests;Package" />
<Target Name="RunTests" DependsOnTargets="$(RunTestProjectsDependsOn)" />
<Import Project="Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.reference.props'))" />

<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.reference.props'))" />
<PropertyGroup>
<Description>Microsoft Azure Billing Management Library</Description>
<VersionPrefix>1.1.0-preview</VersionPrefix>
<Authors>Microsoft</Authors>
<!--<TargetFrameworks>net45;netstandard1.5;netstandard1.1</TargetFrameworks>
<DelaySign>true</DelaySign>-->
<AssemblyName>Microsoft.Azure.Management.Billing</AssemblyName>
<!--<AssemblyOriginatorKeyFile>../../../../tools/MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>-->
<PackageId>Microsoft.Azure.Management.Billing</PackageId>
<PackageTags>Microsoft Azure Billing management;Billing;Billing management;REST HTTP client;windowsazureofficial;netcore451511</PackageTags>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
<PackageProjectUrl>https://github.com/Azure/azure-sdk-for-net</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/Microsoft/dotnet/master/LICENSE</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.5' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.5' ">1.6.1</NetStandardImplicitPackageVersion>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.1' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.1' ">1.6.1</NetStandardImplicitPackageVersion>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand All @@ -45,34 +23,5 @@
<PackageReference Include="System.Net.Http" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
</ItemGroup>

<!--
<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.5,4.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.5,3.0.0)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="1.1.0" />
<PackageReference Include="System.Diagnostics.Tools" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<DefineConstants>$(DefineConstants);PORTABLE</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="1.1.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
</ItemGroup>
-->
</ItemGroup>
</Project>
7 changes: 0 additions & 7 deletions src/SDKs/KeyVault/NuGet.Config

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.props'))" />
<PropertyGroup>
<PackageId>Microsoft.Azure.KeyVault.Core</PackageId>
<Description>Microsoft Azure Key Vault Core Class Library</Description>
<AssemblyTitle>Microsoft Azure Key Vault Core</AssemblyTitle>
<AssemblyName>Microsoft.Azure.KeyVault.Core</AssemblyName>
<VersionPrefix>2.0.4</VersionPrefix>
<PackageTags>Microsoft Azure key vault core</PackageTags>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
</PropertyGroup>
</Project>
<!--
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD15</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<PackageReference Include="System.Runtime" Version="4.1.0" />
<PackageReference Include="System.Threading.Tasks" Version="4.0.11" />
</ItemGroup>
</Project>
-->

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4352356

Please sign in to comment.