Layer7 API Management

Expand all | Collapse all

[Layer 7] How to know where a policy fragment is being used?

Jump to Best Answer
  • 1.  [Layer 7] How to know where a policy fragment is being used?

    Posted 04-22-2015 04:07 PM

    Hello!

     

    I am trying to delete a fragment, but I can't because it says that it is being used by another policy. Is there a way to figure out where it's being used?

     

    Thanks in advance!



  • 2.  Re: [Layer 7] How to know where a policy fragment is being used?

    Broadcom Employee
    Posted 04-22-2015 06:46 PM

    If you know the GUID of the policy fragment, then you can go into mysql on the gateway and perform a query on the ssg database for that information.

    -------

    1. Open up a text editor like Notepad and copy: SELECT name FROM policy WHERE xml LIKE '%stringValue="fragment-GUID-#"%';
    2. Open up the Policy Manager and right click on your Policy Fragment, and choose Policy Properties. Right click on Policy GUID area, and select Copy.
    3. Go back to Notepad and replace the fragment-GUID-# with the Policy GUID of your fragment you just copied, by pasting it.
      1. (This new SELECT statement will be passed in mysql)
    4. Login to your gateway either manually or via SSH. At root command line type: mysql -> use ssg; -> SELECT name FROM policy WHERE xml LIKE '%stringValue="fragment-GUID-#"%';
      1. (Remember to use your new SELECT statement with the Policy GUID replacing the fragment-GUID-#)

    -------

    Example SQL command:

    Capture.JPG

    -------

    This will print the names of the services containing this policy fragment.

     

    Hope this helps.



  • 3.  Re: [Layer 7] How to know where a policy fragment is being used?
    Best Answer

    Posted 04-23-2015 04:34 PM

    If you're a user of the Command-line Migration Tool (CMT) you can use the listDependencies operation and the invert argument to see where each fragment is referenced. If you're on Gateway 8.3 or later, you could use the new Gateway Migration Utility (GMU) instead.