Package com.intel.mountwilson.as.hosttrustreport.data

Examples of com.intel.mountwilson.as.hosttrustreport.data.HostsTrustReportType





        try {
            HostsTrustReportType hostsTrustReportType = new HostsTrustReportType();
            for (Hostname host : hostNames) {
                TblHosts tblHosts = new TblHostsJpaController(getEntityManagerFactory()).findByName(host.toString()); // datatype.Hostname


                if (tblHosts == null) {
                    throw new ASException(ErrorCode.AS_HOST_NOT_FOUND, host);
                }

                List<TblTaLog> logs = new TblTaLogJpaController(getEntityManagerFactory()).findTrustStatusByHostId(tblHosts.getId(), 5);

                if (logs != null) {

                    for (TblTaLog log : logs) {
                        HostType hostType = new HostType();
                        hostType.setHostName(host.toString()); // datatype.Hostname
                        hostType.setMLEInfo(getMleInfo(tblHosts));
                        hostType.setTrustStatus(getTrustStatus(log.getError()));
                        hostType.setVerifiedOn(Util.getCalendar(log.getUpdatedOn()));
                        hostsTrustReportType.getHost().add(hostType);
                    }
                }


            }
View Full Code Here


    @Override
    public HostsTrustReportType getHostTrustReport (List<Hostname> hostnames) throws IOException, ApiException, SignatureException, JAXBException {
        String hostNamesCSV = StringUtils.join(hostnames, ",");
        MultivaluedMap<String,String> query = new MultivaluedMapImpl();
        query.add("hostNames", hostNamesCSV);
        HostsTrustReportType report = fromXML(httpGet(asurl("/hosts/reports/trust", query)), HostsTrustReportType.class);
        return report;
    }
View Full Code Here

       
     @Override
  public List<HostReportTypeVO> getHostTrustReport(List<String> hostNames,ApiClient client)throws DemoPortalException {
   
                                AttestationService service = (AttestationService) client;
                                HostsTrustReportType report = null;
                                List<HostReportTypeVO> hostReportTypeVO = new ArrayList<HostReportTypeVO>();
                                        try {
                                List<Hostname> hostList = new ArrayList<Hostname>();
                                for (String host : hostNames) {
                                        hostList.add(new Hostname(host));
                                }
                                report = service.getHostTrustReport(hostList);
                                        } catch (Exception e) {
                                                log.error(e.getMessage());
                                                throw  ConnectionUtil.handleException(e);
                                        }

                                        List<HostType> list = report.getHost();

                                        for (HostType hostType : list) {
                                        HostReportTypeVO vo = new HostReportTypeVO();
                                        vo.setHostName(hostType.getHostName());
                                        vo.setMleInfo(hostType.getMLEInfo());
View Full Code Here

TOP

Related Classes of com.intel.mountwilson.as.hosttrustreport.data.HostsTrustReportType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.