use of org.ovirt.engine.api.model.NetworkAttachments in project ovirt-engine by oVirt.
the class V3NetworkAttachmentsInAdapter method adapt.
@Override
public NetworkAttachments adapt(V3NetworkAttachments from) {
NetworkAttachments to = new NetworkAttachments();
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.getNetworkAttachments().addAll(adaptIn(from.getNetworkAttachments()));
return to;
}
use of org.ovirt.engine.api.model.NetworkAttachments in project ovirt-engine by oVirt.
the class AbstractBackendNetworkAttachmentsResource method mapCollection.
private NetworkAttachments mapCollection(List<org.ovirt.engine.core.common.businessentities.network.NetworkAttachment> networkAttachments) {
NetworkAttachments collection = new NetworkAttachments();
for (org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentEntity : networkAttachments) {
NetworkAttachment networkAttachmentModel = populate(map(networkAttachmentEntity), networkAttachmentEntity);
collection.getNetworkAttachments().add(addLinks(networkAttachmentModel, getParentClass()));
}
return collection;
}
Aggregations