6 Customizing Your BRM LDAP Environment

This chapter discusses how to extend and modify the list of objects that Oracle Communications Billing and Revenue Management (BRM) LDAP Manager exports. For the default list of objects, see "Determining the /r_user Object Class Attributes".

This document also describes sample filters you can use in the directory server with input templates search opcodes in LDAP Manager.

Exporting Additional Data to the Directory Server

You can export more data to your LDAP directory server than the data exported by default by LDAP Manager. However, you must make sure that the LDAP Data Manager can update data in the directory server after the data is created.

Exporting Additional Fields from Objects

This section explains how to export additional fields from /account, /service/ip, or /service/email objects to the directory server. For the list of fields that are pushed to the directory server by default, see "Determining the /r_user Object Class Attributes".

Assume that you want to push some accounting information, specifically the accounting cycle day of the month (PIN_FLD_ACTG_DOM) field from the /billinfo object. Whenever you modify this field in the /billinfo object (via PCM_OP_CUST_SET_BILLINFO), an /event/customer/billinfo event is generated.

You must perform the following steps in the PCM_OP_REPL_POL_PUSH opcode:

  1. Read PIN_FLD_ACTG_CYCLE_DOM from the bill unit (/billinfo object) in addition to other fields that are already being read in the function.

    fm_repl_pol_get_account_flds() is located in the file fm_repl_pol_translate.c as follows:

    PIN_FLIST_FLD_SET(read_flistp, PIN_FLD_ACTG_CYCLE_DOM, NULL, ebufp);
      
    
  2. Recompile the policy and restart the CM.

  3. Define an attribute with integer syntax in the directory server. Make sure the objectClass of the entry that holds the account /service information in the directory server allows this attribute. For example, you could define the attribute actgdom by editing the ruser object class using the directory server manager and add actgdom to the list of allowed attributes.

  4. Add the accounting day of the month field in the LDAP Data Manager mapping file (ldap.idl):

  5. Add the following code to the /r_user class definition of the mapping file:

    INT PIN_FLD_ACTG_CYCLE_DOM {
         CREATE = Optional;
         MODIFY = Writeable;
    }
      
    
  6. Add the following code to the /r_user class implementation section of the mapping file to define the new attribute:

    INT PIN_FLD_ACTG_CYCLE_DOM {
         ATTRIBUTE = "actgdom";
    } 
    

Tracking Additional Changes to /account or /service Objects

The /account object information is pushed to the directory server when any of the following events are generated (as listed in the PIN_FLD_SUPPLIERS array of /channel 101):

  • /event/customer/nameinfo

  • /event/customer/product_status

  • /event/customer/status

  • /event/customer/billinfo

You can track additional changes to the /account and /service objects. This section provides an example of how to track an additional change in the /account object so that it can be pushed to the directory server.

Pushing the /account object information to the directory server when you update account information creates and /event/customer/billinfo event:

  1. Add /event/customer/billinfo to the PIN_FLD_SUPPLIERS array in /channel 100. You can do this by running the PCM_OP_WRITE_FLDS opcode from testnap.

    For example assume the following flist is stored in a file called add.flist:

    0 PIN_FLD_POID          POID  [0] $DB_NO /channel 101
    0 PIN_FLD_SUPPLIERS     ARRAY [5]
    1 PIN_FLD_SUPPLIER_OBJ  POID  [0] $DB_NO 
    /event/customer/billinfo -1
      
    
  2. Run testnap and use this flist as input to the write fields operation:

    sh> testnap
    testnap> r add.flist 1
    testnap> wflds 1
    testnap> q
      
    
  3. To trigger BRM to call the policy opcode PCM_OP_ACT_POL_EVENT_NOTIFY (opcode number 301) whenever an /event/customer/billinfo event is generated, add the following line to your system's event notification list:

    301    0 /event/customer/billinfo
      
    

    See "Implementing Event Notification" in BRM Developer's Guide.

  4. Set up the account modification channel to be updated when an /event/customer/billinfo event is generated by adding the following to the fm_act_pol_event_notify_ldap function in the PCM_OP_ACT_POL_EVENT_NOTIFY policy opcode:

    if (fm_utils_is_subtype(e_pdp,PIN_OBJ_TYPE_EVENT_CREATE_BILLINFO) == 1){
        type = PIN_OBJ_TYPE_EVENT_CREATE_BILLINFO;
        push_account_modify = 1;
      
    if (push_account_modify || push_service_modify) {
        flistp = PIN_FLIST_CREATE(ebufp);
        PIN_FLIST_FLD_PUT(flistp, PIN_FLD_POID, (void *)ch_pdp, ebufp);
        db_id = PIN_POID_GET_DB(e_pdp);
        id = PIN_POID_GET_ID(e_pdp);
        e_pdp1 = PIN_POID_CREATE(db_id, type, id, ebufp);
        PIN_FLIST_FLD_PUT(flistp, PIN_FLD_SUPPLIER_OBJ,
    (void*)e_pdp1, ebufp);
    }
    

    Note:

    This policy opcode is implemented in the BRM_Home/source/sys/fm_act_pol/fm_act_pol_event_notify.c file.

    The PCM_OP_REPL_POL_PUSH policy opcode searches for all channels that have /event/customer/billinfo as one of its PIN_FLD_SUPPLIER_OBJ values and create /channel_event objects for each of those channels.

  5. Recompile the policy and restart the CM.

Exporting New Service Types

Assume that you want to export the information from a custom service object called /service/web. BRM updates the service creation and service modification channel objects (/channel 102 and /channel 103) when the /service/web objects are created or modified. If you use the user scheme (where service and account object information are made available from a single entry in the directory server), you do the following:

  1. Define the attributes that correspond to this service object in the LDAP directory server. For example, web-login, web-password, and web-size-limit.

  2. Add the attributes that correspond to the ruser service object to the list of allowed attributes in the objectclass.

  3. Define the mapping for these attributes in the LDAP Data Manager mapping file (ldap.idl).

    For example:

    PIN_FLD_WEB_LOGIN maps to web-login

    PIN_FLD_WEB_PASSWORD maps to web-password

    PIN_FLD_WEB_LIMIT maps to web-size-limit

  4. Enhance the replication policy PCM_OP_REPL_POL_PUSH to handle /service/web. Since each creation and modification is individually tracked, the newly created service or service modification is automatically picked up.

    Tip:

    See the code in policy file fm_repl_pol_translate.c, which implements the part that reads from the service object and pushes it to dm_ldap. You can handle the /service/web object fields just like the fields in /service/email.