Skip to content

Commit e696d66

Browse files
author
Jianghao Lu
committed
Merge pull request #853 from vivsriaus/MoreWarnings
More warning messages for upcoming changes in ARM cmdlets
2 parents 7fcccb5 + c050447 commit e696d66

16 files changed

+26
-172
lines changed

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@
186186
<Compile Include="Providers\RegisterResourceProviderCmdletTests.cs" />
187187
<Compile Include="Providers\UnregisterResourceProviderCmdletTests.cs" />
188188
<Compile Include="ResourceGroupDeployments\RemoveAzureResourceGroupDeploymentCommandTests.cs" />
189-
<Compile Include="ResourceGroups\GetAzureResourceGroupLogCommandTests.cs" />
190189
<Compile Include="ResourceGroups\GetAzureLocationCommandTests.cs" />
191190
<Compile Include="ResourceGroups\SetAzureResourceGroupCommandTests.cs" />
192191
<Compile Include="ScenarioTests\ActiveDirectoryTests.cs" />
@@ -474,7 +473,7 @@
474473
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests\TestSetAResourceTest.json">
475474
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
476475
</None>
477-
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests\RaAuthorizationChangeLog.json">
476+
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests\RaAuthorizationChangeLog.json">
478477
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
479478
</None>
480479
<None Include="SessionRecords\Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests\RaByResource.json">

src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@
203203
<Compile Include="Providers\RegisterAzureProviderCmdlet.cs" />
204204
<Compile Include="Providers\UnregisterAzureProviderCmdlet.cs" />
205205
<Compile Include="ResourceGroupDeployments\RemoveAzureResourceGroupDeploymentCommand.cs" />
206-
<Compile Include="ResourceGroups\GetAzureResourceGroupLogCommand.cs" />
207206
<Compile Include="ResourceGroups\GetAzureLocationCommand.cs" />
208207
<Compile Include="ResourceGroups\SetAzureResourceGroupCommand.cs" />
209208
<Compile Include="RoleAssignments\RemoveAzureRoleAssignmentCommand.cs" />

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ public override void ExecuteCmdlet()
4747
new List<string>() { ProvisioningState }
4848
};
4949

50-
if(!string.IsNullOrEmpty(Name))
50+
if(!string.IsNullOrEmpty(ProvisioningState))
5151
{
52-
WriteWarning("The parameter 'Name' in Get-AzureResourceGroupDeployment cmdlet is being renamed to DeploymentName and will be updated in a future release.");
52+
WriteWarning("The ProvisioningState parameter is being deprecated and will be removed in a future release.");
5353
}
54-
5554
WriteObject(ResourcesClient.FilterResourceGroupDeployments(options), true);
5655
}
5756
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public override void ExecuteCmdlet()
6161
StorageAccountName = StorageAccountName
6262
};
6363

64-
if(!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName))
64+
if (!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName) || !string.IsNullOrEmpty(GalleryTemplateIdentity))
6565
{
66-
WriteWarning("The TemplateVersion and StorageAccountName parameters in New-AzureResourceGroupDeployment cmdlet is being deprecated and will be removed in a future release.");
66+
WriteWarning("The GalleryTemplateIdentity, TemplateVersion and StorageAccountName parameters in New-AzureResourceGroupDeployment cmdlet is being deprecated and will be removed in a future release.");
6767
}
6868

6969
if(this.Mode == DeploymentMode.Complete)

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public override void ExecuteCmdlet()
5050

5151
if (PassThru)
5252
{
53+
WriteWarning("The PassThru switch parameter is being deprecated and will be removed in a future release.");
5354
WriteObject(true);
5455
}
5556
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public override void ExecuteCmdlet()
5050

5151
if (PassThru)
5252
{
53+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
5354
WriteObject(true);
5455
}
5556
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureLocationCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureLocationCommand : ResourcesBaseCmdlet, IModuleAssemblyIniti
2929
{
3030
public override void ExecuteCmdlet()
3131
{
32+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
3233
WriteObject(ResourcesClient.GetLocations(), true);
3334
}
3435

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ public class GetAzureResourceGroupCommand : ResourcesBaseCmdlet
3838

3939
public override void ExecuteCmdlet()
4040
{
41+
if(this.Tag != null)
42+
{
43+
WriteWarning("The Tag parameter is being deprecated and will be removed in a future release.");
44+
}
45+
if(this.Detailed.IsPresent)
46+
{
47+
WriteWarning("The Detailed switch parameter is being deprecated and will be removed in a future release.");
48+
}
49+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
4150
var detailed = Detailed.IsPresent || !string.IsNullOrEmpty(Name);
4251
WriteObject(ResourcesClient.FilterResourceGroups(Name, Tag, detailed), true);
4352
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public override void ExecuteCmdlet()
6767
{
6868
WriteWarning("The deployment parameters in New-AzureResourceGroup cmdlet is being deprecated and will be removed in a future release. Please use New-AzureResourceGroupDeployment to submit deployments.");
6969
}
70+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
7071
WriteObject(ResourcesClient.CreatePSResourceGroup(parameters));
7172
}
7273
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public override void ExecuteCmdlet()
4646

4747
if (PassThru)
4848
{
49+
WriteWarning("The PassThru switch parameter is being deprecated and will be removed in a future release.");
4950
WriteObject(true);
5051
}
5152
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public override void ExecuteCmdlet()
4040
ResourceGroupName = Name,
4141
Tag = Tag
4242
};
43-
43+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
4444
WriteObject(ResourcesClient.UpdatePSResourceGroup(parameters));
4545
}
4646
}

src/ResourceManager/Resources/Commands.Resources/Templates/GetAzureResourceGroupGalleryTemplateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class GetAzureResourceGroupGalleryTemplateCommand : ResourcesBaseCmdlet
4949

5050
public override void ExecuteCmdlet()
5151
{
52+
WriteWarning("This cmdlet is being deprecated and will be removed in a future release.");
5253
FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions()
5354
{
5455
Category = Category,

src/ResourceManager/Resources/Commands.Resources/Templates/SaveAzureResourceGroupGalleryTemplateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class SaveAzureResourceGroupGalleryTemplateCommand : ResourcesBaseCmdlet
3737

3838
public override void ExecuteCmdlet()
3939
{
40+
WriteWarning("This cmdlet is being deprecated and will be removed in a future release.");
4041
string path = GalleryTemplatesClient.DownloadGalleryTemplateFile(
4142
Identity,
4243
string.IsNullOrEmpty(Path) ? System.IO.Path.Combine(CurrentPath(), Identity) : this.TryResolvePath(Path),

src/ResourceManager/Resources/Commands.Resources/Templates/TestAzureResourceGroupTemplateCommand.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public TestAzureResourceGroupTemplateCommand()
4141
public override void ExecuteCmdlet()
4242
{
4343
this.WriteWarning("The Test-AzureResourceGroupTemplate cmdlet is being renamed to Test-AzureResourceGroupDeployment in a future release.");
44+
if (!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName) || !string.IsNullOrEmpty(GalleryTemplateIdentity))
45+
{
46+
WriteWarning("The GalleryTemplateIdentity, TemplateVersion and StorageAccountName parameters are being deprecated and will be removed in a future release.");
47+
}
4448
ValidatePSResourceGroupDeploymentParameters parameters = new ValidatePSResourceGroupDeploymentParameters()
4549
{
4650
ResourceGroupName = ResourceGroupName,

0 commit comments

Comments
 (0)