Skip to content

Commit

Permalink
Merge pull request #7 from AuxMon/dev
Browse files Browse the repository at this point in the history
Moving the latest code from dev to master.
  • Loading branch information
jagadisk committed Aug 5, 2014
2 parents 4b40951 + 593b26c commit 3eb7c2d
Show file tree
Hide file tree
Showing 1,439 changed files with 301,277 additions and 14,310 deletions.
22 changes: 16 additions & 6 deletions WindowsAzureCommonLibraries.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{868850B4-1073-41A1-ABA8-A3B465880148}"
EndProject
Expand Down Expand Up @@ -56,6 +55,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.WindowsStore", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.WindowsPhone", "src\Common.WindowsPhone\Common.WindowsPhone.csproj", "{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.WindowsPhone81", "src\Common.WindowsPhone81\Common.WindowsPhone81.csproj", "{0B661D48-49D3-4D23-8E51-E528C80C8816}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -138,12 +139,20 @@ Global
{65C1AFA4-9F6A-4105-B28C-AA1B95C17494}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Mixed Platforms.Build.0 = Debug|x86
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Any CPU.Build.0 = Release|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Mixed Platforms.ActiveCfg = Release|x86
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Mixed Platforms.Build.0 = Release|x86
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Release|Any CPU.Build.0 = Release|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0B661D48-49D3-4D23-8E51-E528C80C8816}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -159,6 +168,7 @@ Global
{0645E75E-9C0B-47EE-B5A2-239286E1DED9} = {7C044DD1-F76B-49A7-A8DF-A5DEEE748EBB}
{65C1AFA4-9F6A-4105-B28C-AA1B95C17494} = {868850B4-1073-41A1-ABA8-A3B465880148}
{997EADB9-7FFE-42FF-AA2F-D5F90F39B86D} = {868850B4-1073-41A1-ABA8-A3B465880148}
{0B661D48-49D3-4D23-8E51-E528C80C8816} = {868850B4-1073-41A1-ABA8-A3B465880148}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = WindowsAzureLibraries.vsmdi
Expand Down
219 changes: 215 additions & 4 deletions WindowsAzureManagementLibraries.sln

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libraries.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@
<Message Text="Validating the source tree, binaries, packages and more..." />
<CallTarget Targets="ValidateCorporateCompliance" />

<!--<Message Text="Build the official NuGet packages" />
<CallTarget Targets="BuildPackages" />-->
<Message Text="Build the official NuGet packages" />
<CallTarget Targets="BuildPackages" />

