Skip to content

Logic App Integration Account Control Numbers cmdlets #3566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions src/ResourceManager/LogicApp/AzureRM.LogicApp.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,39 @@ NestedModules = @('.\Microsoft.Azure.Commands.LogicApp.dll')
FunctionsToExport = @()

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = 'Get-AzureRmIntegrationAccountAgreement',
'Get-AzureRmIntegrationAccountCallbackUrl',
'Get-AzureRmIntegrationAccountCertificate',
'Get-AzureRmIntegrationAccount', 'Get-AzureRmIntegrationAccountMap',
'Get-AzureRmIntegrationAccountPartner',
'Get-AzureRmIntegrationAccountSchema',
'New-AzureRmIntegrationAccountAgreement',
'New-AzureRmIntegrationAccountCertificate',
'New-AzureRmIntegrationAccount', 'New-AzureRmIntegrationAccountMap',
'New-AzureRmIntegrationAccountPartner',
'New-AzureRmIntegrationAccountSchema',
'Remove-AzureRmIntegrationAccountAgreement',
'Remove-AzureRmIntegrationAccountCertificate',
'Remove-AzureRmIntegrationAccount',
'Remove-AzureRmIntegrationAccountMap',
'Remove-AzureRmIntegrationAccountPartner',
'Remove-AzureRmIntegrationAccountSchema',
'Set-AzureRmIntegrationAccountAgreement',
'Set-AzureRmIntegrationAccountCertificate',
'Set-AzureRmIntegrationAccount', 'Set-AzureRmIntegrationAccountMap',
'Set-AzureRmIntegrationAccountPartner',
'Set-AzureRmIntegrationAccountSchema', 'Stop-AzureRmLogicAppRun',
'Get-AzureRmLogicApp', 'Get-AzureRmLogicAppRunAction',
'Get-AzureRmLogicAppRunHistory',
'Get-AzureRmLogicAppTriggerCallbackUrl',
'Get-AzureRmLogicAppTrigger', 'Get-AzureRmLogicAppTriggerHistory',
'Get-AzureRmLogicAppUpgradedDefinition', 'New-AzureRmLogicApp',
'Remove-AzureRmLogicApp', 'Start-AzureRmLogicApp',
CmdletsToExport = 'Get-AzureRmIntegrationAccountAgreement',
'Get-AzureRmIntegrationAccountCallbackUrl',
'Get-AzureRmIntegrationAccountCertificate',
'Get-AzureRmIntegrationAccount', 'Get-AzureRmIntegrationAccountMap',
'Get-AzureRmIntegrationAccountPartner',
'Get-AzureRmIntegrationAccountSchema',
'Get-AzureRmIntegrationAccountGeneratedIcn',
'Get-AzureRmIntegrationAccountReceivedIcn',
'New-AzureRmIntegrationAccountAgreement',
'New-AzureRmIntegrationAccountCertificate',
'New-AzureRmIntegrationAccount', 'New-AzureRmIntegrationAccountMap',
'New-AzureRmIntegrationAccountPartner',
'New-AzureRmIntegrationAccountSchema',
'Remove-AzureRmIntegrationAccountAgreement',
'Remove-AzureRmIntegrationAccountCertificate',
'Remove-AzureRmIntegrationAccount',
'Remove-AzureRmIntegrationAccountMap',
'Remove-AzureRmIntegrationAccountPartner',
'Remove-AzureRmIntegrationAccountSchema',
'Remove-AzureRmIntegrationAccountReceivedIcn',
'Set-AzureRmIntegrationAccountAgreement',
'Set-AzureRmIntegrationAccountCertificate',
'Set-AzureRmIntegrationAccount', 'Set-AzureRmIntegrationAccountMap',
'Set-AzureRmIntegrationAccountPartner',
'Set-AzureRmIntegrationAccountSchema', 'Stop-AzureRmLogicAppRun',
'Set-AzureRmIntegrationAccountGeneratedIcn',
'Set-AzureRmIntegrationAccountReceivedIcn',
'Get-AzureRmLogicApp', 'Get-AzureRmLogicAppRunAction',
'Get-AzureRmLogicAppRunHistory',
'Get-AzureRmLogicAppTriggerCallbackUrl',
'Get-AzureRmLogicAppTrigger', 'Get-AzureRmLogicAppTriggerHistory',
'Get-AzureRmLogicAppUpgradedDefinition', 'New-AzureRmLogicApp',
'Remove-AzureRmLogicApp', 'Start-AzureRmLogicApp',
'Set-AzureRmLogicApp', 'Test-AzureRmLogicApp'

# Variables to export from this module
Expand Down
6 changes: 6 additions & 0 deletions src/ResourceManager/LogicApp/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
- Additional information about change #1
-->
## Current Release
* New cmdlets for X12 Interchange Control Number disaster recovery:
- Get-AzureRmIntegrationAccountGeneratedIcn
- Get-AzureRmIntegrationAccountReceivedIcn
- Remove-AzureRmIntegrationAccountReceivedIcn
- Set-AzureRmIntegrationAccountGeneratedIcn
- Set-AzureRmIntegrationAccountReceivedIcn

