Skip to content

Commit f97b507

Browse files
committed
Merge pull request Azure#813 from shefaliv/dev
HDI: add warning to ASM cmdlets
2 parents e9b4b17 + 63d7b44 commit f97b507

29 files changed

+31
-0
lines changed

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightConfigValuesCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ protected override void EndProcessing()
161161
{
162162
try
163163
{
164+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
164165
this.command.EndProcessing().Wait();
165166
foreach (AzureHDInsightConfig output in this.command.Output)
166167
{

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ protected override void EndProcessing()
106106
{
107107
try
108108
{
109+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
109110
this.command.EndProcessing().Wait();
110111
foreach (AzureHDInsightConfig output in this.command.Output)
111112
{

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightScriptActionCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ protected override void EndProcessing()
105105
{
106106
try
107107
{
108+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
108109
this.command.EndProcessing().Wait();
109110
foreach (AzureHDInsightConfig output in this.command.Output)
110111
{

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ protected override void EndProcessing()
8282
{
8383
try
8484
{
85+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
8586
this.command.EndProcessing().Wait();
8687
foreach (AzureHDInsightConfig output in this.command.Output)
8788
{

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public abstract class AzureHDInsightCmdlet : AzurePSCmdlet
3838

3939
private ILogWriter logger;
4040

41+
4142
/// <summary>
4243
/// Gets or sets a value indicating whether logging should be enabled.
4344
/// </summary>

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHdInsightPowerShellHardCodes.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,8 @@ internal class AzureHdInsightPowerShellConstants
104104
public const string Show = "Show";
105105
public const string Skip = "Skip";
106106
public const string ToDateTime = "To";
107+
108+
public const string AsmWarning =
109+
"WARNING: The Azure Service Management (ASM) cmdlets for HDInsight are deprecated and will be non-default in a future release, and they will be removed soon thereafter. Please use Switch-AzureMode AzureResourceManager to use the Azure Resource Manager cmdlets for HDInsight.";
107110
}
108111
}

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightClusterCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ protected override void EndProcessing()
108108
{
109109
try
110110
{
111+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
111112
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
112113
this.command.Logger = this.Logger;
113114
Task task = this.command.EndProcessing();

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ protected override void EndProcessing()
128128
{
129129
try
130130
{
131+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
131132
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
132133
this.command.Logger = this.Logger;
133134
Task task = this.command.EndProcessing();

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobOutputCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public string TaskLogsDirectory
140140
/// <inheritdoc />
141141
protected override void EndProcessing()
142142
{
143+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
143144
this.command.Logger = this.Logger;
144145
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
145146
this.AssertTaskLogsDirectorySpecified(this.TaskLogsDirectory);

src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightPropertiesCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public string Subscription
106106
/// </summary>
107107
protected override void EndProcessing()
108108
{
109+
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
109110
this.command.Logger = this.Logger;
110111
try
111112
{

0 commit comments

Comments
 (0)