<RemoveDir Directories="binaries\unsigned" Condition="Exists('binaries\unsigned')" ContinueOnError="true" />
<RemoveDir Directories="binaries\net40\unsigned" Condition="Exists('binaries\net40\unsigned')" ContinueOnError="true" />
Expand Down
1 change: 1 addition & 0 deletions packages/repositories.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<repository path="..\src\Common.Tracing.Log4Net\packages.config" />
<repository path="..\src\Common.Tracing.Test\packages.config" />
<repository path="..\src\Common.WindowsPhone\packages.config" />
<repository path="..\src\Common.WindowsPhone81\packages.config" />
<repository path="..\src\Common.WindowsStore\packages.config" />
<repository path="..\src\Common\packages.config" />
<repository path="..\src\ComputeManagement\packages.config" />
Expand Down
143 changes: 143 additions & 0 deletions src/AutomationManagement/AutomationManagement.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<WindowsAzureLibraryProfileSet>portable/net40</WindowsAzureLibraryProfileSet>
<ProjectGuid>{F9515973-831E-4447-924C-1578DF384D0F}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Azure.Management.Automation</RootNamespace>
<AssemblyName>Microsoft.Azure.Management.Automation</AssemblyName>
<OutputType>Library</OutputType>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<Import Project="..\library.props" />
<ItemGroup>
<Compile Include="Customizations\ResponseWithSkipToken.cs" />
<Compile Include="Generated\AutomationManagementClient.cs" />
<Compile Include="Generated\AutomationManagementClientExtensions.cs" />
<Compile Include="Generated\CloudServiceOperations.cs" />
<Compile Include="Generated\CloudServiceOperationsExtensions.cs" />
<Compile Include="Generated\IAutomationManagementClient.cs" />
<Compile Include="Generated\ICloudServiceOperations.cs" />
<Compile Include="Generated\IJobOperations.cs" />
<Compile Include="Generated\IJobStreamOperation.cs" />
<Compile Include="Generated\IRunbookOperations.cs" />
<Compile Include="Generated\IRunbookParameterOperations.cs" />
<Compile Include="Generated\IRunbookVersionOperations.cs" />
<Compile Include="Generated\IScheduleOperations.cs" />
<Compile Include="Generated\JobOperations.cs" />
<Compile Include="Generated\JobOperationsExtensions.cs" />
<Compile Include="Generated\JobStreamOperation.cs" />
<Compile Include="Generated\JobStreamOperationExtensions.cs" />
<Compile Include="Generated\Models\AutomationResource.cs" />
<Compile Include="Generated\Models\AutomationResourceState.cs" />
<Compile Include="Generated\Models\CloudService.cs" />
<Compile Include="Generated\Models\CloudServiceListResponse.cs" />
<Compile Include="Generated\Models\Job.cs" />
<Compile Include="Generated\Models\JobContext.cs" />
<Compile Include="Generated\Models\JobGetResponse.cs" />
<Compile Include="Generated\Models\JobListByRunbookIdParameters.cs" />
<Compile Include="Generated\Models\JobListParameters.cs" />
<Compile Include="Generated\Models\JobListResponse.cs" />
<Compile Include="Generated\Models\JobParameter.cs" />
<Compile Include="Generated\Models\JobStreamItem.cs" />
<Compile Include="Generated\Models\JobStreamListStreamItemsParameters.cs" />
<Compile Include="Generated\Models\JobStreamListStreamItemsResponse.cs" />
<Compile Include="Generated\Models\JobStreamType.cs" />
<Compile Include="Generated\Models\NameValuePair.cs" />
<Compile Include="Generated\Models\OperationResponseWithSkipToken.cs" />
<Compile Include="Generated\Models\ParametersWithSkipToken.cs" />
<Compile Include="Generated\Models\Runbook.cs" />
<Compile Include="Generated\Models\RunbookCreateScheduleLinkParameters.cs" />
<Compile Include="Generated\Models\RunbookCreateScheduleLinkResponse.cs" />
<Compile Include="Generated\Models\RunbookDeleteScheduleLinkParameters.cs" />
<Compile Include="Generated\Models\RunbookEditResponse.cs" />
<Compile Include="Generated\Models\RunbookGetResponse.cs" />
<Compile Include="Generated\Models\RunbookListByScheduleNameParameters.cs" />
<Compile Include="Generated\Models\RunbookListResponse.cs" />
<Compile Include="Generated\Models\RunbookParameter.cs" />
<Compile Include="Generated\Models\RunbookParameterListResponse.cs" />
<Compile Include="Generated\Models\RunbookPublishParameters.cs" />
<Compile Include="Generated\Models\RunbookPublishResponse.cs" />
<Compile Include="Generated\Models\RunbookStartParameters.cs" />
<Compile Include="Generated\Models\RunbookStartResponse.cs" />
<Compile Include="Generated\Models\RunbookUpdateParameters.cs" />
<Compile Include="Generated\Models\RunbookVersion.cs" />
<Compile Include="Generated\Models\RunbookVersionCreateResponse.cs" />
<Compile Include="Generated\Models\RunbookVersionGetResponse.cs" />
<Compile Include="Generated\Models\RunbookVersionGetRunbookDefinitionResponse.cs" />
<Compile Include="Generated\Models\RunbookVersionListLatestByRunbookIdSlotParameters.cs" />
<Compile Include="Generated\Models\RunbookVersionListResponse.cs" />
<Compile Include="Generated\Models\RunbookVersionUpdateRunbookDefinitionParameters.cs" />
<Compile Include="Generated\Models\Schedule.cs" />
<Compile Include="Generated\Models\ScheduleCreateParameters.cs" />
<Compile Include="Generated\Models\ScheduleCreateResponse.cs" />
<Compile Include="Generated\Models\ScheduleGetResponse.cs" />
<Compile Include="Generated\Models\ScheduleListResponse.cs" />
<Compile Include="Generated\Models\ScheduleType.cs" />
<Compile Include="Generated\Models\ScheduleUpdateParameters.cs" />
<Compile Include="Generated\RunbookOperations.cs" />
<Compile Include="Generated\RunbookOperationsExtensions.cs" />
<Compile Include="Generated\RunbookParameterOperations.cs" />
<Compile Include="Generated\RunbookParameterOperationsExtensions.cs" />
<Compile Include="Generated\RunbookVersionOperations.cs" />
<Compile Include="Generated\RunbookVersionOperationsExtensions.cs" />
<Compile Include="Generated\ScheduleOperations.cs" />
<Compile Include="Generated\ScheduleOperationsExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Customizations\AutomationManagementClient.Customization.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="GenerateCode.props">
<SubType>Designer</SubType>
</None>
<None Include="Microsoft.Azure.Management.Automation.nuget.proj" />
<None Include="Microsoft.Azure.Management.Automation.nuspec" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="hydra.xml" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAzure.Common">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Common.1.1.1\lib\portable-net45+sl50+wp80+win\Microsoft.WindowsAzure.Common.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Newtonsoft.Json.5.0.8\lib\portable-net40+sl4+wp7+win8\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition=" '$(WindowsAzureCurrentConfiguration)' == 'portable' " />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(WindowsAzureCurrentConfiguration)' != 'portable' " />
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets') " />
<Import Project="$(SolutionDir)\src\library.targets" />
<Target Name="CopyMicrosoftAzureManagementAutomationSpecification" BeforeTargets="GenerateCodeFromSpecs">
<Copy SourceFiles="..\..\packages\Microsoft.Azure.Management.Automation.Specification.1.0.5246.25858-prerelease\tools\Microsoft.Azure.Management.Automation.Specification.dll" DestinationFolder="." />
</Target>
<Import Project="GenerateCode.props" />
<Import Project="..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets" Condition="Exists('..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets'))" />
</Target>
<Target Name="DoSpecGeneration" DependsOnTargets="RestorePackages" BeforeTargets="BeforeBuild">
<CallTarget Targets="GenerateCodeFromSpecs" Condition="'$(HydraGeneratorImported)' != ''" />
<Error Text="The Hydra code generator package was restored from nuget. Build the project again to do code generation." Condition="Exists('..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets') And '$(HydraGeneratorImported)' == ''" />
<Warning Text="The Hydra code generation packages are not available. Compilation will be done on existing generated sources." Condition="!Exists('..\..\packages\Hydra.Generator.1.0.5290.16039-prerelease\build\Hydra.Generator.targets')" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
//
// Copyright (c) Microsoft. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using System;
using System.Collections.Generic;
using System.Net.Http;

