Skip to content

Commit bf33468

Browse files
committed
Merge pull request #114 from huangpf/dev
Dev
2 parents db5b827 + 1d42e41 commit bf33468

File tree

288 files changed

+21752
-18447
lines changed

Some content is hidden

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

288 files changed

+21752
-18447
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5757
</Reference>
5858
<Reference Include="Microsoft.Azure.Common.Authentication">
59-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
59+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6060
<Private>True</Private>
6161
</Reference>
6262
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -122,9 +122,9 @@
122122
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
123123
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
124124
</Reference>
125-
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
125+
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
126126
<SpecificVersion>False</SpecificVersion>
127-
<HintPath>..\..\packages\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
127+
<HintPath>..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
128128
</Reference>
129129
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
130130
<SpecificVersion>False</SpecificVersion>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.6.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
@@ -22,5 +22,5 @@
2222
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2323
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2424
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
25-
<package id="WindowsAzure.Storage" version="6.0.0" targetFramework="net45" />
25+
<package id="WindowsAzure.Storage" version="6.1.0" targetFramework="net45" />
2626
</packages>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</Reference>
6565
<Reference Include="Microsoft.Azure.Common.Authentication">
6666
<SpecificVersion>False</SpecificVersion>
67-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
67+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6868
</Reference>
6969
<Reference Include="Microsoft.Azure.Common.NetFramework">
7070
<SpecificVersion>False</SpecificVersion>

src/Common/Commands.Common/ProfileClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@ private AzureSubscription MergeSubscriptionProperties(AzureSubscription subscrip
841841
Id = subscription1.Id,
842842
Name = subscription1.Name,
843843
Environment = subscription1.Environment,
844+
State = (subscription1.State != null &&
845+
subscription1.State.Equals(subscription2.State, StringComparison.OrdinalIgnoreCase)) ?
846+
subscription1.State: null,
844847
Account = subscription1.Account ?? subscription2.Account
845848
};
846849

src/Common/Commands.Common/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="Microsoft.ApplicationInsights" version="1.1.1-beta" targetFramework="net45" />
55
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-preview" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Common.Authentication" version="1.6.1-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />

src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</Reference>
4848
<Reference Include="Microsoft.Azure.Common.Authentication">
4949
<SpecificVersion>False</SpecificVersion>
50-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
50+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
5151
</Reference>
5252
<Reference Include="Microsoft.Azure.Common.NetFramework">
5353
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>

src/Common/Commands.ScenarioTests.Common/Mocks/MockCertificateAuthenticationFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@ public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext
8484
{
8585
throw new System.NotImplementedException();
8686
}
87+
88+
89+
public Rest.ServiceClientCredentials GetServiceClientCredentials(AzureContext context, AzureEnvironment.Endpoint targetEndpoint)
90+
{
91+
throw new System.NotImplementedException();
92+
}
8793
}
8894
}

src/Common/Commands.ScenarioTests.Common/Mocks/MockTokenAuthenticationFactory.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,10 @@ public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext
110110
{
111111
return new TokenCloudCredentials(context.Subscription.Id.ToString(),Token.AccessToken);
112112
}
113+
114+
public ServiceClientCredentials GetServiceClientCredentials(AzureContext context, AzureEnvironment.Endpoint targetEndpoint)
115+
{
116+
throw new NotImplementedException();
117+
}
113118
}
114119
}

