Skip to content

Commit 23ce2df

Browse files
committed
Merge pull request #805 from ogail/AutoRest
Merge upstream/dev
2 parents 4057766 + 7bb5b37 commit 23ce2df

File tree

252 files changed

+48642
-41418
lines changed

Some content is hidden

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

252 files changed

+48642
-41418
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 2015.09.03 version 0.9.8
2+
13
## 2015.08.17 version 0.9.7
24
* Azure Profile cmdlets
35
* New-AzureProfile

setup/azurecmdfiles.wxi

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Common.Authentication.Properties;
1615
using System;
1716
using System.IO;
1817
using System.Net.Http.Headers;
18+
using Microsoft.Azure.Common.Authentication.Properties;
1919

2020
namespace Microsoft.WindowsAzure.Commands.Common
2121
{

src/Common/Commands.Common/AzurePSCmdlet.cs renamed to src/Common/Commands.Common/AzureSMCmdlet.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
1516
using System.Collections.Concurrent;
17+
using System.Diagnostics;
18+
using System.IO;
19+
using System.Management.Automation;
1620
using Microsoft.Azure.Common.Authentication;
1721
using Microsoft.Azure.Common.Authentication.Models;
1822
using Microsoft.IdentityModel.Clients.ActiveDirectory;
1923
using Microsoft.WindowsAzure.Commands.Common;
2024
using Microsoft.WindowsAzure.Commands.Common.Properties;
21-
using System;
22-
using System.Diagnostics;
23-
using System.IO;
24-
using System.Management.Automation;
2525

2626
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
2727
{
28-
public abstract class AzurePSCmdlet : PSCmdlet
28+
public abstract class AzureSMCmdlet : PSCmdlet
2929
{
3030
private readonly ConcurrentQueue<string> _debugMessages = new ConcurrentQueue<string>();
3131
private RecordingTracingInterceptor _httpTracingInterceptor;
@@ -63,7 +63,7 @@ private get
6363

6464
protected static TokenCache DefaultMemoryTokenCache { get; set; }
6565

66-
static AzurePSCmdlet()
66+
static AzureSMCmdlet()
6767
{
6868
if (!TestMockSupport.RunningMocked)
6969
{
@@ -182,7 +182,7 @@ protected virtual void InitializeProfile()
182182
{
183183
if (Profile == null)
184184
{
185-
Profile = AzurePSCmdlet.CurrentProfile;
185+
Profile = AzureSMCmdlet.CurrentProfile;
186186
}
187187

188188
SetTokenCacheForProfile(Profile);

src/Common/Commands.Common/ChannelHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.WindowsAzure.Commands.Common;
16-
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
1715
using System;
1816
using System.Diagnostics.CodeAnalysis;
1917
using System.IO;
@@ -29,6 +27,8 @@
2927
using System.Text;
3028
using System.Threading;
3129
using System.Xml;
30+
using Microsoft.WindowsAzure.Commands.Common;
31+
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
3232

3333
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
3434
{

src/Common/Commands.Common/CloudBaseCmdlet.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Common.Authentication;
16-
using Microsoft.Azure.Common.Authentication.Models;
17-
using Microsoft.WindowsAzure.Commands.Common.Properties;
18-
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
1915
using System;
2016
using System.Diagnostics;
2117
using System.Globalization;
@@ -24,10 +20,14 @@
2420
using System.ServiceModel;
2521
using System.ServiceModel.Channels;
2622
using System.ServiceModel.Security;
23+
using Microsoft.Azure.Common.Authentication;
24+
using Microsoft.Azure.Common.Authentication.Models;
25+
using Microsoft.WindowsAzure.Commands.Common.Properties;
26+
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
2727

2828
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
2929
{
30-
public abstract class CloudBaseCmdlet<T> : AzurePSCmdlet
30+
public abstract class CloudBaseCmdlet<T> : AzureSMCmdlet
3131
where T : class
3232
{
3333
private Binding _serviceBinding;

src/Common/Commands.Common/CmdletExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static void InvokeEndProcessing(this PSCmdlet cmdlt)
123123
MethodInfo dynMethod = (typeof(PSCmdlet)).GetMethod("EndProcessing", BindingFlags.NonPublic | BindingFlags.Instance);
124124
dynMethod.Invoke(cmdlt, null);
125125
}
126-
public static void ExecuteWithProcessing(this AzurePSCmdlet cmdlt)
126+
public static void ExecuteWithProcessing(this AzureSMCmdlet cmdlt)
127127
{
128128
cmdlt.InvokeBeginProcessing();
129129
cmdlt.ExecuteCmdlet();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
<Compile Include="ChannelHelper.cs" />
162162
<Compile Include="ClientCreatedArgs.cs" />
163163
<Compile Include="CloudBaseCmdlet.cs" />
164-
<Compile Include="AzurePSCmdlet.cs" />
164+
<Compile Include="AzureSMCmdlet.cs" />
165165
<Compile Include="CmdletExtensions.cs" />
166166
<Compile Include="ConfigurationConstants.cs" />
167167
<Compile Include="DiagnosticsHelper.cs" />

src/Common/Commands.Common/ComputeCloudException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Hyak.Common;
1615
using System;
1716
using System.Linq;
1817
using System.Text;
18+
using Hyak.Common;
1919

2020
namespace Microsoft.WindowsAzure.Commands.Common
2121
{

src/Common/Commands.Common/DebugStreamTraceListener.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,8 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using System;
1615
using System.Collections.Concurrent;
17-
using System.Collections.Generic;
18-
using System.Linq;
19-
using System.Text;
20-
using System.Threading.Tasks;
2116
using System.Diagnostics;
22-
using System.IO;
2317
using Microsoft.IdentityModel.Clients.ActiveDirectory;
2418

2519
namespace Microsoft.WindowsAzure.Commands.Common

src/Common/Commands.Common/DiagnosticsHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.WindowsAzure.Commands.Common.Properties;
1615
using System;
1716
using System.Collections;
1817
using System.IO;
19-
using System.Linq;
2018
using System.Text;
2119
using System.Xml;
20+
using Microsoft.WindowsAzure.Commands.Common.Properties;
2221
using Newtonsoft.Json;
2322

2423
namespace Microsoft.WindowsAzure.Commands.Utilities.Common

src/Common/Commands.Common/ErrorHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.WindowsAzure.Commands.Common;
16-
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
1715
using System.IO;
1816
using System.Net;
1917
using System.ServiceModel;
2018
using System.Xml;
19+
using Microsoft.WindowsAzure.Commands.Common;
20+
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;
2121

2222
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
2323
{

src/Common/Commands.Common/GeneralUtilities.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Hyak.Common;
16-
using Microsoft.Azure.Common.Authentication;
17-
using Microsoft.WindowsAzure.Commands.Common;
1815
using System;
1916
using System.Collections.Generic;
2017
using System.Diagnostics;
@@ -29,6 +26,9 @@
2926
using System.ServiceModel.Channels;
3027
using System.Text;
3128
using System.Xml;
29+
using Hyak.Common;
30+
using Microsoft.Azure.Common.Authentication;
31+
using Microsoft.WindowsAzure.Commands.Common;
3232

3333
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
3434
{

src/Common/Commands.Common/HttpClientExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// ----------------------------------------------------------------------------------
1414

1515

16-
using Microsoft.Azure.Common.Authentication;
17-
using Microsoft.WindowsAzure.Commands.Common;
18-
using Newtonsoft.Json;
1916
using System;
2017
using System.Net;
2118
using System.Net.Http;
2219
using System.Net.Http.Headers;
20+
using Microsoft.Azure.Common.Authentication;
21+
using Microsoft.WindowsAzure.Commands.Common;
22+
using Newtonsoft.Json;
2323

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

src/Common/Commands.Common/ProfileClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Hyak.Common;
16-
using Microsoft.Azure.Common.Authentication.Factories;
17-
using Microsoft.Azure.Common.Authentication.Models;
18-
using Microsoft.Azure.Common.Authentication.Properties;
1915
using System;
2016
using System.Collections.Generic;
2117
using System.Diagnostics;
2218
using System.IO;
2319
using System.Linq;
2420
using System.Security;
2521
using System.Security.Cryptography.X509Certificates;
22+
using Hyak.Common;
23+
using Microsoft.Azure.Common.Authentication.Factories;
24+
using Microsoft.Azure.Common.Authentication.Models;
25+
using Microsoft.Azure.Common.Authentication.Properties;
2626
using Microsoft.WindowsAzure.Subscriptions;
2727

2828
namespace Microsoft.Azure.Common.Authentication

src/Common/Commands.Common/Properties/Resources.Designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Common/Commands.Common/PublishSettingsImporter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Common.Authentication.Models;
16-
using Microsoft.Azure.Common.Authentication.XmlSchema;
1715
using System;
1816
using System.Collections.Generic;
1917
using System.IO;
2018
using System.Linq;
2119
using System.Security.Cryptography.X509Certificates;
2220
using System.Xml.Serialization;
21+
using Microsoft.Azure.Common.Authentication.Models;
22+
using Microsoft.Azure.Common.Authentication.XmlSchema;
2323

2424
namespace Microsoft.Azure.Common.Authentication
2525
{

src/Common/Commands.Common/RPRegistrationAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Hyak.Common;
1615
using System.Collections.Generic;
1716
using System.Diagnostics;
1817
using System.Linq;
1918
using System.Net;
19+
using Hyak.Common;
2020
using Microsoft.Azure.Management.Resources;
2121
using Microsoft.WindowsAzure.Management;
2222

src/Common/Commands.Common/RecordingTracingInterceptor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Hyak.Common;
16-
using Microsoft.WindowsAzure;
17-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1815
using System;
1916
using System.Collections.Concurrent;
2017
using System.Collections.Generic;
2118
using System.Net.Http;
19+
using Hyak.Common;
20+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2221

2322
namespace Microsoft.Azure.Common.Authentication.Models
2423
{

src/Common/Commands.Common/ServiceManagementTypes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
//TODO: When transition to SM.NET is completed, rename the namespace to "Microsoft.WindowsAzure.ServiceManagement"
1616

17-
using Microsoft.WindowsAzure.Commands.Common.Properties;
1817
using System;
1918
using System.Collections.Generic;
2019
using System.Collections.ObjectModel;
@@ -28,6 +27,7 @@
2827
using System.ServiceModel.Web;
2928
using System.Text;
3029
using System.Xml;
30+
using Microsoft.WindowsAzure.Commands.Common.Properties;
3131

3232
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model
3333
{

src/Common/Commands.Common/SubscriptionCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.Profile
2222
/// azure subscription, provides common support
2323
/// for the SubscriptionDataFile parameter.
2424
/// </summary>
25-
public abstract class SubscriptionCmdletBase : AzurePSCmdlet
25+
public abstract class SubscriptionCmdletBase : AzureSMCmdlet
2626
{
2727
private readonly bool _saveProfile;
2828

src/Common/Commands.Profile/Profile/NewAzureProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace Microsoft.WindowsAzure.Commands.Profile
3333
/// Creates new Microsoft Azure profile.
3434
/// </summary>
3535
[Cmdlet(VerbsCommon.New, "AzureProfile"), OutputType(typeof(AzureSMProfile))]
36-
public class NewAzureProfileCommand : AzurePSCmdlet
36+
public class NewAzureProfileCommand : AzureSMCmdlet
3737
{
3838
internal const string CertificateParameterSet = "Certificate";
3939
internal const string CredentialsParameterSet = "Credentials";

src/Common/Commands.Profile/Profile/SelectAzureProfile.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace Microsoft.WindowsAzure.Commands.Profile
3333
/// Creates new Microsoft Azure profile.
3434
/// </summary>
3535
[Cmdlet(VerbsCommon.Select, "AzureProfile"), OutputType(typeof(AzureSMProfile))]
36-
public class SelectAzureProfileCommand : AzurePSCmdlet
36+
public class SelectAzureProfileCommand : AzureSMCmdlet
3737
{
3838
internal const string NewProfileParameterSet = "NewProfile";
3939
internal const string DefaultProfileParameterSet = "DefaultProfile";
@@ -54,15 +54,15 @@ public override void ExecuteCmdlet()
5454
{
5555
if (ParameterSetName == DefaultProfileParameterSet)
5656
{
57-
Profile = AzurePSCmdlet.InitializeDefaultProfile();
57+
Profile = AzureSMCmdlet.InitializeDefaultProfile();
5858
}
5959

6060
if (Profile == null)
6161
{
6262
throw new ArgumentException(Resources.AzureProfileMustNotBeNull);
6363
}
6464

65-
AzurePSCmdlet.CurrentProfile = Profile;
65+
AzureSMCmdlet.CurrentProfile = Profile;
6666
WriteObject(Profile);
6767
}
6868
}

src/Common/Commands.Profile/SwitchAzureMode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.WindowsAzure.Commands.Profile
2424
/// Switches between ServiceManagement and ResourceManager modes.
2525
/// </summary>
2626
[Cmdlet(VerbsCommon.Switch, "AzureMode")]
27-
public class SwitchAzureMode : AzurePSCmdlet
27+
public class SwitchAzureMode : AzureSMCmdlet
2828
{
2929
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the mode to switch to. Valid values are AzureServiceManagement and AzureResourceManager")]
3030
[ValidateSet("AzureServiceManagement", "AzureResourceManager", IgnoreCase = false)]

src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public EnvironmentSetupHelper()
5151
var datastore = new MemoryDataStore();
5252
AzureSession.DataStore = datastore;
5353
var profile = new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile));
54-
AzurePSCmdlet.CurrentProfile = profile;
54+
AzureSMCmdlet.CurrentProfile = profile;
5555
AzureSession.DataStore = datastore;
5656
ProfileClient = new ProfileClient(profile);
5757

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/AzureApiManagementCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands
2020
using Microsoft.Azure.Commands.ApiManagement.ServiceManagement;
2121
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2222

23-
abstract public class AzureApiManagementCmdletBase : AzurePSCmdlet
23+
abstract public class AzureApiManagementCmdletBase : AzureSMCmdlet
2424
{
2525
protected static TimeSpan LongRunningOperationDefaultTimeout = TimeSpan.FromMinutes(1);
2626

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
2222
using Microsoft.Azure.Commands.ApiManagement.Properties;
2323
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2424

25-
public class AzureApiManagementCmdletBase : AzurePSCmdlet
25+
public class AzureApiManagementCmdletBase : AzureSMCmdlet
2626
{
2727
protected static TimeSpan LongRunningOperationDefaultTimeout = TimeSpan.FromMinutes(1);
2828

0 commit comments

Comments
 (0)