Symantec Access Management

  • 1.  ACO Movement from one server to another

    Posted Feb 14, 2017 02:24 AM
    We are trying to copy our ACOs from one server to another.
    We are doing this via code using the SmPolicyApi.   We are facing an issue when we try to copy an ACO which already exists on the destination server.   We have tried to modify the values but they are not getting saved post implementation.   We have also tried to rename the existing ACO on the destination server via code but on execution it is not renaming them as well.

    Please find below the code snippet for the same:

     

    result = smPolApi_130.getAgentConfig(vectorACO.get(i).toString(), smACO);

    if(result.getFacility()==4){

    if(smACO.getName().equals("test_aco")){
    smPolApi_206.getAgentConfig(vectorACO.get(i).toString(), smACO_206);
    smACO_206.setName(smACO.getName()+"_old");

    result=smPolApi_206.modifyAgentConfig(smACO_206);

    if(result.getFacility()==4){
    log.info("aco added in 206 policy server and name of aco: "+smACO_206.getName());
    }else{
    log.error("error while modifying aco:"+smACO_206.getName());

    }
    }



  • 2.  Re: ACO Movement from one server to another

    Posted Feb 28, 2017 09:31 PM

    Hi UtxSupport,

     

    Please try with below code and let us know the results:

    *******************

    private SmApiResult
    updateAgentConfig(SmPolicyApi policyapi)
    {
    SmApiResult result = null;
    try {
    SmAgentConfig agentconfig = new SmAgentConfig();
    result = policyapi.getAgentConfig("aco_temp", agentconfig);

    if (result.isSuccess())
    {
    agentconfig.setDescription(SAMPLE_DESC + "agentconfig-modify");

    int propNumber = agentconfig.getPropNum();

    SmProperty properties[] = new SmProperty[ propNumber + 1 ]; // we are adding one more property while
    // updating the Agent Config Object
    agentconfig.getAgentConfigProperties(properties);

    properties[propNumber] = new SmProperty("Admin", "iisAdmin");

    agentconfig.setAgentConfigProperties(properties);

    return policyapi.modifyAgentConfig(agentconfig);
    }
    }catch (Exception e )
    {
    e.printStackTrace();
    }

    return result;
    }

    ******************

    Also if you have multiple policy server ,the changes may not reflect immediately.
    So Please try with single policy server and viewing the changes from the same Admin UI.

     

    Thanks,
    Santosh