Skip to content

Commit 842dac4

Browse files
authored
Merge branch 'preview' into preview
2 parents dbbac5b + 05b8320 commit 842dac4

File tree

198 files changed

+1546
-10701
lines changed

Some content is hidden

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

198 files changed

+1546
-10701
lines changed

setup/azurecmdfiles.wxi

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,24 +1654,12 @@
16541654
<Component Id="cmp652574B007D36760A8F3951C8BBCBA73" Guid="*">
16551655
<File Id="filCDCD5137F842104C0DCEBDE8C282E168" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Azure.Common.NetFramework.dll" />
16561656
</Component>
1657-
<Component Id="cmp19A1422310791548B2EE9CC01D0E80AB" Guid="*">
1658-
<File Id="fil775FC63E54E73F93CF6A7DD79AA7766F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Azure.Insights.dll" />
1659-
</Component>
1660-
<Component Id="cmpAB0BE651457D19885EE5BD5615E283A9" Guid="*">
1661-
<File Id="fil7C8081F59D42A001771050D89E11D7CB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Azure.KeyVault.Core.dll" />
1662-
</Component>
1663-
<Component Id="cmpBE9F3609F315D89DE19004AC7E629A12" Guid="*">
1664-
<File Id="filFED788047F438C9397D43C0F1F5AA7A6" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Data.Edm.dll" />
1665-
</Component>
1666-
<Component Id="cmp45E9D11A1E7E15837ADBF6220B8DFD7E" Guid="*">
1667-
<File Id="fil68988BF4794EF93E735022A7BFF20997" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Data.OData.dll" />
1668-
</Component>
1669-
<Component Id="cmp95FB8932F45A41F4AF974FB6F565B75C" Guid="*">
1670-
<File Id="filFA94C707722DFF90E974DB5BC3D375E1" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Data.Services.Client.dll" />
1671-
</Component>
16721657
<Component Id="cmpC9466F4B506234EBA66C4F1204C0CD5D" Guid="*">
16731658
<File Id="fil923B64CC593E3BC837C3F9B6227E8342" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
16741659
</Component>
1660+
<Component Id="cmp19A1422310791548B2EE9CC01D0E80AB" Guid="*">
1661+
<File Id="fil775FC63E54E73F93CF6A7DD79AA7766F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Azure.Management.Monitor.dll" />
1662+
</Component>
16751663
<Component Id="cmpFC33C3BBB9DE3FDA41AAC3F0C1652F45" Guid="*">
16761664
<File Id="fil0BC58752DC9792178625EA842D496953" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
16771665
</Component>
@@ -1684,24 +1672,12 @@
16841672
<Component Id="cmpE2B4EA9CCA75508B10345C79226A99BF" Guid="*">
16851673
<File Id="filCA417FF06BB88827F1DDD15499A06D27" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Threading.Tasks.dll" />
16861674
</Component>
1687-
<Component Id="cmp1A1353B6954892B25E4CF5A7F1208CB1" Guid="*">
1688-
<File Id="filED725745AFD8548355339E53DF3C8AEC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Threading.Tasks.Extensions.Desktop.dll" />
1689-
</Component>
1690-
<Component Id="cmpDF4CF9188B16A6B4C6C76ACC36D49FF0" Guid="*">
1691-
<File Id="filA31B802F0B9BA67ED80BA3D8D91164DC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Threading.Tasks.Extensions.dll" />
1692-
</Component>
16931675
<Component Id="cmp545597FAE11FE5F91F4BDCD56D1DFE83" Guid="*">
16941676
<File Id="fil928770DD46031339492018E2CD7D9BCC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.WindowsAzure.Commands.Common.dll" />
16951677
</Component>
1696-
<Component Id="cmpD0CBA309930AE994CD67A5EB7C9B5B10" Guid="*">
1697-
<File Id="filF4A2BE56AA42EB88C96B3F8DF53F8F6C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.WindowsAzure.Storage.dll" />
1698-
</Component>
16991678
<Component Id="cmp7781002FCC3D1B3F0519A286C3E916E9" Guid="*">
17001679
<File Id="fil7A9F66CF061583CA28B0DA562E249A8B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Newtonsoft.Json.dll" />
17011680
</Component>
1702-
<Component Id="cmp09C89A8B21C5D2C4595F1D35C982F73B" Guid="*">
1703-
<File Id="filF161B346D39B2AA99CBA7434BC7AD7C6" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\System.Spatial.dll" />
1704-
</Component>
17051681
</Directory>
17061682
<Directory Id="dirF584E982D38358ACFBC86D63B65C660D" Name="AzureRM.IotHub">
17071683
<Component Id="cmp15C1FCDD65CEFB52792FB6ED02513E11" Guid="*">
@@ -6342,21 +6318,13 @@
63426318
<ComponentRef Id="cmpA848C04563692D93B90821EE8960E3B4" />
63436319
<ComponentRef Id="cmp652574B007D36760A8F3951C8BBCBA73" />
63446320
<ComponentRef Id="cmp19A1422310791548B2EE9CC01D0E80AB" />
6345-
<ComponentRef Id="cmpAB0BE651457D19885EE5BD5615E283A9" />
6346-
<ComponentRef Id="cmpBE9F3609F315D89DE19004AC7E629A12" />
6347-
<ComponentRef Id="cmp45E9D11A1E7E15837ADBF6220B8DFD7E" />
6348-
<ComponentRef Id="cmp95FB8932F45A41F4AF974FB6F565B75C" />
63496321
<ComponentRef Id="cmpC9466F4B506234EBA66C4F1204C0CD5D" />
63506322
<ComponentRef Id="cmpFC33C3BBB9DE3FDA41AAC3F0C1652F45" />
63516323
<ComponentRef Id="cmpE389288C5CA88334DBFAA1A298DFDC57" />
63526324
<ComponentRef Id="cmpE0A4360ECC0B00A74E3D29F280B2FD2E" />
63536325
<ComponentRef Id="cmpE2B4EA9CCA75508B10345C79226A99BF" />
6354-
<ComponentRef Id="cmp1A1353B6954892B25E4CF5A7F1208CB1" />
6355-
<ComponentRef Id="cmpDF4CF9188B16A6B4C6C76ACC36D49FF0" />
63566326
<ComponentRef Id="cmp545597FAE11FE5F91F4BDCD56D1DFE83" />
6357-
<ComponentRef Id="cmpD0CBA309930AE994CD67A5EB7C9B5B10" />
63586327
<ComponentRef Id="cmp7781002FCC3D1B3F0519A286C3E916E9" />
6359-
<ComponentRef Id="cmp09C89A8B21C5D2C4595F1D35C982F73B" />
63606328
<ComponentRef Id="cmp15C1FCDD65CEFB52792FB6ED02513E11" />
63616329
<ComponentRef Id="cmpA2E684A10B5D1FE61816950EA488B619" />
63626330
<ComponentRef Id="cmp66C6BE87523BE39FE5A322FE66E678E7" />

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/RemoveAzureContainerRegistry.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ public class RemoveAzureContainerRegistry : ContainerRegistryCmdletBase
4848

