Create Customized Scope Criteria in ViPR SRM

Table of Contents

Customized scopes in ViPR SRM

Learn how to use the filter wizard to build ViPR SRM compliance scope criteria. Learn where to find the database property names required in scope criteria.

Compliance scope criteria are similar to filters in report definitions. As a convenience, you can use the reporting interface editing features to build scope criteria.

The reporting interface provides access to database property names and the filter wizard. After building a filter in the User Interface, you can copy and paste phrases from it into the Create Scope dialog in the compliance module.

Advantages to using the report editing features to build compliance scope criteria are:

Back to Top

Syntax for scope criteria

Customized compliance scopes can define precise groups of objects to include or exclude when a policy runs. Scope criteria can be simple value statements or complex combinations using wildcards.

To create a custom scope, edit an existing compliance policy or create a new one. The Scope tab contains a Create Scope button.

The same set of scopes are available to all policies. After you create a new scope, you can assign that scope to any compliance policy.

Basic Construct

The basic construct for specifying scope criteria is:

property_name = 'value'

or

property_name = 'pattern'

where:

property_name
Is a property field in the database.
value
Is the value to match.
pattern
Is a string that uses wildcards to describe a set of values to match.

Complex construct

You can form complex scope criteria by combining basic constructs using the AND (&), OR (|), and NOT (!) operators. For example:

devtype='Array'&vendor='EMC%'&sstype='Block'

device='mqqb080'|device='mqqb081'

!device=='mhmbd014_LDAP'

A complex scope can include parentheses if needed to indicate operational precedence. For example:

devtype='Array'&(vendor='EMC%'|vendor='Dell%')

Wildcards and patterns

Wildcards are placeholders for characters in a value. The wildcards that are supported are SQL wildcards and work the same as they do in a SQL SELECT statement. The following table shows the wildcards that are supported and examples.

Research database property_name

To create a scope, you need to know the property_name used in the database for the property you want to match against. You can research this information on the report pages in the ViPR SRM User Interface.

To find the correct property_name string for a property, first locate a column in a ViPR SRM report that uses the property you are interested in. Note the column name, and then click EDIT MODE on that report page. On the Report Details: Table tab, expand the blue bar for the column of interest. If the column definition is a property, the database property_name appears. If the column definition is an attribute, look for the property_name on the Filter & Expansion tab.

Back to Top

Use case: Create a scope of specific array types

This scenario shows how to use the editing features in the reporting interface to access database property names. It also shows how to use the filter wizard to create value-based criteria.

Assume that you have a best practice that applies only to Symmetrix and CLARiiON arrays. To create a policy that enforces this best practice, you need a scope that selects all Symmetrix and CLARiiON arrays.

You do not know the property name for array type, and you are not sure of the syntax for limiting a scope to specific values. You decide to use the editing features on a ViPR SRM report page to help you research the property name and build the scope criteria.

Procedure

  1. Log in to the Console.
  2. Navigate to a report that includes a column for array types.
    For example, navigate to Explore > Storage > More Reports > Enterprise Capacity.


  3. Note the heading of the column of interest.
    The column heading is Array Type.
  4. At the top of the page, click EDIT MODE.
  5. Click the Report Description: Table tab.
  6. Locate the blue bar that contains the column header of interest (Array Type), and then click the small arrow to expand that column definition.


  7. Note the value in the Property field.
    From this field, we see that the database property name for array type is arraytyp.
  8. Click the Filtering & Expansion tab.
    The filter that defines the objects to include in this report appears.

  9. To use the filter wizard to add a temporary additional phrase to this filter:
    1. Place the cursor in the filter so that a blue box appears around it.


    2. Click so that a set of drop-down lists appears, and then select AND > using a wizard.


    3. In the property dialog that appears, type or select from the list the property name arraytyp.
      The system displays all discovered values for that property.
    4. Select Symmetrix from the list, and click OK.


      The system redisplays the filter, with the new phrase added.
    5. Move the cursor to highlight the new phrase. Note that this time, you do now want the entire filter; you only want the new AND component.


    6. Click so that the set of drop-down lists appears.
    7. Select OR > using a wizard.


    8. In the dialog, type arraytyp and then select CLARiiON, and click OK.
      The filter redisplays, showing the additional OR phrase for CLARiiON.

    You now have a new filter phrase that you can copy for your scope criteria.
  10. Looking in the programmatic filter statement, copy the phrase that describes the new block and paste it into a text document to preserve it.
    The phrase is:
    (arraytyp=='Symmetrix'|arraytyp=='CLARiiON')
  11. In the report editing window, exit the editing mode by clicking BROWSE MODE at the top of the page.
    Warning Image
    Do not save this filter unless you also intend to alter the report definition. Our intentions in this use case were only to use the EDIT MODE for research and convenience.

  12. On the Create Scope dialog in the compliance module:
    1. Create a name for the new scope.
    2. Paste the phrase from your text document into the Criteria field.


  13. To verify that this scope criteria finds the members of the group that you expect, click Show Members.
  14. Click Save.
    The list of all scopes appears, with your new scope included on the list. You can now select this new scope for any compliance policy.

