Search in sources :

Example 1 with ExternalHost

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;
}
Also used : ExternalHost(org.ovirt.engine.api.model.ExternalHost) Mapping(org.ovirt.engine.api.restapi.types.Mapping)

Aggregations

ExternalHost (org.ovirt.engine.api.model.ExternalHost)1 Mapping (org.ovirt.engine.api.restapi.types.Mapping)1