4949
public override void ExecuteCmdlet()
5050
{
51-
if (ShouldProcess(Name, "Remove Container Registry"))
51+
if (string.Equals(ParameterSetName, RegistryObjectParameterSet))
5252
{
53-
if (string.Equals(ParameterSetName, RegistryObjectParameterSet))
54-
{
55-
ResourceGroupName = Registry.ResourceGroupName;
56-
Name = Registry.Name;
57-
}
53+
ResourceGroupName = Registry.ResourceGroupName;
54+
Name = Registry.Name;
55+
}
5856

57+
if (ShouldProcess(Name, "Remove Container Registry"))
58+
{
5959
RegistryClient.DeleteRegistry(ResourceGroupName, Name);
6060
}
6161
}

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/UpdateAzureContainerRegistry.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
namespace Microsoft.Azure.Commands.ContainerRegistry
2020
{
21-
[Cmdlet(VerbsData.Update, ContainerRegistryNoun, DefaultParameterSetName = "Empty", SupportsShouldProcess = true),
21+
[Cmdlet(VerbsData.Update, ContainerRegistryNoun,
22+
DefaultParameterSetName = "Empty",
23+
SupportsShouldProcess = true),
2224
OutputType(typeof(PSContainerRegistry))]
2325
public class UpdateAzureContainerRegistry : ContainerRegistryCmdletBase
2426
{
@@ -77,7 +79,7 @@ public class UpdateAzureContainerRegistry : ContainerRegistryCmdletBase
7779

7880
public override void ExecuteCmdlet()
7981
{
80-
if (ShouldProcess(Name, "Remove Container Registry"))
82+
if (ShouldProcess(Name, "Update Container Registry"))
8183
{
8284
var tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true);
8385

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/UpdateAzureContainerRegistryCredential.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ public class UpdateAzureContainerRegistryCredential : ContainerRegistryCmdletBas
5757

5858
public override void ExecuteCmdlet()
5959
{
60-
if (ShouldProcess(Name, string.Format("Update Container Registry Credential '{0}'", PasswordName)))
60+
if (string.Equals(ParameterSetName, RegistryObjectParameterSet))
6161
{
62-
if (string.Equals(ParameterSetName, RegistryObjectParameterSet))
63-
{
64-
ResourceGroupName = Registry.ResourceGroupName;
65-
Name = Registry.Name;
66-
}
62+
ResourceGroupName = Registry.ResourceGroupName;
63+
Name = Registry.Name;
64+
}
6765

66+
if (ShouldProcess(Name, string.Format("Update Container Registry Credential '{0}'", PasswordName)))
67+
{
6868
var credentials = RegistryClient.RegenerateRegistryCredential(ResourceGroupName, Name, PasswordName);
6969
WriteObject(new PSContainerRegistryCredential(credentials));
7070
}

src/ResourceManager/Insights/Commands.Insights.Test/Events/GetAzureRmLogTests.cs renamed to src/ResourceManager/Insights/Commands.Insights.Test/ActivityLogs/GetAzureRmLogTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
using System.Collections.Generic;
1616
using Microsoft.Azure.Commands.Insights.Events;
17-
using Microsoft.Azure.Insights;
18-
using Microsoft.Azure.Insights.Models;
17+
using Microsoft.Azure.Management.Monitor;
18+
using Microsoft.Azure.Management.Monitor.Models;
1919
using Microsoft.Rest.Azure;
2020
using Microsoft.Rest.Azure.OData;
2121
using Microsoft.WindowsAzure.Commands.ScenarioTest;
@@ -31,8 +31,8 @@ namespace Microsoft.Azure.Commands.Insights.Test.Events
3131
public class GetAzureRmLogTests
3232
{
3333
private readonly GetAzureRmLogCommand cmdlet;
34-
private readonly Mock<InsightsClient> insightsClientMock;
35-
private readonly Mock<IEventsOperations> insightsEventOperationsMock;
34+
private readonly Mock<MonitorClient> MonitorClientMock;
35+
private readonly Mock<IActivityLogsOperations> insightsEventOperationsMock;
3636
private Mock<ICommandRuntime> commandRuntimeMock;
3737
private AzureOperationResponse<IPage<EventData>> response;
3838
private ODataQuery<EventData> filter;
@@ -41,13 +41,13 @@ public class GetAzureRmLogTests
4141
public GetAzureRmLogTests(Xunit.Abstractions.ITestOutputHelper output)
4242
{
4343
//ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output));
44-
insightsEventOperationsMock = new Mock<IEventsOperations>();
45-
insightsClientMock = new Mock<InsightsClient>();
44+
insightsEventOperationsMock = new Mock<IActivityLogsOperations>();
45+
MonitorClientMock = new Mock<MonitorClient>();
4646
commandRuntimeMock = new Mock<ICommandRuntime>();
4747
cmdlet = new GetAzureRmLogCommand()
4848
{
4949
CommandRuntime = commandRuntimeMock.Object,
50-
InsightsClient = insightsClientMock.Object
50+
MonitorClient = MonitorClientMock.Object
5151
};
5252

5353
response = Utilities.InitializeResponse();
@@ -60,7 +60,7 @@ public GetAzureRmLogTests(Xunit.Abstractions.ITestOutputHelper output)
6060
selected = s;
6161
});
6262

63-
insightsClientMock.SetupGet(f => f.Events).Returns(this.insightsEventOperationsMock.Object);
63+
MonitorClientMock.SetupGet(f => f.ActivityLogs).Returns(this.insightsEventOperationsMock.Object);
6464
}
6565

6666
[Fact]

src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmLogAlertRuleTests.cs

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

1515
using Microsoft.Azure.Commands.Insights.Alerts;
16-
using Microsoft.Azure.Management.Insights;
17-
using Microsoft.Azure.Management.Insights.Models;
16+
using Microsoft.Azure.Management.Monitor.Management;
17+
using Microsoft.Azure.Management.Monitor.Management.Models;
1818
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1919
using Moq;
2020
using System;
@@ -31,7 +31,7 @@ namespace Microsoft.Azure.Commands.Insights.Test.Alerts
3131
public class AddAzureRmLogAlertRuleTests
3232
{
3333
private readonly AddAzureRmLogAlertRuleCommand cmdlet;
34-
private readonly Mock<InsightsManagementClient> insightsManagementClientMock;
34+
private readonly Mock<MonitorManagementClient> insightsManagementClientMock;
3535
private readonly Mock<IAlertRulesOperations> insightsAlertRuleOperationsMock;
3636
private Mock<ICommandRuntime> commandRuntimeMock;
3737
private Rest.Azure.AzureOperationResponse<AlertRuleResource> response;
@@ -42,15 +42,21 @@ public AddAzureRmLogAlertRuleTests(ITestOutputHelper output)
4242
{
4343
// XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
4444
insightsAlertRuleOperationsMock = new Mock<IAlertRulesOperations>();
45-
insightsManagementClientMock = new Mock<InsightsManagementClient>();
45+
insightsManagementClientMock = new Mock<MonitorManagementClient>();
4646
commandRuntimeMock = new Mock<ICommandRuntime>();
4747
cmdlet = new AddAzureRmLogAlertRuleCommand()
4848
{
4949
CommandRuntime = commandRuntimeMock.Object,
50-
InsightsManagementClient = insightsManagementClientMock.Object
50+
MonitorManagementClient = insightsManagementClientMock.Object
51+
};
52+
53+
AlertRuleResource alertRuleResourceInput = new AlertRuleResource()
54+
{
55+
Location = null,
56+
IsEnabled = true,
57+
AlertRuleResourceName = "a name"
5158
};
5259

53-
AlertRuleResource alertRuleResourceInput = new AlertRuleResource(location: null, isEnabled: true, alertRuleResourceName: "a name");
5460
response = new Rest.Azure.AzureOperationResponse<AlertRuleResource>()
5561
{
5662
Body = alertRuleResourceInput

src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmMetricAlertRuleTests.cs

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

1515
using Microsoft.Azure.Commands.Insights.Alerts;
16-
using Microsoft.Azure.Management.Insights;
17-
using Microsoft.Azure.Management.Insights.Models;
16+
using Microsoft.Azure.Management.Monitor.Management;
17+
using Microsoft.Azure.Management.Monitor.Management.Models;
1818
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1919
using Moq;
2020
using System;
@@ -31,7 +31,7 @@ namespace Microsoft.Azure.Commands.Insights.Test.Alerts
3131
public class AddAzureRmMetricAlertRuleTests
3232
{
3333
private readonly AddAzureRmMetricAlertRuleCommand cmdlet;
34-
private readonly Mock<InsightsManagementClient> insightsManagementClientMock;
34+
private readonly Mock<MonitorManagementClient> insightsManagementClientMock;
3535
private readonly Mock<IAlertRulesOperations> insightsAlertRuleOperationsMock;
3636
private Mock<ICommandRuntime> commandRuntimeMock;
3737
private Rest.Azure.AzureOperationResponse<AlertRuleResource> response;
@@ -42,15 +42,21 @@ public AddAzureRmMetricAlertRuleTests(ITestOutputHelper output)
4242
{
4343
//XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
4444
insightsAlertRuleOperationsMock = new Mock<IAlertRulesOperations>();
45-
insightsManagementClientMock = new Mock<InsightsManagementClient>();
45+
insightsManagementClientMock = new Mock<MonitorManagementClient>();
4646
commandRuntimeMock = new Mock<ICommandRuntime>();
4747
cmdlet = new AddAzureRmMetricAlertRuleCommand()
4848
{
4949
CommandRuntime = commandRuntimeMock.Object,
50-
InsightsManagementClient = insightsManagementClientMock.Object
50+
MonitorManagementClient = insightsManagementClientMock.Object
51+
};
52+
53+
AlertRuleResource alertRuleResourceInput = new AlertRuleResource()
54+
{
55+
AlertRuleResourceName = "a name",
56+
Location = null,
57+
IsEnabled = true
5158
};
5259

53-
AlertRuleResource alertRuleResourceInput = new AlertRuleResource(alertRuleResourceName: "a name", location: null, isEnabled: true);
5460
response = new Rest.Azure.AzureOperationResponse<AlertRuleResource>()
5561
{
5662
Body = alertRuleResourceInput

src/ResourceManager/Insights/Commands.Insights.Test/Alerts/AddAzureRmWebtestAlertRuleTests.cs

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

1515
using Microsoft.Azure.Commands.Insights.Alerts;
16-
using Microsoft.Azure.Management.Insights;
17-
using Microsoft.Azure.Management.Insights.Models;
16+
using Microsoft.Azure.Management.Monitor.Management;
17+
using Microsoft.Azure.Management.Monitor.Management.Models;
1818
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1919
using Moq;
2020
using System;
@@ -31,7 +31,7 @@ namespace Microsoft.Azure.Commands.Insights.Test.Alerts
3131
public class AddAzureRmWebtestAlertRuleTests
3232
{
3333
private readonly AddAzureRmWebtestAlertRuleCommand cmdlet;
34-
private readonly Mock<InsightsManagementClient> insightsManagementClientMock;
34+
private readonly Mock<MonitorManagementClient> insightsManagementClientMock;
3535
private readonly Mock<IAlertRulesOperations> insightsAlertRuleOperationsMock;
3636
private Mock<ICommandRuntime> commandRuntimeMock;
3737
private Rest.Azure.AzureOperationResponse<AlertRuleResource> response;
@@ -42,15 +42,21 @@ public AddAzureRmWebtestAlertRuleTests(ITestOutputHelper output)
4242
{
4343
//XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
4444
insightsAlertRuleOperationsMock = new Mock<IAlertRulesOperations>();
45-
insightsManagementClientMock = new Mock<InsightsManagementClient>();
45+
insightsManagementClientMock = new Mock<MonitorManagementClient>();
4646
commandRuntimeMock = new Mock<ICommandRuntime>();
4747
cmdlet = new AddAzureRmWebtestAlertRuleCommand()
4848
{
4949
CommandRuntime = commandRuntimeMock.Object,
50-
InsightsManagementClient = insightsManagementClientMock.Object
50+
MonitorManagementClient = insightsManagementClientMock.Object
51+
};
52+
53+
AlertRuleResource alertRuleResourceInput = new AlertRuleResource()
54+
{
55+
Location = null,
56+
IsEnabled = true,
57+
AlertRuleResourceName = "a name"
5158
};
5259

53-
AlertRuleResource alertRuleResourceInput = new AlertRuleResource(location: null, isEnabled: true, alertRuleResourceName: "a name");
5460
response = new Rest.Azure.AzureOperationResponse<AlertRuleResource>()
5561
{
5662
Body = alertRuleResourceInput

0 commit comments

Comments
 (0)