Layer7 API Management

  • 1.  manageMappings command help

    Posted Aug 24, 2017 06:03 AM

    Hi

     

    I am trying to create a mapping file which has type as services but not all the services from the gateway but some specific services for example services from a specific folder.

     

    Is there any option in manageMappings command where I can pass a list of srcIds as the argument while creating mapping file?

    Or, I can pass path of a folder from the gateway as the argument so that services present in this folder only are exported to mapping file?



  • 2.  Re: manageMappings command help
    Best Answer

    Posted Sep 02, 2017 11:51 PM

    Hello, 

     

    I believe your use-case can be solved by going one step back in the migration process and modifying your migrateOut command to export only services and policies in a specific folder with the folderName and includeOnlyServicePolicy flags.

    i.e. migrateOut --folderName your_folder_name --includeOnlyServicePolicy --dest your_folder_bundle.xml ...

     

    This will export all folder, service and policy entities under that folder, but you can then filter out only the services in the manageMappings command with the --type flag.  Since you asked about providing a full list of id's as an argument, I'm going to assume you want to apply the same mapping command to each service under that folder.  

     

    Here's an example of changing all services to map by the name of their source entity.  This is done by providing the targetName flag with no value

    i.e. manageMappings --type SERVICE --targetName --bundle your_folder_bundle.xml

     

    Or another example of mapping all services to a different action like 'Update'

    i.e. manageMappings --type SERVICE --action Update --bundle your_folder_bundle.xml

     

    I hope my assumptions were correct and this helps.  Please let us know if not.

     

    -Jordan