Results

You used the filter wizard to create syntactically correct scope criteria that finds all Symmetrix and CLARiiON arrays.

Back to Top

Use case: Create a scope of "starts with" host names

This scenario shows how to use the editing features in the ViPR SRM reporting interface to build "starts with" scope criteria. It also shows how to research a property name from an attribute column.

Some report columns are defined as attributes rather than properties. Although you cannot use an attribute in scope criteria, the information can help you determine the appropriate property name.

Assume that you are creating a policy that applies to a group of hosts. For this policy, you need a scope criteria that defines a group of servers based on host names. According to naming conventions in your environment, all members of this group have host names that start with the characters "MHM" or "mhm".

You do not know the property name that the ViPR SRM database uses for host names, and you are not sure of the syntax for a "starts with" scope.

You decide to use the editing features on a ViPR SRM report page to help you build the scope criteria.

Procedure

  1. Log in to the Console.
  2. Navigate to a report that includes a column for host names. For example, Explore > Hosts.


  3. Click EDIT MODE at the top of the page.
  4. To determine the database property name to use:
    1. Click the Report Details: Table tab.


    2. Notice that the column definition for Host uses an attribute, not a property.
      You cannot build a scope from an attribute. However, you can research the values behind the attribute.
    3. Notice that the attribute is derived from the node name.
      Node names (rows in this case) are defined by the report filter, so we will now go there.
    4. Click the Filtering & Expansion tab.


    5. Notice that the filter uses the devtype (device type) property.
      We will now research other properties in the database that describe devices.
    6. To expose the list of database properties, place the cursor so that the entire filter block is selected, click, and select AND > using a wizard.


    7. In the dialog, scroll to the property names that start with dev.
    8. Notice the device entry. The description of this property assures you that this is the property name you want.


  5. To build a filter block that selects all device values starting with the letters MHM:
    1. Select the device property.
    2. In the resulting dialog, click on the is operator on the dialog to expose other operators, and select Starts with.


    3. In the search field, type the letters MHM.

      The wizard returns a list of discovered members of the group that you just defined.



    4. Click OK.
      The filter redisplays, with the new block added.

  6. To add the lower-case letters to the filter:
    1. Click the new filter block and select OR > using a wizard.


    2. Type the beginnings of the word device, and then scroll to select the device property.
    3. Click the is operator, select Starts with, and type the letters mhm.


    4. Click OK.
      The filter block now includes both uppercase and lowercase letters.

  7. In the programmatic filter statement, copy the phrase that describes the new block and paste it into a text document to preserve it.
    (device='MHM%'|device='mhm%')
  8. In the report editing window, exit the editing mode by clicking BROWSE MODE at the top of the page.
    Warning Image
    Do not click Save unless you also intend to alter the report definition. Our intentions in this use case were only to use the EDIT MODE for research and convenience.

  9. On the Create Scope dialog in the compliance module:
    1. Create a name for the new scope.
    2. Paste the phrase from your text document into the scope criteria field.


  10. To verify that this scope criteria finds the members of the group that you expect, click Show Members.
  11. Click Save.
    The list of all scopes appears, with your new scope included on the list. You can now select this scope for any compliance policy.

Results

You used the filter wizard to create syntactically correct scope criteria that finds all hosts whose host name starts with "MHM" or "mhm."

Back to Top