Layer7 API Management

  • 1.  GMU migration: Getting conflict if source and target having different encapsulated assertions ID's.

    Posted Sep 27, 2018 02:13 PM

    GMU migration: I am migrating policies and services from Dev to QA. It is giving me conflict like " name (must be unique)" even after ignoring "ENCAPSULATED ASSERTION" in manage mappings. I am getting this error as id's of encapsulated assertions are different on Dev and QA. Please help me how to get rid of this error.
    Note: Folder is my deployable unit i.e the stuff which I am migrating is inside the folder.



  • 2.  Re: GMU migration: Getting conflict if source and target having different encapsulated assertions ID's.

    Posted Sep 27, 2018 06:47 PM

    Hello Rajdeep,

     

    Can you please clarify for us how you have your migrateIn and migrateOut commands set up and what your configuration is for the GMU migration? This should help us determine what's going on, or at least get closer to understanding it.

     

    Very broadly though, the "name (must be unique)” error is caused when the name of the service is the same as one that already exists, and you need to manage it's mappings for it to recognize it. In your case, it sounds like you have an encapsulated assertion (let's call it "EncapA”) in Dev, and an encapsulated assertion in QA also called "EncapA” but the GMU is likely not able to recognize these are the same thing, so it raises the error that you see.

     

    Without seeing your GMU configuration, I suspect you'll need to be adding these to your manageMappings portion of the GMU.

     

    I hope the above helps.



  • 3.  Re: GMU migration: Getting conflict if source and target having different encapsulated assertions ID's.

    Posted Oct 01, 2018 02:11 AM

    Hi Dustin,

     

    This is how GMU script is being used.

    #MigrateOut

    .\GatewayMigrationUtility.bat migrateOut -argFile .\argfiles\$srcSystem.args `
     --folderName $folderName -d $tempFolder\All_Entities --format directory `
     --defaultAction NewOrExisting
     
     # Change mappings
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type CLUSTER_PROPERTY --action Ignore --outputFile $tempFolder\overrideMappings.xml
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type SSG_KEY_ENTRY --action Ignore --outputFile $tempFolder\overrideMappings.xml
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type ENCAPSULATED_ASSERTION --action Ignore --outputFile $tempFolder\overrideMappings.xml
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type SSG_ACTIVE_CONNECTOR --action Ignore --outputFile $tempFolder\overrideMappings.xml
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type JDBC_CONNECTION --action Ignore --outputFile $tempFolder\overrideMappings.xml
    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type SECURE_PASSWORD --action Ignore --outputFile $tempFolder\overrideMappings.xml
     
    If ($targetFolder -ne "--none") {
    # Import to target system using template and mapping overrides
    .\GatewayMigrationUtility.bat migrateIn -b .\$tempFolder\All_Entities $testFlag --argFile .\argfiles\$targetSystem.args --destFolder $targetFolder -r .\$tempFolder\All_Entities_result.xml --map $tempFolder\overrideMappings.xml
    }
    Snippet of error:
     <l7:Mapping action="NewOrExisting" errorType="UniqueKeyConflict" srcId="e829de50ba75f99743affa7e2f71590a" srcUri="https://phxioapigid01.internal.mcmcg.com:8443/restman/1.0/policies/e829de50ba75f99743affa7e2f71590a" type="POLICY">
                    <l7:Properties>
                        <l7:Property key="ErrorMessage">
                            <l7:StringValue>(name)  must be unique</l7:StringValue>
                        </l7:Property>
                    </l7:Properties>
                </l7:Mapping>
                <l7:Mapping action="NewOrExisting" errorType="UniqueKeyConflict" srcId="e829de50ba75f99743affa7e2f71dc83"


  • 4.  Re: GMU migration: Getting conflict if source and target having different encapsulated assertions ID's.

    Broadcom Employee
    Posted Oct 01, 2018 08:13 PM

    Hi Rajdeep,

    You might need to use --encassAsPolicyDependency  option to migrateOut the dependent encapsulated assertion, and you might need to replace the existing one while migrateIn.

     

    Regards,

    Mark



  • 5.  Re: GMU migration: Getting conflict if source and target having different encapsulated assertions ID's.
    Best Answer

    Posted Oct 04, 2018 10:16 AM

    I got this working after ignoring the policy using following command.

     

    .\GatewayMigrationUtility.bat manageMappings --bundle $tempFolder\All_Entities --type POLICY -N --action Ignore --outputFile $tempFolder\overrideMappings.xml