use of org.ovirt.engine.api.model.ExternalHost in project ovirt-engine by oVirt.
the class ExternalHostMapper method map.
@Mapping(from = VDS.class, to = ExternalHost.class)
public static ExternalHost map(VDS entity, ExternalHost template) {
ExternalHost model = template != null ? template : new ExternalHost();
String name = entity.getName();
if (name != null) {
model.setId(string2hex(name));
model.setName(name);
}
if (entity.getHostName() != null) {
model.setAddress(entity.getHostName());
}
return model;
}
Aggregations