Skip to content

Commit cb72d0e

Browse files
committed
Merge pull request #3 from akhadem/dev
merge from akhadm/azure-powershell/dev
2 parents 5a88b9a + 27efac5 commit cb72d0e

File tree

40 files changed

+4162
-5235
lines changed

40 files changed

+4162
-5235
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5050
</Reference>
5151
<Reference Include="Microsoft.Azure.Management.DataFactories">
52-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.11.4-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll</HintPath>
52+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.12.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll</HintPath>
5353
</Reference>
5454
<Reference Include="Microsoft.Azure.Monitoring">
5555
<HintPath>..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll</HintPath>
@@ -259,9 +259,6 @@
259259
<None Include="SessionRecords\Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests\TestLinkedServiceWithDataFactoryParameter.json">
260260
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
261261
</None>
262-
<None Include="SessionRecords\Microsoft.Azure.Commands.DataFactories.Test.PipelineTests\TestPipeline.json">
263-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
264-
</None>
265262
<None Include="SessionRecords\Microsoft.Azure.Commands.DataFactories.Test.TableTests\TestGetTableWithEmptyName.json">
266263
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
267264
</None>

src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/pipeline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
inputs: [ {name: "inputTable"} ],
1111
outputs: [ {name: "outputTable"} ],
1212
linkedServiceName: "foo2",
13-
type: "CustomActivity",
13+
type: "DotNetActivity",
1414
transformation:
1515
{
1616
assemblyName: "mycode.dll",

src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ function Test-DataFactoryGateway
5050
$gwname = "foo"
5151
$description = "description"
5252

53-
$actual = New-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname -Location $dflocation
53+
$actual = New-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname
5454
$expected = Get-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname
5555
Assert-AreEqual $actual.Name $expected.Name
56-
Assert-AreEqual $actual.Location $expected.Location
5756

5857
$key = New-AzureDataFactoryGatewayKey -ResourceGroupName $rgname -DataFactoryName $dfname -GatewayName $gwname
5958
Assert-NotNull $key
@@ -91,10 +90,9 @@ function Test-DataFactoryGatewayWithDataFactoryParameter
9190
$gwname = "foo"
9291
$description = "description"
9392

94-
$actual = New-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname -Location $dflocation
93+
$actual = New-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname
9594
$expected = Get-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname
9695
Assert-AreEqual $actual.Name $expected.Name
97-
Assert-AreEqual $actual.Location $expected.Location
9896

9997
$key = New-AzureDataFactoryGatewayKey -DataFactory $datafactory -GatewayName $gwname
10098
Assert-NotNull $key

src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ namespace Microsoft.Azure.Commands.DataFactories.Test
1919
{
2020
public class PipelineTests : DataFactoriesScenarioTestsBase
2121
{
22-
[Fact]
23-
[Trait(Category.AcceptanceType, Category.CheckIn)]
24-
public void TestPipeline()
25-
{
26-
RunPowerShellTest("Test-Pipeline");
27-
}
22+
//Temporarily pending because of server issue.
23+
//[Fact]
24+
//[Trait(Category.AcceptanceType, Category.CheckIn)]
25+
//public void TestPipeline()
26+
//{
27+
// RunPowerShellTest("Test-Pipeline");
28+
//}
2829
}
2930
}

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGateway.json

Lines changed: 192 additions & 252 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGatewayWithDataFactoryParameter.json

Lines changed: 209 additions & 209 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestGetNonExistingDataFactoryGateway.json

Lines changed: 150 additions & 87 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestCreateDataFactory.json

Lines changed: 106 additions & 169 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDataFactoryPiping.json

Lines changed: 113 additions & 176 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDeleteDataFactoryWithDataFactoryParameter.json

Lines changed: 96 additions & 159 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithEmptyName.json

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithWhiteSpaceName.json

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetNonExistingDataFactory.json

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHub.json

Lines changed: 597 additions & 150 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubPiping.json

Lines changed: 222 additions & 159 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubWithDataFactoryParameter.json

Lines changed: 206 additions & 143 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithEmptyName.json

Lines changed: 217 additions & 91 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithWhiteSpaceName.json

Lines changed: 108 additions & 105 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedService.json

Lines changed: 221 additions & 158 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServicePiping.json

Lines changed: 242 additions & 179 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServiceWithDataFactoryParameter.json

Lines changed: 158 additions & 158 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.PipelineTests/TestPipeline.json

Lines changed: 0 additions & 1867 deletions
This file was deleted.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithEmptyName.json

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithWhiteSpaceName.json

Lines changed: 155 additions & 92 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTable.json

Lines changed: 245 additions & 245 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTablePiping.json

Lines changed: 229 additions & 289 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTableWithDataFactoryParameter.json

Lines changed: 351 additions & 222 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public void CanGetGateway()
4747
var expectedOutput = new PSDataFactoryGateway
4848
{
4949
Name = GatewayName,
50-
Location = Location,
5150
Status = GatewayStatus.NeedRegistration
5251
};
5352

@@ -74,14 +73,12 @@ public void CanListGateways()
7473
new PSDataFactoryGateway()
7574
{
7675
Name = GatewayName,
77-
Location = Location,
7876
Status = GatewayStatus.NeedRegistration
7977
},
8078

8179
new PSDataFactoryGateway()
8280
{
8381
Name = "foo2",
84-
Location = Location,
8582
Status = GatewayStatus.NeedRegistration
8683
}
8784
};

