Skip to content

Commit 45bb38e

Browse files
authored
Merge pull request #616 from Azure/dev
huangpf PR: dev <- Azure:dev
2 parents c686737 + 1f46316 commit 45bb38e

File tree

151 files changed

+19386
-10093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+19386
-10093
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2016.09.16 version 2.2.0
2+
* Network
3+
- New switch parameter added for network interface to enable/Disable accelerated networking -New-AzureRmNetworkInterface -EnableAcceleratedNetworking
4+
15
## 2016.09.08 version 2.1.0
26
* Compute
37
* Add support for querying encryption status from the AzureDiskEncryptionForLinux extension

src/ResourceManager/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledRunbookTest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ public void RegisterAzureAutomationScheduledRunbookSuccessfull()
5050
string accountName = "automation";
5151
string runbookName = "runbook";
5252
string scheduleName = "schedule";
53+
string runOn = "hybridWorkerGroup";
5354

5455
this.mockAutomationClient.Setup(
55-
f => f.RegisterScheduledRunbook(resourceGroupName, accountName, runbookName, scheduleName, null));
56+
f => f.RegisterScheduledRunbook(resourceGroupName, accountName, runbookName, scheduleName, null, runOn));
5657

5758
// Test
5859
this.cmdlet.ResourceGroupName = resourceGroupName;
@@ -62,7 +63,7 @@ public void RegisterAzureAutomationScheduledRunbookSuccessfull()
6263
this.cmdlet.ExecuteCmdlet();
6364

6465
// Assert
65-
this.mockAutomationClient.Verify(f => f.RegisterScheduledRunbook(resourceGroupName, accountName, runbookName, scheduleName, null), Times.Once());
66+
this.mockAutomationClient.Verify(f => f.RegisterScheduledRunbook(resourceGroupName, accountName, runbookName, scheduleName, null, runOn), Times.Once());
6667
}
6768
}
6869
}

src/ResourceManager/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,23 @@ public class RegisterAzureAutomationScheduledRunbook : AzureAutomationBaseCmdlet
5151
HelpMessage = "The runbook parameters.")]
5252
public IDictionary Parameters { get; set; }
5353

