Skip to content

Commit 0e2dd8d

Browse files
committed
Removing StartedBy param addition. Adding StartedBy property to job object and assigning the value from the SDK model.
1 parent 07ae246 commit 0e2dd8d

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/ResourceManager/Automation/Commands.Automation/Common/AutomationClient.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,15 +1637,6 @@ private IDictionary<string, string> ProcessRunbookParameters(string resourceGrou
16371637
string.Format(CultureInfo.CurrentCulture, Resources.InvalidRunbookParameters));
16381638
}
16391639

1640-
var hasJobStartedBy =
1641-
filteredParameters.Any(filteredParameter => filteredParameter.Key == Constants.JobStartedByParameterName);
1642-
1643-
if (!hasJobStartedBy)
1644-
{
1645-
filteredParameters.Add(Constants.JobStartedByParameterName,
1646-
PowerShellJsonConverter.Serialize(Constants.ClientIdentity));
1647-
}
1648-
16491640
return filteredParameters;
16501641
}
16511642

src/ResourceManager/Automation/Commands.Automation/Model/Job.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public Job(string resourceGroupName, string accountName, Azure.Management.Automa
6161
this.EndTime = job.Properties.EndTime.HasValue ? job.Properties.EndTime.Value.ToLocalTime() : (DateTimeOffset?) null;
6262
this.LastStatusModifiedTime = job.Properties.LastStatusModifiedTime;
6363
this.HybridWorker = job.Properties.RunOn;
64+
this.StartedBy = job.Properties.StartedBy;
6465
this.JobParameters = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
6566
foreach (var kvp in job.Properties.Parameters)
6667
{
@@ -161,5 +162,10 @@ public Job()
161162
/// Gets or sets the HybridWorker.
162163
/// </summary>
163164
public string HybridWorker { get; set; }
165+
166+
/// <summary>
167+
/// Gets or sets the StartedBy property.
168+
/// </summary>
169+
public string StartedBy { get; set; }
164170
}
165171
}

0 commit comments

Comments
 (0)