Skip to content

Commit c415006

Browse files
committed
Merge pull request #173 from ogail/profile
Merge profile branch into dev
2 parents 72b667d + bdef7d5 commit c415006

File tree

407 files changed

+2354
-4125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+2354
-4125
lines changed

build.proj

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,12 @@
9090
<!-- Delete NuGet cache-->
9191
<Delete Files="@(NuGetCache)" />
9292

93-
<Delete Files="$(NuGetRestoreConfigFile)" />
94-
<WriteLinesToFile File="$(NuGetRestoreConfigFile)" Lines="&lt;configuration&gt;&lt;/configuration&gt;" Overwrite="true" Encoding="UTF-8" />
95-
<!-- Create config for user name and password for private feed access -->
96-
<Exec Command="$(NuGetCommand) sources add -Name AzureSdkInternal -Source &quot;https://www.myget.org/F/azure-sdk-internal/&quot; $(NuGetRestoreConfigSwitch)" />
97-
<CallTarget Targets="ForceRestorePackagesFromPrivateFeed"/>
9893
<!-- Restore packages -->
99-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\AzurePowerShell.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false" />
100-
<!-- delete config file, don't want to leave passwords hanging around on the build server file system -->
101-
<Delete Files="$(NuGetRestoreConfigFile)" />
94+
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\AzurePowerShell.sln" ContinueOnError="false" />
95+
10296
<!--Restore the xunit runner needed to run unit tests-->
10397
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\packages.config -PackagesDirectory $(MSBuildProjectDirectory)\packages" />
10498
</Target>
105-
106-
<Target Name="ForceRestorePackagesFromPrivateFeed" Condition="'$(PRIVATE_FEED_PASSWORD)' != ''">
107-
<Exec Command="$(NuGetCommand) sources add -Name Hydra -Source &quot;$(PRIVATE_FEED_URL)&quot; $(NuGetRestoreConfigSwitch)" />
108-
<Exec Command="$(NuGetCommand) sources Update -Name Hydra -UserName $(PRIVATE_FEED_USER_NAME) -Password &quot;$(PRIVATE_FEED_PASSWORD)&quot; $(NuGetRestoreConfigSwitch)"
109-
EchoOff="true" />
110-
</Target>
11199

112100
<!-- Build all flavors of the Cmdlets -->
113101
<Target Name="BuildCmdlets" DependsOnTargets="ForceRestorePackages">

setup/azurecmdfiles.wxi

Lines changed: 88 additions & 164 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
<ItemGroup>
5151
<Reference Include="Hyak.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5252
<SpecificVersion>False</SpecificVersion>
53-
<HintPath>..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
53+
<HintPath>..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
5454
</Reference>
5555
<Reference Include="Microsoft.Azure.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5656
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
57+
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5858
</Reference>
59-
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
59+
<Reference Include="Microsoft.Azure.Common.Authentication">
6060
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
61+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.8-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
65+
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
6666
</Reference>
6767
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6868
<SpecificVersion>False</SpecificVersion>
@@ -77,12 +77,12 @@
7777
<Reference Include="Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7878
<HintPath>..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
7979
</Reference>
80-
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
8181
<SpecificVersion>False</SpecificVersion>
82-
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
82+
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.12.111071459\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
8383
</Reference>
8484
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms">
85-
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
85+
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.12.111071459\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8686
</Reference>
8787
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
8888
<SpecificVersion>False</SpecificVersion>

src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
using System;
1616
using System.Collections.Generic;
1717
using Microsoft.WindowsAzure.Commands.Common;
18-
using Microsoft.Azure.Common.Extensions.Models;
18+
using Microsoft.Azure.Common.Authentication.Models;
1919
using Microsoft.WindowsAzure.Commands.Common.Storage;
2020
using Microsoft.WindowsAzure.Management.Storage;
2121
using Microsoft.WindowsAzure.Storage;
22-
using Microsoft.Azure.Common.Extensions;
22+
using Microsoft.Azure.Common.Authentication;
2323