using Microsoft.Azure.Management.Automation;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Common;
using Microsoft.WindowsAzure.Common.Internals;


namespace Microsoft.Azure
{
public static class AutomationManagementDiscoveryExtensions
{
public static AutomationManagementClient CreateCloudServiceManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials)
{
return new AutomationManagementClient(credentials);
}

public static AutomationManagementClient CreateCloudServiceManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials, Uri baseUri)
{
return new AutomationManagementClient(credentials, baseUri);
}

public static AutomationManagementClient CreateCloudServiceManagementClient(this CloudClients clients)
{
return ConfigurationHelper.CreateFromSettings<AutomationManagementClient>(AutomationManagementClient.Create);
}
}
}

namespace Microsoft.Azure.Management.Automation
{
public partial class AutomationManagementClient
{
public static AutomationManagementClient Create(IDictionary<string, object> settings)
{
if (settings == null)
{
throw new ArgumentNullException("settings");
}

SubscriptionCloudCredentials credentials = ConfigurationHelper.GetCredentials<SubscriptionCloudCredentials>(settings);

Uri baseUri = ConfigurationHelper.GetUri(settings, "BaseUri", false);

return baseUri != null ?
new AutomationManagementClient(credentials, baseUri) :
new AutomationManagementClient(credentials);
}

public override AutomationManagementClient WithHandler(DelegatingHandler handler)
{
return (AutomationManagementClient)WithHandler(new AutomationManagementClient(), handler);
}

public static List<T> ContinuationTokenHandler<T>(Func<string, ResponseWithSkipToken<T>> listFunc)
{
var models = new List<T>();
string skipToken = null;
do
{
var result = listFunc.Invoke(skipToken);
models.AddRange(result.AutomationManagementModels);
skipToken = result.SkipToken;
}
while (!string.IsNullOrEmpty(skipToken));
return models;
}
}
}
Loading

0 comments on commit 3eb7c2d

Please sign in to comment.