@Override public boolean configure(String name, Map<String, Object> params) { final Map<String, String> configs = _configDao.getConfiguration("management-server", params); _proxy = configs.get(Config.SecStorageProxy.key()); String cert = configs.get("secstorage.ssl.cert.domain"); if (!"realhostip.com".equalsIgnoreCase(cert)) { s_logger.warn( "Only realhostip.com ssl cert is supported, ignoring self-signed and other certs"); } _copyAuthPasswd = configs.get("secstorage.copy.password"); DownloadListener dl = new DownloadListener(this); ComponentContext.inject(dl); _agentMgr.registerForHostEvents(dl, true, false, false); return true; }
@Override public boolean configure(String name, Map<String, Object> params) { final Map<String, String> configs = _configDao.getConfiguration("ManagementServer", params); _sslCopy = Boolean.parseBoolean(configs.get("secstorage.encrypt.copy")); _proxy = configs.get(Config.SecStorageProxy.key()); _ssvmUrlDomain = configs.get("secstorage.ssl.cert.domain"); _copyAuthPasswd = configs.get("secstorage.copy.password"); _agentMgr.registerForHostEvents(new DownloadListener(this), true, false, false); ReadyTemplateStatesSearch = _vmTemplateHostDao.createSearchBuilder(); ReadyTemplateStatesSearch.and( "download_state", ReadyTemplateStatesSearch.entity().getDownloadState(), SearchCriteria.Op.EQ); ReadyTemplateStatesSearch.and( "destroyed", ReadyTemplateStatesSearch.entity().getDestroyed(), SearchCriteria.Op.EQ); ReadyTemplateStatesSearch.and( "host_id", ReadyTemplateStatesSearch.entity().getHostId(), SearchCriteria.Op.EQ); SearchBuilder<VMTemplateVO> TemplatesWithNoChecksumSearch = _templateDao.createSearchBuilder(); TemplatesWithNoChecksumSearch.and( "checksum", TemplatesWithNoChecksumSearch.entity().getChecksum(), SearchCriteria.Op.NULL); ReadyTemplateStatesSearch.join( "vm_template", TemplatesWithNoChecksumSearch, TemplatesWithNoChecksumSearch.entity().getId(), ReadyTemplateStatesSearch.entity().getTemplateId(), JoinBuilder.JoinType.INNER); TemplatesWithNoChecksumSearch.done(); ReadyTemplateStatesSearch.done(); return true; }