Skip to content

Commit ccbb5f5

Browse files
author
Shefali
committed
renaming ClusterCredential to HttpCredential
1 parent c08da62 commit ccbb5f5

File tree

8 files changed

+19
-13
lines changed

8 files changed

+19
-13
lines changed

src/ResourceManager/HDInsight/Commands.HDInsight.Test/UnitTests/JobTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public void StartJob()
203203
{
204204
CommandRuntime = commandRuntimeMock.Object,
205205
HDInsightJobClient = hdinsightJobManagementMock.Object,
206-
ClusterCredential = new PSCredential("httpuser", string.Format("Password1!").ConvertToSecureString()),
206+
HttpCredential = new PSCredential("httpuser", string.Format("Password1!").ConvertToSecureString()),
207207
ClusterName = ClusterName
208208
};
209209

@@ -245,7 +245,7 @@ public void StartJob()
245245
JobDetail = new JobDetailRootJsonObject
246246
{
247247
Completed = "false",
248-
User = cmdlet.ClusterCredential.UserName,
248+
User = cmdlet.HttpCredential.UserName,
249249
Id = jobid
250250
}
251251
};

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public string ClusterName
3939
[Parameter(Mandatory = true,
4040
Position = 1,
4141
HelpMessage = "The credentials with which to connect to the cluster.")]
42-
public PSCredential ClusterCredential
42+
[Alias("ClusterCredential")]
43+
public PSCredential HttpCredential
4344
{
4445
get
4546
{

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public string ClusterName
6060
[Parameter(Mandatory = true,
6161
Position = 5,
6262
HelpMessage = "The credentials with which to connect to the cluster.")]
63-
public PSCredential ClusterCredential
63+
[Alias("ClusterCredential")]
64+
public PSCredential HttpCredential
6465
{
6566
get
6667
{

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/InvokeHiveCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected override void ProcessRecord()
109109
//get variables from session
110110
var clusterConnection = SessionState.PSVariable.Get(UseAzureHDInsightClusterCommand.ClusterEndpoint).Value.ToString();
111111
var clusterCred =
112-
(PSCredential) SessionState.PSVariable.Get(UseAzureHDInsightClusterCommand.ClusterCred).Value;
112+
(PSCredential)SessionState.PSVariable.Get(UseAzureHDInsightClusterCommand.ClusterCred).Value;
113113
var resourceGroup =
114114
SessionState.PSVariable.Get(UseAzureHDInsightClusterCommand.CurrentResourceGroup).Value.ToString();
115115

@@ -137,7 +137,7 @@ protected override void ProcessRecord()
137137
ClusterName = clusterConnection,
138138
ResourceGroupName = resourceGroup,
139139
JobDefinition = hivejob,
140-
ClusterCredential = clusterCred
140+
HttpCredential = clusterCred
141141
};
142142

143143
var jobCreationResult = startJobCommand.SubmitJob();
@@ -148,7 +148,7 @@ protected override void ProcessRecord()
148148
WriteProgress(new ProgressRecord(0, "Waiting for job to complete", "In Progress"));
149149
var waitJobCommand = new WaitAzureHDInsightJobCommand
150150
{
151-
ClusterCredential = clusterCred,
151+
HttpCredential = clusterCred,
152152
ResourceGroupName = resourceGroup,
153153
ClusterName = clusterConnection,
154154
JobId = jobid
@@ -161,7 +161,7 @@ protected override void ProcessRecord()
161161
//get job output
162162
var getOutputCommand = new GetAzureHDInsightJobOutputCommand
163163
{
164-
ClusterCredential = clusterCred,
164+
HttpCredential = clusterCred,
165165
ResourceGroupName = resourceGroup,
166166
ClusterName = clusterConnection,
167167
DefaultContainer = DefaultContainer,

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public string ClusterName
4848
[Parameter(Mandatory = true,
4949
Position = 2,
5050
HelpMessage = "The credentials with which to connect to the cluster.")]
51-
public PSCredential ClusterCredential
51+
[Alias("ClusterCredential")]
52+
public PSCredential HttpCredential
5253
{
5354
get
5455
{

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public string ClusterName
4545
[Parameter(Mandatory = true,
4646
Position = 2,
4747
HelpMessage = "The credentials with which to connect to the cluster.")]
48-
public PSCredential ClusterCredential
48+
[Alias("ClusterCredential")]
49+
public PSCredential HttpCredential
4950
{
5051
get
5152
{

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public class UseAzureHDInsightClusterCommand : HDInsightCmdletBase
4343
[Parameter(Mandatory = true,
4444
Position = 1,
4545
HelpMessage = "The credentials with which to connect to the cluster.")]
46-
public PSCredential ClusterCredential
46+
[Alias("ClusterCredential")]
47+
public PSCredential HttpCredential
4748
{
4849
get
4950
{
@@ -76,7 +77,7 @@ protected override void ProcessRecord()
7677
var httpEndpoint = GetClusterConnection(ResourceGroupName, ClusterName);
7778

7879
SessionState.PSVariable.Set(ClusterEndpoint, httpEndpoint);
79-
SessionState.PSVariable.Set(ClusterCred, ClusterCredential);
80+
SessionState.PSVariable.Set(ClusterCred, HttpCredential);
8081
SessionState.PSVariable.Set(CurrentResourceGroup, ResourceGroupName);
8182

8283
WriteObject(string.Format("Successfully connected to cluster {0} in resource group {1}", ClusterName,

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public string ClusterName
4545
[Parameter(Mandatory = true,
4646
Position = 2,
4747
HelpMessage = "The credentials with which to connect to the cluster.")]
48-
public PSCredential ClusterCredential
48+
[Alias("ClusterCredential")]
49+
public PSCredential HttpCredential
4950
{
5051
get
5152
{

0 commit comments

Comments
 (0)