Skip to content

Commit afef467

Browse files
committed
Merge branch 'dev' into chelamBgp
2 parents 4220f68 + d1e9b48 commit afef467

File tree

598 files changed

+87057
-49022
lines changed

Some content is hidden

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

598 files changed

+87057
-49022
lines changed

ChangeLog.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1+
## 2016.01.12 version 1.1.0
2+
* Azure SQL Database: Threat Detection policies:
3+
* Using new Threat Detection Types
14
* Azure Redis Cache: new cmdlets for enabling and disabling diagnostics
25
* Set-AzureRmRedisCacheDiagnostics
36
* Remove-AzureRmRedisCacheDiagnostics
7+
* Azure Websites: New cmdlets for managing SSL binding
8+
* Get-AzureRmWebAppCertificate
9+
* New-AzureRmWebAppSSLBinding
10+
* Get-AzureRmWebAppSSLBinding
11+
* Remove-AzureRmWebAppSSLBinding
12+
* Added AseName and AseResourceGroupName parameters in New-AzureRmWebApp and New-AzureRmAppServicePlan cmdlet
13+
* Added support for cloning all deployment slots associated with source website
14+
* Azure Stream Analytics: Added new cmdlet support for Functions.
15+
* New-AzureRmStreamAnalyticsFunction
16+
* Get-AzureRmStreamAnalyticsFunction
17+
* Test-AzureRmStreamAnalyticsFunction
18+
* Get-AzureRmStreamAnalyticsDefaultFunctionDefinition
19+
* Remove-AzureRmStreamAnalyticsFunction
20+
* Azure Batch
21+
* New-AzureBatchTask now accepts a MultiInstanceSettings parameter
22+
* Get-AzureBatchSubtask cmdlet added
23+
* Enable-AzureBatchComputeNodeScheduling / Disable-AzureBatchComputeNodeScheduling cmdlets added
24+
* Enable-AzureBatchAutoScale and New-AzureBatchPool now accept an AutoScaleEvaluationInterval parameter.
25+
426
## 2015.12.14 version 1.0.2
527
* Azure Compute (ARM):
628
* Enable BGInfo extension by default

build.proj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
UnsignedFiles="@(DelaySignedAssembliesToSign)"
220220
DestinationPath="$(LibrarySourceFolder)\Package\$(Configuration)"
221221
BasePath="$(LibrarySourceFolder)\Package\$(Configuration)"
222-
Certificates="72, 10006"
222+
Certificates="72, 401"
223223
SigningLogPath="$(LibraryRoot)\signing.log"
224224
ToolsPath="$(CIToolsPath)"
225225
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
@@ -230,7 +230,7 @@
230230
UnsignedFiles="@(ScriptsToSign)"
231231
DestinationPath="$(LibrarySourceFolder)\Package\$(Configuration)"
232232
BasePath="$(LibrarySourceFolder)\Package\$(Configuration)"
233-
Certificates="10006"
233+
Certificates="402"
234234
SigningLogPath="$(LibraryRoot)\signing-scripts.log"
235235
ToolsPath="$(CIToolsPath)"
236236
Condition="!$(DelaySign) and '@(ScriptsToSign)' != ''"/>
@@ -272,7 +272,7 @@
272272
UnsignedFiles="@(InstallersToSign)"
273273
DestinationPath="$(LibraryRoot)\signed"
274274
SigningLogPath="$(LibraryRoot)\msi-signing.log"
275-
Certificates="10006"
275+
Certificates="402"
276276
ToolsPath="$(CIToolsPath)"
277277
Condition="!$(DelaySign) and '@(InstallersToSign)' != ''"/>
278278

setup/Setup/CustomAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.WindowsAzure.Setup
2121

2222
public class CustomAction
2323
{
24-
// The exception object which will store (if) exception which is occured in our sta thread
24+
// The exception object which will store (if) exception which is occurred in our sta thread
2525
private static Exception _STAThreadException;
2626

2727
private static uint[] powerShellDefaultColorTable = new uint[]
@@ -30,7 +30,7 @@ public class CustomAction
3030
0x808080, 0xFF0000, 0xFF00, 0xFFFF00, 0xFF, 0xFF00FF, 0xFFFF, 0xFFFFFF
3131
};
3232

