Search in sources :

Example 1 with ReportedConfiguration

use of org.ovirt.engine.api.model.ReportedConfiguration in project ovirt-engine by oVirt.

the class ReportedConfigurationsMapper method map.

@Mapping(from = org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations.class, to = ReportedConfigurations.class)
public static ReportedConfigurations map(org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations entity, ReportedConfigurations template) {
    ReportedConfigurations model = template == null ? new ReportedConfigurations() : template;
    List<ReportedConfiguration> reportedConfigurationList = model.getReportedConfigurations();
    for (org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration reportedConfiguration : entity.getReportedConfigurationList()) {
        ReportedConfiguration conf = new ReportedConfiguration();
        conf.setInSync(reportedConfiguration.isInSync());
        conf.setName(reportedConfiguration.getType().getName());
        conf.setActualValue(reportedConfiguration.getActualValue());
        conf.setExpectedValue(reportedConfiguration.getExpectedValue());
        reportedConfigurationList.add(conf);
    }
    return model;
}
Also used : ReportedConfigurations(org.ovirt.engine.api.model.ReportedConfigurations) ReportedConfiguration(org.ovirt.engine.api.model.ReportedConfiguration)

Aggregations

ReportedConfiguration (org.ovirt.engine.api.model.ReportedConfiguration)1 ReportedConfigurations (org.ovirt.engine.api.model.ReportedConfigurations)1