/** * This software is confidential. Quest Software Inc., or one of its subsidiaries, has supplied this software to you * under terms of a license agreement, nondisclosure agreement or both. * * You may not copy, disclose, or use this software except in accordance with those terms. * * Copyright 2017 Quest Software Inc. ALL RIGHTS RESERVED. * * QUEST SOFTWARE INC. MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, * OR NON-INFRINGEMENT. QUEST SOFTWARE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */ def set_asp(dbPlatform , agentID){ def agent = server.AgentService.findById( agentID ) def configService = server.get("ConfigService") def primaryASP = configService.getAgentInstancePrimaryAsp(agent.getAgentNamespace(), agent.getTypeId(), agent.getId()) if( dbPlatform == "DB_SQL_Server_SPI_Repository" ){ primaryASP.setValueByString("spirpUseSSl", "true"); } else if( dbPlatform == "DB_SQL_Server" ){ primaryASP.setValueByString("parcStorageUseSSl", "true"); } else if( dbPlatform == "SSAS_Agent" ){ primaryASP.setValueByString("ssasSpiCommonStorageUseSSl", "true"); } else if( dbPlatform == "SSAS_SPI_Repository" ){ primaryASP.setValueByString("spirpUseSSl", "true"); } configService.saveConfig(primaryASP); } def getFglamID(fglamName) { for(fglam in server.RemoteAgentManagementService.findAllRemoteClients()) { if(fglam.getDisplayName().equals(fglamName)) { return fglam.getId(); } } return "0"; } DB_TYPE = ["DB_SQL_Server_SPI_Repository" , "DB_SQL_Server" , "SSAS_Agent" , "SSAS_SPI_Repository"] def fglamName = ""; fglamMap = [:]; agents = server.AgentService.findAll(); def fglamID = getFglamID(fglamName); if(!fglamID.equals("0")) { for ( agent in agents) { if (DB_TYPE.contains(agent.getTypeId())&& agent.getRemoteClientId().equals(fglamID)) { fglamMap.put(agent.getId() , agent.getTypeId()); } } for (entry in fglamMap.entrySet()) { set_asp( entry.getValue() , entry.getKey() ); } } println(fglamMap.size()); return true;
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center