src/Common/Commands.ScenarioTests.Common/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.6.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Test.Framework" version="1.0.5799.28345-prerelease" targetFramework="net45" />

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@
8585
<Reference Include="Microsoft.WindowsAzure.Configuration">
8686
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
8787
</Reference>
88-
<Reference Include="Microsoft.WindowsAzure.Storage">
89-
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
88+
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
89+
<SpecificVersion>False</SpecificVersion>
90+
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
9091
</Reference>
9192
<Reference Include="Newtonsoft.Json">
9293
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.0" targetFramework="net45" />
1414
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
1515
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
16-
<package id="WindowsAzure.Storage" version="6.0.0" targetFramework="net45" />
16+
<package id="WindowsAzure.Storage" version="6.1.0" targetFramework="net45" />
1717
<package id="xunit.runner.visualstudio" version="2.1.0-beta4-build1109" targetFramework="net45" />
1818
</packages>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@
6464
<Reference Include="Microsoft.WindowsAzure.Configuration">
6565
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
6666
</Reference>
67-
<Reference Include="Microsoft.WindowsAzure.Storage">
68-
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
67+
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
68+
<SpecificVersion>False</SpecificVersion>
69+
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
6970
</Reference>
7071
<Reference Include="Newtonsoft.Json">
7172
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.0" targetFramework="net45" />
88
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
99
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
10-
<package id="WindowsAzure.Storage" version="6.0.0" targetFramework="net45" />
10+
<package id="WindowsAzure.Storage" version="6.1.0" targetFramework="net45" />
1111
<package id="xunit.runner.visualstudio" version="2.1.0-beta4-build1109" targetFramework="net45" />
1212
</packages>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
</Reference>
6060
<Reference Include="Microsoft.Azure.Common.Authentication">
6161
<SpecificVersion>False</SpecificVersion>
62-
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.5.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
62+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6363
</Reference>
6464
<Reference Include="Microsoft.Azure.Common.NetFramework">
6565
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
@@ -123,11 +123,11 @@
123123
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
124124
</Reference>
125125
<Reference Include="Microsoft.WindowsAzure.Storage">
126-
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
126+
<HintPath>..\..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
127127
</Reference>
128-
<Reference Include="Microsoft.WindowsAzure.Storage.DataMovement, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
128+
<Reference Include="Microsoft.WindowsAzure.Storage.DataMovement, Version=0.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
129129
<SpecificVersion>False</SpecificVersion>
130-
<HintPath>..\..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll</HintPath>
130+
<HintPath>..\..\..\packages\Microsoft.Azure.Storage.DataMovement.0.2.0\lib\net45\Microsoft.WindowsAzure.Storage.DataMovement.dll</HintPath>
131131
</Reference>
132132
<Reference Include="Newtonsoft.Json">
133133
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -188,7 +188,7 @@
188188
<Compile Include="Common\CommunicationExceptionUtilTest.cs" />
189189
<Compile Include="Common\FileNamingGenerator.cs" />
190190
<Compile Include="Common\IStorageManagement.cs" />
191-
<Compile Include="Common\MockTransferJobRunner.cs" />
191+
<Compile Include="Common\MockTransferManager.cs" />
192192
<Compile Include="Common\MockupException.cs" />
193193
<Compile Include="Common\NameUtilTest.cs" />
194194
<Compile Include="Common\CmdletOperationContextTest.cs" />
@@ -281,4 +281,4 @@
281281
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
282282
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
283283
<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')" />
284-
</Project>
284+
</Project>

src/Common/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs renamed to src/Common/Storage/Commands.Storage.Test/Common/MockTransferManager.cs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,34 @@
1717
using System.Threading.Tasks;
1818
using Microsoft.VisualStudio.TestTools.UnitTesting;
1919
using Microsoft.WindowsAzure.Commands.Storage.Common;
20+
using Microsoft.WindowsAzure.Storage.Blob;
2021
using Microsoft.WindowsAzure.Storage.DataMovement;
22+
using Microsoft.WindowsAzure.Storage.File;
2123

2224
namespace Microsoft.WindowsAzure.Management.Storage.Test.Common
2325
{
24-
internal sealed class MockTransferJobRunner : ITransferJobRunner
26+
abstract class MockTransferManager : ITransferManager
2527
{
26-
private Func<TransferJob, Task> runnerValidation;
28+
private AssertFailedException assertException = null;
2729

28-
private AssertFailedException assertException;
30+
public virtual Task DownloadAsync(CloudFile sourceFile, string destPath, DownloadOptions options, TransferContext context, CancellationToken cancellationToken)
31+
{
32+
throw new NotImplementedException();
33+
}
2934

30-
public MockTransferJobRunner(Func<TransferJob, Task> runnerValidation)
35+
public virtual Task DownloadAsync(CloudBlob sourceBlob, string destPath, DownloadOptions options, TransferContext context, CancellationToken cancellationToken)
3136
{
32-
this.runnerValidation = runnerValidation;
37+
throw new NotImplementedException();
3338
}
3439

35-
public Task RunTransferJob(TransferJob job, Action<double, double> progressReport, CancellationToken cancellationToken)
40+
public virtual Task UploadAsync(string sourcePath, CloudFile destFile, UploadOptions options, TransferContext context, CancellationToken cancellationToken)
3641
{
37-
try
38-
{
39-
return runnerValidation(job);
40-
}
41-
catch (AssertFailedException e)
42-
{
43-
this.assertException = e;
44-
throw new MockupException("AssertFailed");
45-
}
42+
throw new NotImplementedException();
43+
}
44+
45+
public virtual Task UploadAsync(string sourcePath, CloudBlob destBlob, UploadOptions options, TransferContext context, CancellationToken cancellationToken)
46+
{
47+
throw new NotImplementedException();
4648
}
4749

4850
public void ThrowAssertExceptionIfAvailable()
@@ -52,9 +54,5 @@ public void ThrowAssertExceptionIfAvailable()
5254
throw this.assertException;
5355
}
5456
}
55-
56-
public void Dispose()
57-
{
58-
}
5957
}
6058
}

0 commit comments

Comments
 (0)