src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryEncryptValueTests.cs

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1818
using Moq;
1919
using System;
20+
using System.Management.Automation;
2021
using System.Security;
2122
using Xunit;
2223

@@ -31,7 +32,7 @@ public NewDataFactoryEncryptValueTests()
3132

3233
[Fact]
3334
[Trait(Category.AcceptanceType, Category.CheckIn)]
34-
public void TestOnPermDatasourceEncryptionWithRawJsonContent()
35+
public void TestOnPremDatasourceEncryptionSQLAuth()
3536
{
3637
SecureString secureString = new SecureString();
3738
string expectedOutput = "My encrypted string " + Guid.NewGuid();
@@ -47,13 +48,45 @@ public void TestOnPermDatasourceEncryptionWithRawJsonContent()
4748
};
4849

4950
// Arrange
50-
this.dataFactoriesClientMock.Setup(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName)).Returns(expectedOutput);
51+
this.dataFactoriesClientMock.Setup(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName, null)).Returns(expectedOutput);
5152

5253
// Action
5354
cmdlet.ExecuteCmdlet();
5455

5556
// Assert
56-
this.dataFactoriesClientMock.Verify(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName), Times.Once());
57+
this.dataFactoriesClientMock.Verify(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName, null), Times.Once());
58+
this.commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once());
59+
}
60+
61+
[Fact]
62+
[Trait(Category.AcceptanceType, Category.CheckIn)]
63+
public void TestOnPremDatasourceEncryptionWinAuth()
64+
{
65+
SecureString secureString = new SecureString();
66+
string expectedOutput = "My encrypted string " + Guid.NewGuid();
67+
string winAuthUserName = "foo";
68+
SecureString winAuthPassword = new SecureString();
69+
PSCredential windowsCredential = new PSCredential(winAuthUserName, winAuthPassword);
70+
71+
var cmdlet = new NewAzureDataFactoryEncryptValueCommand
72+
{
73+
CommandRuntime = this.commandRuntimeMock.Object,
74+
DataFactoryClient = this.dataFactoriesClientMock.Object,
75+
Value = secureString,
76+
ResourceGroupName = ResourceGroupName,
77+
DataFactoryName = DataFactoryName,
78+
GatewayName = GatewayName,
79+
WindowsCredential = windowsCredential
80+
};
81+
82+
// Arrange
83+
this.dataFactoriesClientMock.Setup(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName, windowsCredential)).Returns(expectedOutput);
84+
85+
// Action
86+
cmdlet.ExecuteCmdlet();
87+
88+
// Assert
89+
this.dataFactoriesClientMock.Verify(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName, windowsCredential), Times.Once());
5790
this.commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once());
5891
}
5992
}

src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public void CanNewGatewayKey()
5454
var expectedOutput = new PSDataFactoryGateway
5555
{
5656
Name = GatewayName,
57-
Location = Location,
5857
Status = GatewayStatus.Online,
5958
Description = "New gateway description for test"
6059
};

src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public void CanNewGateway()
4949
var expectedOutput = new PSDataFactoryGateway
5050
{
5151
Name = GatewayName,
52-
Location = Location,
5352
Status = GatewayStatus.Online,
5453
Description = "New gateway description for test",
5554
};
@@ -71,7 +70,6 @@ public void CanNewGateway()
7170

7271
_cmdlet.Name = GatewayName;
7372
_cmdlet.DataFactoryName = DataFactoryName;
74-
_cmdlet.Location = Location;
7573

7674
_cmdlet.ExecuteCmdlet();
7775

@@ -86,7 +84,6 @@ public void CanThrowWhenCreateExistingGateway()
8684
var expectedOutput = new PSDataFactoryGateway
8785
{
8886
Name = GatewayName,
89-
Location = Location,
9087
Status = GatewayStatus.Online,
9188
Description = "New gateway description for test"
9289
};
@@ -97,7 +94,6 @@ public void CanThrowWhenCreateExistingGateway()
9794

9895
_cmdlet.Name = GatewayName;
9996
_cmdlet.DataFactoryName = DataFactoryName;
100-
_cmdlet.Location = Location;
10197

10298
Assert.Throws<PSInvalidOperationException>(() => _cmdlet.ExecuteCmdlet());
10399