54+
/// <summary>
55+
/// Gets or sets the optional hybrid agent friendly name upon which the runbook should be executed.
56+
/// </summary>
57+
[Alias("HybridWorker")]
58+
[Parameter(ParameterSetName = AutomationCmdletParameterSets.ByRunbookNameAndScheduleName, Mandatory = false, ValueFromPipelineByPropertyName = true,
59+
HelpMessage = "The name of the hybrid runbook worker group.")]
60+
public string RunOn { get; set; }
61+
5462
/// <summary>
5563
/// Execute this cmdlet.
5664
/// </summary>
5765
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
5866
protected override void AutomationProcessRecord()
59-
{
60-
JobSchedule jobSchedule;
61-
62-
jobSchedule = this.AutomationClient.RegisterScheduledRunbook(
63-
this.ResourceGroupName, this.AutomationAccountName, this.RunbookName, this.ScheduleName, this.Parameters);
64-
67+
{
68+
var jobSchedule = this.AutomationClient.RegisterScheduledRunbook(
69+
this.ResourceGroupName, this.AutomationAccountName, this.RunbookName, this.ScheduleName, this.Parameters, this.RunOn);
70+
6571
this.WriteObject(jobSchedule);
6672
}
6773
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ public IEnumerable<JobSchedule> ListJobSchedulesByScheduleName(string resourceGr
15071507
}
15081508

15091509
public JobSchedule RegisterScheduledRunbook(string resourceGroupName, string automationAccountName, string runbookName,
1510-
string scheduleName, IDictionary parameters)
1510+
string scheduleName, IDictionary parameters, string runOn)
15111511
{
15121512
var processedParameters = this.ProcessRunbookParameters(resourceGroupName, automationAccountName, runbookName, parameters);
15131513
var sdkJobSchedule = this.automationManagementClient.JobSchedules.Create(
@@ -1519,7 +1519,8 @@ public JobSchedule RegisterScheduledRunbook(string resourceGroupName, string aut
15191519
{
15201520
Schedule = new ScheduleAssociationProperty { Name = scheduleName },
15211521
Runbook = new RunbookAssociationProperty { Name = runbookName },
1522-
Parameters = processedParameters
1522+
Parameters = processedParameters,
1523+
RunOn = runOn
15231524
}
15241525
}).JobSchedule;
15251526

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ IEnumerable<JobStream> GetJobStream(string resourceGroupName, string automationA
291291
IEnumerable<JobSchedule> ListJobSchedulesByRunbookName(string resourceGroupName, string automationAccountName, string runbookName);
292292

293293
IEnumerable<JobSchedule> ListJobSchedulesByScheduleName(string resourceGroupName, string automationAccountName, string scheduleName);
294-
295-
JobSchedule RegisterScheduledRunbook(string resourceGroupName, string automationAccountName, string runbookName, string scheduleName, IDictionary parameters);
294+
295+
JobSchedule RegisterScheduledRunbook(string resourceGroupName, string automationAccountName, string runbookName, string scheduleName, IDictionary parameters, string RunOn);
296296

297297
void UnregisterScheduledRunbook(string resourceGroupName, string automationAccountName, Guid jobScheduleId);
298298

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public JobSchedule(string resourceGroupName, string automationAccountName, Azure
4646
this.RunbookName = jobSchedule.Properties.Runbook.Name;
4747
this.ScheduleName = jobSchedule.Properties.Schedule.Name;
4848
this.Parameters = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
49+
this.RunOn = jobSchedule.Properties.RunOn;
4950
foreach (var kvp in jobSchedule.Properties.Parameters.Where(kvp => 0 != String.Compare(kvp.Key, Constants.JobStartedByParameterName, CultureInfo.InvariantCulture,
5051
CompareOptions.IgnoreCase)))
5152
{
@@ -65,6 +66,8 @@ public JobSchedule()
6566
/// </summary>
6667
public string ResourceGroupName { get; set; }
6768

69+
public string RunOn { get; set; }
70+
6871
/// <summary>
6972
/// Gets or sets the automation account name.
7073
/// </summary>

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.13.0.4-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<SpecificVersion>False</SpecificVersion>
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.6.1.1-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
70+
71+
<Reference Include="Microsoft.Azure.Management.Network, Version=7.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
72+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.7.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
7373
<Private>True</Private>
7474
</Reference>
7575
<Reference Include="Microsoft.Azure.Management.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -398,6 +398,12 @@
398398
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineNetworkInterfaceTests\TestVirtualMachineSingleNetworkInterface.json">
399399
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
400400
</None>
401+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineNetworkInterfaceTests\TestVirtualMachineSingleNetworkInterfaceWithAcceleratedNetworking.json">
402+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
403+
</None>
404+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineNetworkInterfaceTests\TestVMNicWithAcceleratedNetworkingValidations.json">
405+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
406+
</None>
401407
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineProfileTests\TestVirtualMachineProfileWithoutAUC.json">
402408
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
403409
</None>

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineNetworkInterfaceTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,19 @@ public void TestEffectiveRoutesAndNsg()
5959
{
6060
ComputeTestController.NewInstance.RunPsTest("Test-EffectiveRoutesAndNsg");
6161
}
62+
63+
[Fact]
64+
[Trait(Category.AcceptanceType, Category.CheckIn)]
65+
public void TestVirtualMachineSingleNetworkInterfaceWithAcceleratedNetworking()
66+
{
67+
ComputeTestController.NewInstance.RunPsTest("Test-SingleNetworkInterfaceWithAcceleratedNetworking");
68+
}
69+
70+
[Fact]
71+
[Trait(Category.AcceptanceType, Category.CheckIn)]
72+
public void TestVMNicWithAcceleratedNetworkingValidations()
73+
{
74+
ComputeTestController.NewInstance.RunPsTest("Test-VMNicWithAcceleratedNetworkingValidations");
75+
}
6276
}
6377
}

0 commit comments

Comments
 (0)