SmAgentConfig.removeAgentConfigProperties() method does not remove ACO properties that are commented out
search cancel

SmAgentConfig.removeAgentConfigProperties() method does not remove ACO properties that are commented out

book

Article ID: 7085

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

The SmAgentConfig.removeAgentConfigProperties() method does not remove

ACO properties that are commented out. The removeAgentConfigProperty

method has the same problem. So when I go on to the AdminUI and

comment out an ACO paramter, then I do my migrate using my SDK code,

it does not remove the non commented out parameter on the

target. Rather is creates a new parameter with the # symbol and

retains the one that is not commented out.

 

To illustrate that :

 

Source System

       Parameter -

        ValidTargetDomain = .rusniaklab.com

 

Modify Source system to be

              #ValidTargetDomain=.rusniaklab.com

 

Do Migrate

Target System ends up with

        ValidTargetDomain=.rusniaklab.com

#ValidTargetDomain=.rusniaklab.com 

 

How can I fix it ?

Environment

Policy Server 12.52SP1CR01SDK 12.52SP1CR04

Resolution

This issue is fixed in SDK 12.52SP1CR08.

New API to give the user of API calls the ability to delete not only
the ACO parameters but also the "#" commented out ACO parameters.

Previously, the API to delete ACO parameters uses the following
sequence of API code:

      SmAgentConfig agentconfig = new SmAgentConfig();
      SmApiResult result = policyapi.getAgentConfig("test-aco", agentconfig);

        if (result.isSuccess())
        {
           agentconfig.removeAgentConfigProperties();
           System.out.println("prop num: "+agentconfig.getPropNum());
           return policyapi.modifyAgentConfig(agentconfig)
        }

The NEW API call will be declared similar to modifyAgentConfig:

    public SmApiResult  modifyAgentConfigExt (SmAgentConfig agentConfig)
                               throws SmApiException;         

 The new code would be applied to the following to delete all ACO
  parameters including the commented ones:

 

        SmAgentConfig agentconfig = new SmAgentConfig();
        SmApiResult result = policyapi.getAgentConfig("test-aco", agentconfig);

        if (result.isSuccess())
       {
           agentconfig.removeAgentConfigProperties();
           System.out.println("prop num: "+agentconfig.getPropNum());
           return policyapi.modifyAgentConfigExt(agentconfig);
       }