src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public void CanSetGateway()
4848
var expectedOutput = new PSDataFactoryGateway
4949
{
5050
Name = GatewayName,
51-
Location = Location,
5251
Status = GatewayStatus.NeedRegistration,
5352
Description = description
5453
};

src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="Hydra.SpecTestSupport" version="1.0.5417.13285-prerelease" targetFramework="net45" />
55
<package id="Microsoft.Azure.Gallery" version="2.2.0-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Management.Authorization" version="0.11.0-preview" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Management.DataFactories" version="0.11.4-preview" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Management.DataFactories" version="0.12.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Resources" version="2.7.0-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Monitoring" version="2.2.0-preview" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />

src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@
4949
</PropertyGroup>
5050
<ItemGroup>
5151
<Reference Include="Microsoft.Azure.Management.DataFactories">
52-
<SpecificVersion>False</SpecificVersion>
53-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.11.4-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll</HintPath>
52+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.12.0-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll</HintPath>
5453
</Reference>
5554
<Reference Include="Microsoft.DataFactories.Runtime">
5655
<HintPath>..\..\..\packages\Microsoft.DataFactories.Runtime.0.11.1-preview\lib\net45\Microsoft.DataFactories.Runtime.dll</HintPath>
5756
</Reference>
5857
<Reference Include="Microsoft.DataTransfer.Gateway.Encryption">
59-
<HintPath>..\..\..\packages\Microsoft.DataTransfer.Gateway.Encryption.1.0.0-preview\lib\net45\Microsoft.DataTransfer.Gateway.Encryption.dll</HintPath>
58+
<HintPath>..\..\..\packages\Microsoft.DataTransfer.Gateway.Encryption.1.1.0-preview\lib\net45\Microsoft.DataTransfer.Gateway.Encryption.dll</HintPath>
6059
</Reference>
6160
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
6261
<SpecificVersion>False</SpecificVersion>
@@ -224,6 +223,7 @@
224223
<ItemGroup>
225224
<Content Include="Microsoft.Azure.Commands.DataFactories.dll-Help.xml">
226225
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
226+
<SubType>Designer</SubType>
227227
</Content>
228228
</ItemGroup>
229229
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

src/ResourceManager/DataFactories/Commands.DataFactories/Encrypt/NewAzureDataFactoryEncryptValueCommand.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public class NewAzureDataFactoryEncryptValueCommand : DataFactoryBaseCmdlet
4343
[Parameter(ParameterSetName = ByFactoryName, Position = 3, Mandatory = false, HelpMessage = "The gateway group name.")]
4444
public string GatewayName { get; set; }
4545

46+
[Parameter(ParameterSetName = ByFactoryObject, Position = 3, Mandatory = false, HelpMessage = "The windows authentication credential.")]
47+
[Parameter(ParameterSetName = ByFactoryName, Position = 4, Mandatory = false, HelpMessage = "The windows authentication credential.")]
48+
public PSCredential WindowsCredential { get; set; }
49+
4650
[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]
4751
public override void ExecuteCmdlet()
4852
{
@@ -68,7 +72,7 @@ public override void ExecuteCmdlet()
6872
else
6973
{
7074
// On-premises encryption with Gateway
71-
encryptedValue = DataFactoryClient.OnPremisesEncryptString(Value, ResourceGroupName, DataFactoryName, GatewayName);
75+
encryptedValue = DataFactoryClient.OnPremisesEncryptString(Value, ResourceGroupName, DataFactoryName, GatewayName, WindowsCredential);
7276
}
7377

7478
WriteObject(encryptedValue);

src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ public class NewAzureDataFactoryGatewayCommand : DataFactoryBaseCmdlet
3939
[ValidateNotNullOrEmpty]
4040
public string Name { get; set; }
4141

42-
[Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true,
43-
HelpMessage = "The geographic region to create the data factory.")]
44-
[ValidateNotNullOrEmpty]
45-
public string Location { get; set; }
46-
47-
[Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true,
42+
[Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true,
4843
HelpMessage = "The description to update.")]
4944
public string Description { get; set; }
5045

@@ -79,21 +74,11 @@ public override void ExecuteCmdlet()
7974
var request = new PSDataFactoryGateway
8075
{
8176
Name = Name,
82-
Location = NormalizeLocation(Location),
8377
Description = Description
8478
};
8579

8680
PSDataFactoryGateway response = DataFactoryClient.CreateOrUpdateGateway(ResourceGroupName, DataFactoryName, request);
8781
WriteObject(response);
8882
}
89-
90-
// As a nested resource of data factory, CSM will not normalize location when
91-
// creating gateway, so we have to do this by ourselves.
92-
private static string NormalizeLocation(string location)
93-
{
94-
return String.IsNullOrEmpty(location)
95-
? String.Empty
96-
: location.Trim().Replace(" ", String.Empty).ToUpperInvariant();
97-
}
9883
}
9984
}

0 commit comments

Comments
 (0)