Skip to content

Commit 723176f

Browse files
committed
Merge pull request #33 from markcowl/deprecate
Deprecate SubscriptionDataFile
2 parents bb51d60 + 6223788 commit 723176f

File tree

4 files changed

+4092
-4053
lines changed

4 files changed

+4092
-4053
lines changed

src/Common/Commands.Common/Common/SubscriptionCmdletBase.cs

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

1515
using System.Management.Automation;
1616
using Microsoft.WindowsAzure.Commands.Common;
17+
using Microsoft.WindowsAzure.Commands.Common.Properties;
1718
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1819

1920
namespace Microsoft.WindowsAzure.Commands.Utilities.Profile
@@ -25,7 +26,7 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.Profile
2526
/// </summary>
2627
public abstract class SubscriptionCmdletBase : AzurePSCmdlet
2728
{
28-
[Parameter(Mandatory = false, HelpMessage = "File storing subscription data, if not set uses default.")]
29+
[Parameter(Mandatory = false, HelpMessage = "[Deprecated]: File storing subscription data, if not set uses default.")]
2930
public string SubscriptionDataFile { get; set; }
3031

3132
private readonly bool _saveProfile;
@@ -40,6 +41,7 @@ protected override void BeginProcessing()
4041
if (!string.IsNullOrEmpty(SubscriptionDataFile))
4142
{
4243
ProfileClient = new ProfileClient(SubscriptionDataFile);
44+
WriteWarning(Resources.SubscriptionDataFileDeprecated);
4345
}
4446
else
4547
{

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

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

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,4 +1573,7 @@ use and privacy statement at &lt;url&gt; and (c) agree to sharing my contact inf
15731573
<data name="RemoveProfileMessage" xml:space="preserve">
15741574
<value>Removing the Azure profile</value>
15751575
</data>
1576+
<data name="SubscriptionDataFileDeprecated" xml:space="preserve">
1577+
<value>The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.</value>
1578+
</data>
15761579
</root>

0 commit comments

Comments
 (0)