use of org.ovirt.engine.api.model.VnicProfiles in project ovirt-engine by oVirt.
the class AbstractBackendVnicProfilesResource method mapCollection.
protected VnicProfiles mapCollection(List<org.ovirt.engine.core.common.businessentities.network.VnicProfile> entities) {
VnicProfiles collection = new VnicProfiles();
Map<Guid, Qos> qosMap = new HashMap<>();
for (org.ovirt.engine.core.common.businessentities.network.VnicProfile entity : entities) {
VnicProfile profile = populate(map(entity), entity);
collection.getVnicProfiles().add(profile);
if (entity.getNetworkQosId() != null) {
qosMap.put(entity.getNetworkQosId(), profile.getQos());
}
}
handleQosDataCenterLinks(qosMap);
for (VnicProfile vnicProfile : collection.getVnicProfiles()) {
addLinks(vnicProfile);
}
return collection;
}
use of org.ovirt.engine.api.model.VnicProfiles in project ovirt-engine by oVirt.
the class V3VnicProfilesInAdapter method adapt.
@Override
public VnicProfiles adapt(V3VnicProfiles from) {
VnicProfiles to = new VnicProfiles();
if (from.isSetActions()) {
to.setActions(adaptIn(from.getActions()));
}
if (from.isSetActive()) {
to.setActive(from.getActive());
}
if (from.isSetSize()) {
to.setSize(from.getSize());
}
if (from.isSetTotal()) {
to.setTotal(from.getTotal());
}
to.getVnicProfiles().addAll(adaptIn(from.getVnicProfiles()));
return to;
}
Aggregations