Skip to content

Commit d3743a2

Browse files
committed
Export cmdlets and fix bugs
1 parent 0ea9a21 commit d3743a2

15 files changed

+26
-14
lines changed

src/Resources/ResourceManager/Implementation/DeploymentStacks/GetAzResourceGroupDeploymentStack.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.DeploymentStacks
1616
{
17+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
1718
using System;
1819
using System.Collections.Generic;
1920
using System.Management.Automation;
2021
using System.Text;
2122

22-
[Cmdlet("Get", Common.AzureRMConstants.AzureRMPrefix + "DeploymentStack",
23+
[Cmdlet("Get", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStack",
2324
DefaultParameterSetName = GetAzResourceGroupDeploymentStack.ListDeploymentStack), OutputType(typeof(PSDeploymentStack))]
2425
public class GetAzResourceGroupDeploymentStack : DeploymentStacksCmdletBase
2526
{

src/Resources/ResourceManager/Implementation/DeploymentStacks/GetAzResourceGroupDeploymentStackSnapshot.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.DeploymentStacks
1616
{
17+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
1718
using System;
1819
using System.Collections.Generic;
1920
using System.Management.Automation;
2021
using System.Text;
2122

22-
[Cmdlet("Get", Common.AzureRMConstants.AzureRMPrefix + "DeploymentStack",
23+
[Cmdlet("Get", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStackSnapshot",
2324
DefaultParameterSetName = GetAzResourceGroupDeploymentStackSnapshot.ListDeploymentStack), OutputType(typeof(PSDeploymentStack))]
2425
public class GetAzResourceGroupDeploymentStackSnapshot : DeploymentStacksCmdletBase
2526
{

src/Resources/ResourceManager/Implementation/DeploymentStacks/GetAzSubscriptionDeploymentStackSnapshot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public override void ExecuteCmdlet()
5050
WriteObject(DeploymentStacksSdkClient.GetSubscriptionDeploymentStackSnapshot(Name, SnapshotName));
5151
break;
5252
case GetByResourceIdParameterSetName:
53-
WriteObject(DeploymentStacksSdkClient.GetSubscriptionDeploymentStackSnapshot(ResourceIdUtility.GetResourceName(ResourceId)));
53+
WriteObject(DeploymentStacksSdkClient.GetSubscriptionDeploymentStackSnapshot(ResourceIdUtility.GetResourceName(ResourceId), SnapshotName));
5454
break;
5555
case ListParameterSetname:
5656
WriteObject(DeploymentStacksSdkClient.ListSubscriptionDeploymentStackSnapshot(Name));

src/Resources/ResourceManager/Implementation/DeploymentStacks/NewAzResourceGroupDeploymentStack.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
22
{
3+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
34
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
45
using Microsoft.WindowsAzure.Commands.Utilities.Common;
56
using System;

src/Resources/ResourceManager/Implementation/DeploymentStacks/NewAzSubscriptionDeploymentStack.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
22
{
3+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
34
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
45
using Microsoft.WindowsAzure.Commands.Utilities.Common;
56
using System;
@@ -10,7 +11,7 @@
1011
using System.Text;
1112
using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources;
1213

13-
[Cmdlet("New", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStack",
14+
[Cmdlet("New", Common.AzureRMConstants.AzureRMPrefix + "SubscriptionDeploymentStack",
1415
SupportsShouldProcess = true, DefaultParameterSetName = NewAzSubscriptionDeploymentStack.ParameterlessTemplateFileParameterSetName), OutputType(typeof(PSDeploymentStack))]
1516
public class NewAzSubscriptionDeploymentStack : DeploymentStacksCmdletBase
1617
{

src/Resources/ResourceManager/Implementation/DeploymentStacks/RemoveAzResourceGroupDeploymentStackSnapshot.cs

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

77
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
88
{
9-
[Cmdlet("Remove", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStack",
9+
[Cmdlet("Remove", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStackSnapshot",
1010
SupportsShouldProcess = true, DefaultParameterSetName = RemoveAzResourceGroupDeploymentStackSnapshot.RemoveByResourceIdParameterSetName), OutputType(typeof(bool))]
1111
public class RemoveAzResourceGroupDeploymentStackSnapshot : DeploymentStacksCmdletBase
1212
{

src/Resources/ResourceManager/Implementation/DeploymentStacks/RemoveAzSubscriptionDeploymentStackSnapshot.cs

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

77
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
88
{
9-
[Cmdlet("Remove", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStack",
9+
[Cmdlet("Remove", Common.AzureRMConstants.AzureRMPrefix + "SubscriptionDeploymentStackSnapshot",
1010
SupportsShouldProcess = true, DefaultParameterSetName = RemoveAzSubscriptionDeploymentStackSnapshot.RemoveByResourceIdParameterSetName), OutputType(typeof(bool))]
1111
public class RemoveAzSubscriptionDeploymentStackSnapshot : DeploymentStacksCmdletBase
1212
{

src/Resources/ResourceManager/Implementation/DeploymentStacks/SetAzResourceGroupDeploymentStack.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
22
{
3+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
34
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
45
using Microsoft.WindowsAzure.Commands.Utilities.Common;
56
using System;

src/Resources/ResourceManager/Implementation/DeploymentStacks/SetAzSubscriptionDeploymentStack.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
22
{
3+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
34
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
45
using Microsoft.WindowsAzure.Commands.Utilities.Common;
56
using System;
@@ -10,7 +11,7 @@
1011
using System.Text;
1112
using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources;
1213

13-
[Cmdlet("Set", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStack",
14+
[Cmdlet("Set", Common.AzureRMConstants.AzureRMPrefix + "SubscriptionDeploymentStack",
1415
SupportsShouldProcess = true, DefaultParameterSetName = SetAzSubscriptionDeploymentStack.ParameterlessTemplateFileParameterSetName), OutputType(typeof(PSDeploymentStack))]
1516
public class SetAzSubscriptionDeploymentStack : DeploymentStacksCmdletBase
1617
{

src/Resources/ResourceManager/ResourceManager.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="AutoMapper" Version="6.2.2" />
16-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="3.14.2-stacks" />
16+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="3.14.3-stacks" />
1717
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
1818
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
1919
</ItemGroup>

src/Resources/Resources.Test/Providers/RegisterResourceProviderCmdletTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void RegisterResourceProviderTests()
110110
var registrationResult = provider;
111111

112112
this.providerOperationsMock
113-
.Setup(client => client.RegisterWithHttpMessagesAsync(It.IsAny<string>(), null, It.IsAny<CancellationToken>()))
113+
.Setup(client => client.RegisterWithHttpMessagesAsync(It.IsAny<string>(), null, null, It.IsAny<CancellationToken>()))
114114
.Callback((string providerName, Dictionary<string, List<string>> customHeaders, CancellationToken ignored) =>
115115
Assert.Equal(ProviderName, providerName, StringComparer.OrdinalIgnoreCase))
116116
.Returns(() => Task.FromResult(new AzureOperationResponse<Provider>() {
@@ -161,7 +161,7 @@ public void RegisterResourceProviderTests()
161161
/// </summary>
162162
private void VerifyCallPatternAndReset(bool succeeded)
163163
{
164-
this.providerOperationsMock.Verify(f => f.RegisterWithHttpMessagesAsync(It.IsAny<string>(), null, It.IsAny<CancellationToken>()), Times.Once());
164+
this.providerOperationsMock.Verify(f => f.RegisterWithHttpMessagesAsync(It.IsAny<string>(), null, null, It.IsAny<CancellationToken>()), Times.Once());
165165
this.commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny<object>()), succeeded ? Times.Once() : Times.Never());
166166

167167
this.providerOperationsMock.ResetCalls();

src/Resources/Resources.Test/Resources.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Update="Microsoft.Azure.Management.ResourceManager" Version="3.14.2-stacks" />
35+
<PackageReference Update="Microsoft.Azure.Management.ResourceManager" Version="3.14.3-stacks" />
3636
</ItemGroup>
3737
<ItemGroup>
3838
<PackageReference Include="FluentAssertions" Version="5.9.0" />

src/Resources/Resources/Az.Resources.psd1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ CmdletsToExport = 'Get-AzProviderOperation', 'Remove-AzRoleAssignment',
152152
'Get-AzManagementGroupDeploymentWhatIfResult',
153153
'Get-AzTenantDeploymentWhatIfResult', 'Get-AzTemplateSpec',
154154
'New-AzTemplateSpec', 'Set-AzTemplateSpec', 'Export-AzTemplateSpec',
155-
'Remove-AzTemplateSpec'
155+
'Remove-AzTemplateSpec', 'Get-AzResourceGroupDeploymentStack',
156+
'Get-AzResourceGroupDeploymentStackSnapshot', 'Get-AzSubscriptionDeploymentStack',
157+
'Get-AzSubscriptionDeploymentStackSnapshot', 'New-AzResourceGroupDeploymentStack',
158+
'New-AzSubscriptionDeploymentStack', 'Remove-AzResourceGroupDeploymentStack',
159+
'Remove-AzResourceGroupDeploymentStackSnapshot', 'Remove-AzSubscriptionDeploymentStack',
160+
'Remove-AzSubscriptionDeploymentStackSnapshot', 'Set-AzResourceGroupDeploymentStack',
161+
'Set-AzSubscriptionDeploymentStack'
156162

157163
# Variables to export from this module
158164
# VariablesToExport = @()

src/Resources/Resources/Models.ResourceGroups/ResourcesExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static PSResource ToPSResource(this GenericResource resource, ResourcesCl
6868
};
6969
}
7070

71-
public static PSPermission ToPSPermission(this Permission permission)
71+
public static PSPermission ToPSPermission(this Management.Authorization.Models.Permission permission)
7272
{
7373
return new PSPermission
7474
{

src/Resources/Resources/Resources.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.8.0-preview" />
1515
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.12.0-preview" />
1616
<PackageReference Include="Microsoft.Azure.Management.ManagementGroups" Version="1.1.1-preview" />
17-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="3.14.2-stacks" />
17+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="3.14.3-stacks" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)