use of org.ovirt.engine.api.model.SeLinuxMode in project ovirt-engine by oVirt.
the class HostMapper method map.
@Mapping(from = VDS.class, to = SeLinux.class)
public static SeLinux map(VDS entity, SeLinux template) {
SeLinux model = template != null ? template : new SeLinux();
if (entity.getSELinuxEnforceMode() == null) {
return model;
}
SeLinuxMode mode = null;
switch(entity.getSELinuxEnforceMode()) {
case DISABLED:
mode = SeLinuxMode.DISABLED;
break;
case PERMISSIVE:
mode = SeLinuxMode.PERMISSIVE;
break;
case ENFORCING:
mode = SeLinuxMode.ENFORCING;
}
model.setMode(mode);
return model;
}
Aggregations