33-
// Method which contains our custom action behaviour
33+
// Method which contains our custom action behavior
3434
private static void RunSTAThread(object sessionObject)
3535
{
3636
try

setup/azurecmd.wxs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - December 2015" ?>
4+
<?define productName="Microsoft Azure PowerShell - January 2016" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="1.0.2" ?>
8+
<?define version="1.1.0" ?>
99
<?define versionedStartMenuFolder="Microsoft Azure" ?>
1010
<?define staleStartMenuFolder="Windows Azure" ?>
1111

@@ -31,11 +31,11 @@
3131
<RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" />
3232
</Property>
3333

34-
<SetProperty Action="SetBase64" Id="BaseModulesFolder" Value="[ProgramFiles64Folder]WindowsPowerShell\Modules" Before="AppSearch">
34+
<SetProperty Action="SetBase64" Id="BaseModulesFolder" Value="[ProgramFiles64Folder]WindowsPowerShell\Modules\" Before="AppSearch">
3535
VersionNT64
3636
</SetProperty>
3737

38-
<SetProperty Action="SetBase32" Id="BaseModulesFolder" Value="[ProgramFilesFolder]WindowsPowerShell\Modules" Before="AppSearch">
38+
<SetProperty Action="SetBase32" Id="BaseModulesFolder" Value="[ProgramFilesFolder]WindowsPowerShell\Modules\" Before="AppSearch">
3939
NOT VersionNT64
4040
</SetProperty>
4141

@@ -81,7 +81,7 @@
8181
<Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D">
8282
<CreateFolder />
8383
<!-- Work around bug that PowerShell does not always consider default module paths. -->
84-
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager;[PowerShellFolder]ServiceManagement" System="yes" />
84+
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager\;[PowerShellFolder]ServiceManagement\" System="yes" />
8585
</Component>
8686
</DirectoryRef>
8787

setup/azurecmdfiles.wxi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,9 @@
12261226
<Component Id="cmp8B8A7BBF33AC8748C36AF2D0F867CC3B" Guid="*">
12271227
<File Id="filF511C99CEA7C19431605AD07F44B545A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.ApplicationInsights.dll" />
12281228
</Component>
1229+
<Component Id="cmpBCA648A3B7B30300ACDCC83746172368" Guid="*">
1230+
<File Id="filD64CE679433518D6F65696BBFB22C420" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Azure.ActiveDirectory.GraphClient.dll" />
1231+
</Component>
12291232
<Component Id="cmpDBE0EFA9AB2C3936D498914505FD59BD" Guid="*">
12301233
<File Id="fil0EDC9091229822DEF09EFE500F63B7AC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Azure.Commands.KeyVault.dll" />
12311234
</Component>
@@ -1289,6 +1292,15 @@
12891292
<Component Id="cmp1C7EFB238F49BC10B88911B4DD7CD760" Guid="*">
12901293
<File Id="filC52B079BABFAD11D6B89732C6569172A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Azure.ResourceManager.dll" />
12911294
</Component>
1295+
<Component Id="cmpF469AE6EA612B0399957FAF85083221B" Guid="*">
1296+
<File Id="fil5684108D378817FBD69741594A1691AA" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Data.Edm.dll" />
1297+
</Component>
1298+
<Component Id="cmp28D6E7B5DF1FD9B79A5B4D16447379A1" Guid="*">
1299+
<File Id="fil5FFABBF4B17F9CB6DC30FB21B11A1B3F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Data.OData.dll" />
1300+
</Component>
1301+
<Component Id="cmpCD008CF1C7D17EBD72102BD129C9372C" Guid="*">
1302+
<File Id="filAE03B936A9EEBD6BA395089F817FD5A0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.Data.Services.Client.dll" />
1303+
</Component>
12921304
<Component Id="cmpD542C61584E161A92D52490818D7E34A" Guid="*">
12931305
<File Id="filC47A710583991C8D624107A3F8EBDD72" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
12941306
</Component>
@@ -1328,6 +1340,9 @@
13281340
<Component Id="cmpD29EA01597258746011AE6EF9FC3D15A" Guid="*">
13291341
<File Id="filCE0262D8D43EF7AB4CDB25A0752B7121" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\System.Net.Http.Primitives.dll" />
13301342
</Component>
1343+
<Component Id="cmp8EE8340753317C13D69F692E7E42B175" Guid="*">
1344+
<File Id="filAE60D28516977FE205BBEB3D15EB53DE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\System.Spatial.dll" />
1345+
</Component>
13311346
</Directory>
13321347
<Directory Id="dir76147B1D381C34B7638F2A844B5685DC" Name="AzureRM.Network">
13331348
<Component Id="cmp33F39A22183184A6B41F85DF085BAD29" Guid="*">
@@ -5204,6 +5219,7 @@
52045219
<ComponentRef Id="cmp007494D6DDD084F46271414EDBAE4A28" />
52055220
<ComponentRef Id="cmpF892ECD9E56A470DCBCDFB5721EFD871" />
52065221
<ComponentRef Id="cmp8B8A7BBF33AC8748C36AF2D0F867CC3B" />
5222+
<ComponentRef Id="cmpBCA648A3B7B30300ACDCC83746172368" />
52075223
<ComponentRef Id="cmpDBE0EFA9AB2C3936D498914505FD59BD" />
52085224
<ComponentRef Id="cmp3CD3D1820190A9634EFE76B4737874EB" />
52095225
<ComponentRef Id="cmp043B164F4D1039F8B2F62D774A383C9B" />
@@ -5225,6 +5241,9 @@
52255241
<ComponentRef Id="cmpD1A5B61C7046E3D9D8256C632EED70EF" />
52265242
<ComponentRef Id="cmpFD1FF637F9EDD0BF88DE235BB7C878F2" />
52275243
<ComponentRef Id="cmp1C7EFB238F49BC10B88911B4DD7CD760" />
5244+
<ComponentRef Id="cmpF469AE6EA612B0399957FAF85083221B" />
5245+
<ComponentRef Id="cmp28D6E7B5DF1FD9B79A5B4D16447379A1" />
5246+
<ComponentRef Id="cmpCD008CF1C7D17EBD72102BD129C9372C" />
52285247
<ComponentRef Id="cmpD542C61584E161A92D52490818D7E34A" />
52295248
<ComponentRef Id="cmp0EE8FCFA5508960593F3537443DACD4E" />
52305249
<ComponentRef Id="cmp6D51C798EDF35CEA322D396B85FB8E18" />
@@ -5238,6 +5257,7 @@
52385257
<ComponentRef Id="cmp8F99791178CB394FC285BF5F9DA21047" />
52395258
<ComponentRef Id="cmp55A0977CC2E4CD91F6738FFD78449307" />
52405259
<ComponentRef Id="cmpD29EA01597258746011AE6EF9FC3D15A" />
5260+
<ComponentRef Id="cmp8EE8340753317C13D69F692E7E42B175" />
52415261
<ComponentRef Id="cmp33F39A22183184A6B41F85DF085BAD29" />
52425262
<ComponentRef Id="cmp70B60DBD32D61BCA5715AB2D64131358" />
52435263
<ComponentRef Id="cmp92653399A1E9659661E74CA982C1D16A" />

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

Lines changed: 1 addition & 1 deletion
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.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
59+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.2-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">

src/Common/Commands.Common.Storage/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.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-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.7-preview" targetFramework="net45" />

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
using System.Text;
2828
using System.Linq;
2929
using System.Threading;
30+
using Microsoft.Rest;
31+
using Microsoft.ApplicationInsights;
3032

3133
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
3234
{
@@ -40,14 +42,20 @@ public abstract class AzurePSCmdlet : PSCmdlet, IDisposable
4042
private RecordingTracingInterceptor _httpTracingInterceptor;
4143

4244
private DebugStreamTraceListener _adalListener;
45+
46+
private ServiceClientTracingInterceptor _serviceClientTracingInterceptor;
47+
4348
protected static AzurePSDataCollectionProfile _dataCollectionProfile = null;
4449
protected static string _errorRecordFolderPath = null;
45-
protected const string _fileTimeStampSuffixFormat = "yyyy-MM-dd-THH-mm-ss-fff";
50+
protected static string _sessionId = Guid.NewGuid().ToString();
51+
protected const string _fileTimeStampSuffixFormat = "yyyy-MM-dd-THH-mm-ss-fff";
52+
protected string _clientRequestId = Guid.NewGuid().ToString();
53+
protected MetricHelper _metricHelper;
4654

4755
protected AzurePSQoSEvent QosEvent;
4856

4957
protected virtual bool IsUsageMetricEnabled {
50-
get { return false; }
58+
get { return true; }
5159
}
5260

5361
protected virtual bool IsErrorMetricEnabled
@@ -57,7 +65,7 @@ protected virtual bool IsErrorMetricEnabled
5765

5866
/// <summary>
5967
/// Gets the PowerShell module name used for user agent header.
60-
/// By default uses "Azurepowershell"
68+
/// By default uses "Azure PowerShell"
6169
/// </summary>
6270
protected virtual string ModuleName { get { return "AzurePowershell"; } }
6371

@@ -77,6 +85,13 @@ protected virtual bool IsErrorMetricEnabled
7785
public AzurePSCmdlet()
7886
{
7987
_debugMessages = new ConcurrentQueue<string>();
88+
89+
//TODO: Inject from CI server
90+
_metricHelper = new MetricHelper();
91+
_metricHelper.AddTelemetryClient(new TelemetryClient
92+
{
93+
InstrumentationKey = "7df6ff70-8353-4672-80d6-568517fed090"
94+
});
8095
}
8196

8297
/// <summary>
@@ -95,12 +110,12 @@ protected static void InitializeDataCollectionProfile()
95110
{
96111
if (string.Equals(value, bool.FalseString, StringComparison.OrdinalIgnoreCase))
97112
{
98-
// Disable data collection only if it is explictly set to 'false'.
113+
// Disable data collection only if it is explicitly set to 'false'.
99114
_dataCollectionProfile = new AzurePSDataCollectionProfile(true);
100115
}
101116
else if (string.Equals(value, bool.TrueString, StringComparison.OrdinalIgnoreCase))
102117
{
103-
// Enable data collection only if it is explictly set to 'true'.
118+
// Enable data collection only if it is explicitly set to 'true'.
104119
_dataCollectionProfile = new AzurePSDataCollectionProfile(false);
105120
}
106121
}
@@ -216,13 +231,15 @@ protected override void BeginProcessing()
216231

217232
_httpTracingInterceptor = _httpTracingInterceptor ?? new RecordingTracingInterceptor(_debugMessages);
218233
_adalListener = _adalListener ?? new DebugStreamTraceListener(_debugMessages);
234+
_serviceClientTracingInterceptor = _serviceClientTracingInterceptor ?? new ServiceClientTracingInterceptor(_debugMessages);
219235
RecordingTracingInterceptor.AddToContext(_httpTracingInterceptor);
220236
DebugStreamTraceListener.AddAdalTracing(_adalListener);
237+
ServiceClientTracing.AddTracingInterceptor(_serviceClientTracingInterceptor);
221238

222239
ProductInfoHeaderValue userAgentValue = new ProductInfoHeaderValue(
223240
ModuleName, string.Format("v{0}", ModuleVersion));
224241
AzureSession.ClientFactory.UserAgents.Add(userAgentValue);
225-
AzureSession.ClientFactory.AddHandler(new CmdletInfoHandler(this.CommandRuntime.ToString(), this.ParameterSetName));
242+
AzureSession.ClientFactory.AddHandler(new CmdletInfoHandler(this.CommandRuntime.ToString(), this.ParameterSetName, this._clientRequestId));
226243
base.BeginProcessing();
227244
}
228245

@@ -237,6 +254,7 @@ protected override void EndProcessing()
237254

238255
RecordingTracingInterceptor.RemoveFromContext(_httpTracingInterceptor);
239256
DebugStreamTraceListener.RemoveAdalTracing(_adalListener);
257+
ServiceClientTracingInterceptor.RemoveTracingInterceptor(_serviceClientTracingInterceptor);
240258
FlushDebugMessages();
241259

242260
AzureSession.ClientFactory.UserAgents.RemoveWhere(u => u.Product.Name == ModuleName);
@@ -246,7 +264,7 @@ protected override void EndProcessing()
246264

247265
protected string CurrentPath()
248266
{
249-
// SessionState is only available within Powershell so default to
267+
// SessionState is only available within PowerShell so default to
250268
// the CurrentDirectory when being run from tests.
251269
return (SessionState != null) ?
252270
SessionState.Path.CurrentLocation.Path :
@@ -266,7 +284,6 @@ protected bool IsVerbose()
266284
{
267285
QosEvent.Exception = errorRecord.Exception;
268286
QosEvent.IsSuccess = false;
269-
LogQosEvent(true);
270287
}
271288

272289
base.WriteError(errorRecord);
@@ -431,7 +448,7 @@ private void RecordDebugMessages()
431448
/// <summary>
432449
/// Invoke this method when the cmdlet is completed or terminated.
433450
/// </summary>
434-
protected void LogQosEvent(bool waitForMetricSending = false)
451+
protected void LogQosEvent()
435452
{
436453
if (QosEvent == null)
437454
{
@@ -454,8 +471,8 @@ protected void LogQosEvent(bool waitForMetricSending = false)
454471

455472
try
456473
{
457-
MetricHelper.LogQoSEvent(QosEvent, IsUsageMetricEnabled, IsErrorMetricEnabled);
458-
MetricHelper.FlushMetric(waitForMetricSending);
474+
_metricHelper.LogQoSEvent(QosEvent, IsUsageMetricEnabled, IsErrorMetricEnabled);
475+
_metricHelper.FlushMetric();
459476
WriteDebug("Finish sending metric.");
460477
}
461478
catch (Exception e)

0 commit comments

Comments
 (0)