Layer7 API Management

  • 1.  Export project bundle excluding specific services

    Posted Aug 18, 2017 08:17 AM

    Hi

     

    During migration of gateway bundle from one environment to another, I want to exclude few services during migrateOut. On this source gateway bundle I want to import only required services into the target gateway (Service will differ depending on environment). I want it to achieve it through GMU for making automation scripts. Can you please suggest some approach to achieve this?



  • 2.  Re: Export project bundle excluding specific services
    Best Answer

    Broadcom Employee
    Posted Aug 18, 2017 01:02 PM

    There was a similar questions asked and I have pasted the reply below

     

    Q) export all policies except few which I want to exclude.

         Response: You can not exclude only certain policies during the export but can through the import back. Worthy of a idea.

     

    I have pasted the link to the Idea for you to vote: GMU - exclude certain policy / folder in complete export 



  • 3.  Re: Export project bundle excluding specific services

    Posted Aug 21, 2017 04:35 AM

    Hi,

     

    GMU do provide exclude properties but this is only to for stored password or encrypted password. However if you do migrate out for entire folder and want to migrate in to other environment then do changes in the XML file generated.

     

    All the services, JMS, encapsulate assertion , policy fragment etc are part of that XML file with default configuration as NewOrExisting. this will be shown in the last of the xml file as 

     

    <l7:Mapping action="NewOrExisting" srcId="*********************" srcUri="****************" type="POLICY"/>
    <l7:Mapping action="NewOrExisting" srcId="******************" srcUri="********" type="ENCAPSULATED_ASSERTION"/>
    <l7:Mapping action="NewOrExisting" srcId="*******" srcUri="****************" type="JMS_ENDPOINT"/>

     

    If you keep the Mapping action as "NewOrExisting" this wont change anything in the new environment. In case you want to update the service the change mapping to "NeworUpdate". this will update all the service or policy in the new environment.

     

    Similarly you can do the same for other JMS, Policy and encapsulated assertion as well.

     

    Hope I am clear to you.



  • 4.  Re: Export project bundle excluding specific services

    Posted Aug 21, 2017 06:02 AM

    Hi

    Thanks for your reply. Here is what I am trying to do.

     

    I exported bundle using action "NewOrUpdate" using which I got bundle.xml with services like this,

    <l7:Mapping action="NewOrUpdate" srcId="......." srcUri="......." type="SERVICE"/>

     

    After this I created an overridemappings.xml file which contains services with action "Delete" using this command.

    GatewayMigrationUtility.bat manageMappings --bundle bundle.xml --type SERVICE --action Delete --outputFile overridemappings.xml

     

    Now I tried importing using following migrateIn command in order to import bundle to target gateway, thinking that this command will import everything except services in the target gateway.

    GatewayMigrationUtility.bat migrateIn --argFile gateway.properties --bundle bundle.xml --results testresults.xml --map overridemappings.xml

     

    But this does not work, can you please help me out here how can I make use of various actions in manageMappings command and what are their purpose [New, Update, Existing, ForceNew, Delete, Ignore, NewOrExisting, NewOrUpdate, DeleteOrIgnore]?