## Version 2.6.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Logic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Azure.Management.Logic, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Logic.2.0.0\lib\net45\Microsoft.Azure.Management.Logic.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Logic.2.1.0\lib\net45\Microsoft.Azure.Management.Logic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.WebSites, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -146,8 +146,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScenarioTests\IntegrationAccountAgreementTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountCertificateTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountGeneratedIcnTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountMapTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountPartnerTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountReceivedIcnTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountSchemaTests.cs" />
<Compile Include="ScenarioTests\IntegrationAccountTests.cs" />
<Compile Include="ScenarioTests\WorkflowController.cs" />
Expand Down Expand Up @@ -205,12 +207,18 @@
<None Include="ScenarioTests\IntegrationAccountCertificateTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\IntegrationAccountGeneratedIcnTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\IntegrationAccountMapTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\IntegrationAccountPartnerTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\IntegrationAccountReceivedIcnTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\IntegrationAccountSchemaTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -268,6 +276,15 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountCertificateTests\TestUpdateIntegrationAccountCertificate.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountGeneratedIcnTests\TestGetIntegrationAccountGeneratedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountGeneratedIcnTests\TestListIntegrationAccountGeneratedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountGeneratedIcnTests\TestUpdateIntegrationAccountGeneratedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountMapTests\TestCreateIntegrationAccountMap.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -298,6 +315,15 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountPartnerTests\TestUpdateIntegrationAccountPartner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountReceivedIcnTests\TestGetIntegrationAccountReceivedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountReceivedIcnTests\TestRemoveIntegrationAccountReceivedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountReceivedIcnTests\TestUpdateIntegrationAccountReceivedIcn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests.IntegrationAccountSchemaTests\TestCreateIntegrationAccountSchema.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests
/// </summary>
public class IntegrationAccountAgreementTests : RMTestBase
{

/// <summary>
/// Test New-AzureRmIntegrationAccountAgreement command to create a new X12 integration account agreement.
/// </summary>
Expand Down Expand Up @@ -96,7 +95,7 @@ public void TestUpdateIntegrationAccountAgreement()
}

/// <summary>
/// Test Get-AzureRmIntegrationAccountAgreement command to get all the integration account agreement.
/// Test Get-AzureRmIntegrationAccountAgreement command to get all the integration account agreements.
/// </summary>
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ function Test-UpdateIntegrationAccountAgreement
Assert-AreEqual $integrationAccountAgreementName $integrationAccountAgreement.Name
Assert-AreEqual "X12" $integrationAccountAgreement.AgreementType

Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifier "AA" -GuestIdentityQualifierValue "ZZ" -Force} "Either Host business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifierValue "AA" -GuestIdentityQualifierValue "ZZ" -Force} "Either Host business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifier "AA" -GuestIdentityQualifierValue "ZZ" -Force} "Either 'Host' business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifierValue "AA" -GuestIdentityQualifierValue "ZZ" -Force} "Either 'Host' business Identity qualifier or qualifier value is not specified."

Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifier "AA" -HostIdentityQualifierValue "AA" -Force} "Either Guest business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifierValue "ZZ" -HostIdentityQualifier "AA" -HostIdentityQualifierValue "AA" -Force} "Either Guest business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifier "ZZ" -HostIdentityQualifier "AA" -HostIdentityQualifierValue "AA" -Force} "Either 'Guest' business Identity qualifier or qualifier value is not specified."
Assert-ThrowsContains {Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "X12" -GuestPartner $guestPartnerName -HostPartner $hostPartnerName -GuestIdentityQualifierValue "ZZ" -HostIdentityQualifier "AA" -HostIdentityQualifierValue "AA" -Force} "Either 'Guest' business Identity qualifier or qualifier value is not specified."


$updatedIntegrationAccountAgreement = Set-AzureRmIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -IntegrationAccountName $integrationAccountName -AgreementName $integrationAccountAgreementName -AgreementType "AS2" -AgreementContent $agreementAS2Content -Force
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests
{
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;

/// <summary>
/// Scenario tests for integration account generated control number commands.
/// </summary>
public class IntegrationAccountGeneratedIcnTests : RMTestBase
{
/// <summary>
/// Test Get-AzureRmIntegrationAccountGeneratedIcn command to get the integration account generated interchange control number.
/// </summary>
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetIntegrationAccountGeneratedIcn()
{
WorkflowController.NewInstance.RunPowerShellTest("Test-GetIntegrationAccountGeneratedControlNumber");
}

/// <summary>
/// Test Set-AzureRmIntegrationAccountGeneratedIcn command to update the integration account generated interchange control number.
/// </summary>
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateIntegrationAccountGeneratedIcn()
{
WorkflowController.NewInstance.RunPowerShellTest("Test-UpdateIntegrationAccountGenCN");
}

/// <summary>
/// Test Get-AzureRmIntegrationAccountGeneratedIcn command to get all the integration account generated interchange control numbers.
/// </summary>
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestListIntegrationAccountGeneratedIcn()
{
WorkflowController.NewInstance.RunPowerShellTest("Test-ListIntegrationAccountGenCN");
}
}
}
Loading