Example 2: Reordering rules when simulating a proposed ILM policy

This example shows how you can reorder rules to change the results when simulating a policy.

About this task

In this example, the "Demo" policy is being simulated. This policy, which is intended to find objects that have series=x-men user metadata, includes three rules, as follows:

  • The first rule, PNGs, filters for key names that end in .png.
  • The second rule, X-men, applies only to objects in a specific tenant account and filters for series=x-men user metadata.
  • The last rule is the default rule, Make 2 Copies, which will match any objects that do not match the first two rules.

Example 2: Reordering rules when simulating a proposed ILM policy

Steps

  1. After adding the rules and saving the policy, click Simulate.
  2. In the Object field, enter the S3 bucket/key or the Swift container/object for a test object, and click Simulate.
    The Simulation Results appear, showing that the Havok.png object was matched by the PNGs rule.
    Example 2: Reordering rules when simulating a proposed ILM policy
    However, the rule that the Havok.png object was meant to test was the X-men rule.
  3. To resolve the issue, reorder the rules.
    1. Click Finish to close the Simulate ILM Policy page.
    2. Click Edit to edit the policy.
    3. Drag the X-men rule to the top of the list.

      Example 2: Reordering rules when simulating a proposed ILM policy
    4. Click Save.
  4. Click Simulate.
    The objects you previously tested are re-evaluated against the updated policy, and the new simulation results are shown. In the example, the Rule Matched column shows that the Havok.png object now matches the X-men metadata rule, as expected. The Previous Match column shows that the PNGs rule matched the object in the previous simulation.
    Example 2: Reordering rules when simulating a proposed ILM policy
    Note: If you stay on the Configure Policies page, you can re-simulate a policy after making changes without needing to re-enter the names of the test objects.