Skip to content

Commit 6568dea

Browse files
authored
Merge pull request Azure#5060 from zhangyd2015/preview
[DataFactory] Add Integration Runtime Cmdlets.
2 parents c6ca818 + 57b6b4b commit 6568dea

27 files changed

+2174
-678
lines changed

src/ResourceManager/DataFactories/AzureRM.DataFactoryV2.psd1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ CmdletsToExport =
104104
'Stop-AzureRmDataFactoryV2IntegrationRuntime',
105105
'Get-AzureRmDataFactoryV2IntegrationRuntimeMetric',
106106
'Remove-AzureRmDataFactoryV2IntegrationRuntimeNode',
107+
'Update-AzureRmDataFactoryV2IntegrationRuntimeNode',
108+
'Get-AzureRmDataFactoryV2IntegrationRuntimeNode',
109+
'Invoke-AzureRmDataFactoryV2IntegrationRuntimeUpgrade',
107110
'Sync-AzureRmDataFactoryV2IntegrationRuntimeCredential',
111+
'Update-AzureRmDataFactoryV2IntegrationRuntime',
108112
'Get-AzureRmDataFactoryV2TriggerRun'
109113

110114
# Variables to export from this module

src/ResourceManager/DataFactories/Commands.DataFactoryV2.Test/Commands.DataFactoryV2.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Management.DataFactory">
5555
<SpecificVersion>False</SpecificVersion>
56-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactory.0.2.1-preview\lib\net452\Microsoft.Azure.Management.DataFactory.dll</HintPath>
56+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactory.0.3.0-preview\lib\net452\Microsoft.Azure.Management.DataFactory.dll</HintPath>
5757
</Reference>
5858
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5959
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/DataFactories/Commands.DataFactoryV2.Test/ScenarioTests/IntegrationRuntimeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public void TestSelfHosedIntegrationRuntime()
3535

3636
[Fact]
3737
[Trait(Category.AcceptanceType, Category.CheckIn)]
38-
public void TestManagedElasticIntegrationRuntime()
38+
public void TestAzureIntegrationRuntime()
3939
{
40-
RunPowerShellTest("Test-ManagedElastic-IntegrationRuntime");
40+
RunPowerShellTest("Test-Azure-IntegrationRuntime");
4141
}
4242

4343
[Fact]

src/ResourceManager/DataFactories/Commands.DataFactoryV2.Test/ScenarioTests/IntegrationRuntimeTests.ps1

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
14-
1514
<#
1615
.SYNOPSIS
1716
Creates a self-hosted integration runtime and then does operations.
@@ -50,21 +49,6 @@ function Test-SelfHosted-IntegrationRuntime
5049
$expected = Get-AzureRmDataFactoryV2IntegrationRuntime -ResourceId $actual.Id
5150
Assert-AreEqual $actual.Name $expected.Name
5251

53-
$key = Get-AzureRmDataFactoryV2IntegrationRuntimeKey -ResourceGroupName $rgname `
54-
-DataFactoryName $dfname `
55-
-Name $irname
56-
Assert-NotNull $key
57-
Assert-NotNull $key.AuthKey1
58-
Assert-NotNull $key.AuthKey2
59-
60-
$key = New-AzureRmDataFactoryV2IntegrationRuntimeKey -ResourceGroupName $rgname `
61-
-DataFactoryName $dfname `
62-
-Name $irname `
63-
-KeyName authKey1 `
64-
-Force
65-
Assert-NotNull $key
66-
Assert-NotNull $key.AuthKey1
67-
6852
$metric = Get-AzureRmDataFactoryV2IntegrationRuntimeMetric -ResourceGroupName $rgname `
6953
-DataFactoryName $dfname `
7054
-Name $irname
@@ -87,10 +71,73 @@ function Test-SelfHosted-IntegrationRuntime
8771

8872
<#
8973
.SYNOPSIS
90-
Creates a managed elastic integration runtime and then does operations.
74+
Creates a SSIS-Azure integration runtime and then does operations.
75+
Deletes the created integration runtime at the end.
76+
77+
Before running this test, make sure setting the following environment variables:
78+
CatalogServerEndpoint: The catalog server endpoint for catalog database
79+
CatalogAdminUsername: The admin user name on this server
80+
CatalogAdminPassword: The password of the admin user.
81+
#>
82+
function Test-SsisAzure-IntegrationRuntime
83+
{
84+
$dfname = Get-DataFactoryName
85+
$rgname = Get-ResourceGroupName
86+
$rglocation = Get-ProviderLocation ResourceManagement
87+
$dflocation = Get-ProviderLocation DataFactoryManagement
88+
89+
New-AzureRmResourceGroup -Name $rgname -Location $rglocation -Force
90+
91+
try
92+
{
93+
Set-AzureRmDataFactoryV2 -ResourceGroupName $rgname `
94+
-Name $dfname `
95+
-Location $dflocation `
96+
-Force
97+
98+
$irname = "ssis-azure-ir"
99+
$description = "SSIS-Azure integration runtime"
100+
101+
$secpasswd = ConvertTo-SecureString $Env:CatalogAdminPassword -AsPlainText -Force
102+
$mycreds = New-Object System.Management.Automation.PSCredential($Env:CatalogAdminUsername, $secpasswd)
103+
$actual = Set-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname `
104+
-DataFactoryName $dfname `
105+
-Name $irname `
106+
-Description $description `
107+
-Type Managed `
108+
-Location 'East US' `
109+
-NodeSize Standard_A4_v2 `
110+
-NodeCount 1 `
111+
-CatalogServerEndpoint $Env:CatalogServerEndpoint `
112+
-CatalogAdminCredential $mycreds `
113+
-CatalogPricingTier 'S1' `
114+
-MaxParallelExecutionsPerNode 1 `
115+
-Force
116+
117+
$expected = Get-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname `
118+
-DataFactoryName $dfname `
119+
-Name $irname
120+
Assert-AreEqual $actual.Name $expected.Name
121+
122+
Start-AzureRmDataFactoryV2IntegrationRuntime -ResourceId $actual.Id -Force
123+
$status = Get-AzureRmDataFactoryV2IntegrationRuntime -ResourceId $actual.Id -Status
124+
Stop-AzureRmDataFactoryV2IntegrationRuntime -ResourceId $actual.Id -Force
125+
126+
Start-Sleep -Seconds 15
127+
Remove-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname -DataFactoryName $dfname -Name $irname -Force
128+
}
129+
finally
130+
{
131+
CleanUp $rgname $dfname
132+
}
133+
}
134+
135+
<#
136+
.SYNOPSIS
137+
Creates an azure integration runtime and then does operations.
91138
Deletes the created integration runtime at the end.
92139
#>
93-
function Test-ManagedElastic-IntegrationRuntime
140+
function Test-Azure-IntegrationRuntime
94141
{
95142
$dfname = Get-DataFactoryName
96143
$rgname = Get-ResourceGroupName

0 commit comments

Comments
 (0)