2424
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
2525
{
2626
public static class WindowsAzureSubscriptionExtensions
2727
{
2828
private static Dictionary<Guid, CloudStorageAccount> storageAccountCache = new Dictionary<Guid,CloudStorageAccount>();
2929

30-
public static CloudStorageAccount GetCloudStorageAccount(this AzureSubscription subscription)
30+
public static CloudStorageAccount GetCloudStorageAccount(this AzureSubscription subscription, AzureProfile profile)
3131
{
3232
if (subscription == null)
3333
{
3434
return null;
3535
}
3636

37-
using (var storageClient = AzureSession.ClientFactory.CreateClient<StorageManagementClient>(subscription, AzureEnvironment.Endpoint.ServiceManagement))
37+
using (var storageClient = AzureSession.ClientFactory.CreateClient<StorageManagementClient>(profile, subscription, AzureEnvironment.Endpoint.ServiceManagement))
3838
{
3939
return StorageUtilities.GenerateCloudStorageAccount(
4040
storageClient, subscription.GetProperty(AzureSubscription.Property.StorageAccount));

src/Common/Commands.Common.Storage/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Hyak.Common" version="1.0.1" targetFramework="net45" />
4-
<package id="Microsoft.Azure.Common" version="2.0.1" targetFramework="net45" />
3+
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
4+
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
6-
<package id="Microsoft.Azure.Common.Extensions" version="0.14.0-preview" targetFramework="net45" />
6+
<package id="Microsoft.Azure.Common.Authentication" version="1.0.8-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
99
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1010
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1111
<package id="Microsoft.Data.Edm" version="5.6.0" targetFramework="net45" />
1212
<package id="Microsoft.Data.OData" version="5.6.0" targetFramework="net45" />
1313
<package id="Microsoft.Data.Services.Client" version="5.6.0" targetFramework="net45" />
14-
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.11.10918.1222" targetFramework="net45" />
14+
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.12.111071459" targetFramework="net45" />
1515
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1616
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />

src/Common/Commands.Common.Test/Commands.Common.Test.csproj

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@
4949
</PropertyGroup>
5050
<ItemGroup>
5151
<Reference Include="Hyak.Common">
52-
<HintPath>..\..\packages\Hyak.Common.1.0.1\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
52+
<HintPath>..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Common">
55-
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
55+
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5656
</Reference>
57-
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57+
<Reference Include="Microsoft.Azure.Common.Authentication">
5858
<SpecificVersion>False</SpecificVersion>
59-
<HintPath>..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
59+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.8-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6060
</Reference>
6161
<Reference Include="Microsoft.Azure.Common.NetFramework">
62-
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
62+
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
6363
</Reference>
6464
<Reference Include="Microsoft.Azure.ResourceManager">
6565
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
6666
</Reference>
6767
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6868
<SpecificVersion>False</SpecificVersion>
69-
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5486.28526-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
69+
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5513.27084-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
7070
</Reference>
7171
<Reference Include="Microsoft.Data.Edm, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7272
<HintPath>..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
@@ -77,13 +77,13 @@
7777
<Reference Include="Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7878
<HintPath>..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
7979
</Reference>
80-
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8181
<SpecificVersion>False</SpecificVersion>
82-
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
82+
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.12.111071459\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
8383
</Reference>
84-
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8585
<SpecificVersion>False</SpecificVersion>
86-
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
86+
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.12.111071459\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8787
</Reference>
8888
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
8989
<SpecificVersion>False</SpecificVersion>
@@ -156,7 +156,6 @@
156156
<ItemGroup>
157157
<Compile Include="Common\AuthenticationFactoryTests.cs" />
158158
<Compile Include="Common\ProfileCmdltsTests.cs" />
159-
<Compile Include="Common\ProfileClientTests.cs" />
160159
<Compile Include="Common\ServicePrincipalStoreTests.cs" />
161160
<Compile Include="Common\GeneralUtilitiesTests.cs" />
162161
<Compile Include="Common\Data.cs" />

src/Common/Commands.Common.Test/Common/AuthenticationFactoryTests.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
using System.Collections.Generic;
1616
using Xunit;
1717
using System;
18-
using Microsoft.Azure.Common.Extensions.Factories;
18+
using Microsoft.Azure.Common.Authentication.Factories;
1919
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
20-
using Microsoft.Azure.Common.Extensions.Authentication;
21-
using Microsoft.Azure.Common.Extensions.Models;
20+
using Microsoft.Azure.Common.Authentication;
21+
using Microsoft.Azure.Common.Authentication.Models;
2222

2323
namespace Microsoft.WindowsAzure.Commands.Common.Test.Common
2424
{
@@ -34,10 +34,16 @@ public void VerifySubscriptionTokenCacheRemove()
3434

3535
var subscriptionId = Guid.NewGuid();
3636

37-
var credential = authFactory.GetSubscriptionCloudCredentials(new AzureContext
38-
{
39-
Environment = AzureEnvironment.PublicEnvironments["AzureCloud"],
40-
Account = new AzureAccount
37+
var credential = authFactory.GetSubscriptionCloudCredentials(new AzureContext(
38+
new AzureSubscription
39+
{
40+
Id = subscriptionId,
41+
Properties = new Dictionary<AzureSubscription.Property, string>
42+
{
43+
{ AzureSubscription.Property.Tenants, "123"}
44+
}
45+
},
46+
new AzureAccount
4147
{
4248
Id = "testuser",
4349
Type = AzureAccount.AccountType.User,
@@ -46,16 +52,9 @@ public void VerifySubscriptionTokenCacheRemove()
4652
{ AzureAccount.Property.Tenants, "123" }
4753
}
4854
},
49-
Subscription = new AzureSubscription
50-
{
51-
Id = subscriptionId,
52-
Properties = new Dictionary<AzureSubscription.Property, string>
53-
{
54-
{ AzureSubscription.Property.Tenants, "123"}
55-
}
56-
}
55+
AzureEnvironment.PublicEnvironments["AzureCloud"]
5756

58-
});
57+
));
5958

6059
Assert.True(credential is AccessTokenCredential);
6160
Assert.Equal(subscriptionId, new Guid(((AccessTokenCredential)credential).SubscriptionId));

src/Common/Commands.Common.Test/Common/ConversionUtilitiesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
using System.Collections.Generic;
1616
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1717
using Xunit;
18-
using Microsoft.Azure.Common.Extensions;
18+
using Microsoft.Azure.Common.Authentication;
1919

2020
namespace Microsoft.WindowsAzure.Commands.Common.Test
2121
{

src/Common/Commands.Common.Test/Common/Data.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
2121
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2222
using Microsoft.WindowsAzure.Commands.Common;
23-
using Microsoft.Azure.Common.Extensions;
23+
using Microsoft.Azure.Common.Authentication;
2424

2525
namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common
2626
{
@@ -66,7 +66,7 @@ public static class Data
6666

6767
static Data()
6868
{
69-
AzureAppDir = Path.Combine(Directory.GetCurrentDirectory(), Resources.AzureDirectoryName);
69+
AzureAppDir = AzureSession.ProfileDirectory;
7070
AzureSdkAppDir = Path.Combine(Directory.GetCurrentDirectory(), "Microsoft Azure PowerShell");
7171
TestResultDirectory = FileUtilities.GetAssemblyDirectory();
7272

src/Common/Commands.Common.Test/Common/GeneralTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.IO;
1717
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1818
using Xunit;
19-
using Microsoft.Azure.Common.Extensions;
19+
using Microsoft.Azure.Common.Authentication;
2020

2121
namespace Microsoft.WindowsAzure.Commands.Common.Test.Common
2222
{

src/Common/Commands.Common.Test/Common/JsonUtilitiesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
using Newtonsoft.Json;
2020
using Newtonsoft.Json.Linq;
2121
using Xunit;
22-
using Microsoft.Azure.Common.Extensions;
22+
using Microsoft.Azure.Common.Authentication;
2323

2424
namespace Microsoft.WindowsAzure.Commands.Common.Test.Common
2525
{

0 commit comments

Comments
 (0)