Search in sources :

Example 11 with V3Status

use of org.ovirt.engine.api.v3.types.V3Status in project ovirt-engine by oVirt.

the class V3SpmOutAdapter method adapt.

@Override
public V3SPM adapt(Spm from) {
    V3SPM to = new V3SPM();
    if (from.isSetPriority()) {
        to.setPriority(from.getPriority());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    return to;
}
Also used : V3SPM(org.ovirt.engine.api.v3.types.V3SPM) V3Status(org.ovirt.engine.api.v3.types.V3Status)

Example 12 with V3Status

use of org.ovirt.engine.api.v3.types.V3Status in project ovirt-engine by oVirt.

the class V3StepOutAdapter method adapt.

@Override
public V3Step adapt(Step from) {
    V3Step to = new V3Step();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetEndTime()) {
        to.setEndTime(from.getEndTime());
    }
    if (from.isSetExternal()) {
        to.setExternal(from.isExternal());
    }
    if (from.isSetExternalType()) {
        to.setExternalType(from.getExternalType().value());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetJob()) {
        to.setJob(adaptOut(from.getJob()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetNumber()) {
        to.setNumber(from.getNumber());
    }
    if (from.isSetParentStep()) {
        to.setParentStep(adaptOut(from.getParentStep()));
    }
    if (from.isSetStartTime()) {
        to.setStartTime(from.getStartTime());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value().toUpperCase());
        to.setStatus(status);
    }
    if (from.isSetType()) {
        to.setType(from.getType().value());
    }
    return to;
}
Also used : V3Status(org.ovirt.engine.api.v3.types.V3Status) V3Step(org.ovirt.engine.api.v3.types.V3Step)

Example 13 with V3Status

use of org.ovirt.engine.api.v3.types.V3Status in project ovirt-engine by oVirt.

the class V3StorageDomainOutAdapter method adapt.

@Override
public V3StorageDomain adapt(StorageDomain from) {
    V3StorageDomain to = new V3StorageDomain();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetAvailable()) {
        to.setAvailable(from.getAvailable());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetCommitted()) {
        to.setCommitted(from.getCommitted());
    }
    if (from.isSetCriticalSpaceActionBlocker()) {
        to.setCriticalSpaceActionBlocker(from.getCriticalSpaceActionBlocker());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptOut(from.getDataCenter()));
    }
    if (from.isSetDataCenters()) {
        to.setDataCenters(new V3DataCenters());
        to.getDataCenters().getDataCenters().addAll(adaptOut(from.getDataCenters().getDataCenters()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetExternalStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getExternalStatus().value());
        to.setExternalStatus(status);
    }
    if (from.isSetHost()) {
        to.setHost(adaptOut(from.getHost()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetImport()) {
        to.setImport(from.isImport());
    }
    if (from.isSetMaster()) {
        to.setMaster(from.isMaster());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetStorage()) {
        to.setStorage(adaptOut(from.getStorage()));
    }
    if (from.isSetStorageFormat()) {
        to.setStorageFormat(from.getStorageFormat().value());
    }
    if (from.isSetType()) {
        to.setType(from.getType().value());
    }
    if (from.isSetUsed()) {
        to.setUsed(from.getUsed());
    }
    if (from.isSetWarningLowSpaceIndicator()) {
        to.setWarningLowSpaceIndicator(from.getWarningLowSpaceIndicator());
    }
    if (from.isSetWipeAfterDelete()) {
        to.setWipeAfterDelete(from.isWipeAfterDelete());
    }
    return to;
}
Also used : V3StorageDomain(org.ovirt.engine.api.v3.types.V3StorageDomain) V3DataCenters(org.ovirt.engine.api.v3.types.V3DataCenters) V3Status(org.ovirt.engine.api.v3.types.V3Status)

Example 14 with V3Status

use of org.ovirt.engine.api.v3.types.V3Status in project ovirt-engine by oVirt.

the class V3DataCenterOutAdapter method adapt.

@Override
public V3DataCenter adapt(DataCenter from) {
    V3DataCenter to = new V3DataCenter();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetLocal()) {
        to.setLocal(from.isLocal());
    }
    if (from.isSetMacPool()) {
        to.setMacPool(adaptOut(from.getMacPool()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetQuotaMode()) {
        to.setQuotaMode(from.getQuotaMode().value());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetStorageFormat()) {
        to.setStorageFormat(from.getStorageFormat().value());
    }
    if (from.isSetSupportedVersions()) {
        to.setSupportedVersions(new V3SupportedVersions());
        to.getSupportedVersions().getVersions().addAll(adaptOut(from.getSupportedVersions().getVersions()));
    }
    if (from.isSetVersion()) {
        to.setVersion(adaptOut(from.getVersion()));
    }
    return to;
}
Also used : V3DataCenter(org.ovirt.engine.api.v3.types.V3DataCenter) V3SupportedVersions(org.ovirt.engine.api.v3.types.V3SupportedVersions) V3Status(org.ovirt.engine.api.v3.types.V3Status)

Example 15 with V3Status

use of org.ovirt.engine.api.v3.types.V3Status in project ovirt-engine by oVirt.

the class V3DiskOutAdapter method adapt.

@Override
public V3Disk adapt(Disk from) {
    V3Disk to = new V3Disk();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetActualSize()) {
        to.setActualSize(from.getActualSize());
    }
    if (from.isSetAlias()) {
        to.setAlias(from.getAlias());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDiskProfile()) {
        to.setDiskProfile(adaptOut(from.getDiskProfile()));
    }
    if (from.isSetFormat()) {
        to.setFormat(from.getFormat().value());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetImageId()) {
        to.setImageId(from.getImageId());
    }
    if (from.isSetInstanceType()) {
        to.setInstanceType(adaptOut(from.getInstanceType()));
    }
    if (from.isSetLunStorage()) {
        to.setLunStorage(adaptOut(from.getLunStorage()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOpenstackVolumeType()) {
        to.setOpenstackVolumeType(adaptOut(from.getOpenstackVolumeType()));
    }
    if (from.isSetPropagateErrors()) {
        to.setPropagateErrors(from.isPropagateErrors());
    }
    if (from.isSetProvisionedSize()) {
        to.setProvisionedSize(from.getProvisionedSize());
        // In V3 "size" used to be a synonym of "provisioned_size":
        to.setSize(from.getProvisionedSize());
    }
    if (from.isSetQuota()) {
        to.setQuota(adaptOut(from.getQuota()));
    }
    if (from.isSetReadOnly()) {
        to.setReadOnly(from.isReadOnly());
    }
    if (from.isSetSgio()) {
        to.setSgio(from.getSgio().value());
    }
    if (from.isSetShareable()) {
        to.setShareable(from.isShareable());
    }
    if (from.isSetSnapshot()) {
        to.setSnapshot(adaptOut(from.getSnapshot()));
    }
    if (from.isSetSparse()) {
        to.setSparse(from.isSparse());
    }
    if (from.isSetStatistics()) {
        to.setStatistics(new V3Statistics());
        to.getStatistics().getStatistics().addAll(adaptOut(from.getStatistics().getStatistics()));
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetStorageDomain()) {
        to.setStorageDomain(adaptOut(from.getStorageDomain()));
    }
    if (from.isSetStorageDomains()) {
        to.setStorageDomains(new V3StorageDomains());
        to.getStorageDomains().getStorageDomains().addAll(adaptOut(from.getStorageDomains().getStorageDomains()));
    }
    if (from.isSetStorageType()) {
        to.setStorageType(from.getStorageType().value());
    }
    if (from.isSetTemplate()) {
        to.setTemplate(adaptOut(from.getTemplate()));
    }
    if (from.isSetUsesScsiReservation()) {
        to.setUsesScsiReservation(from.isUsesScsiReservation());
    }
    if (from.isSetVm()) {
        to.setVm(adaptOut(from.getVm()));
    }
    if (from.isSetVms()) {
        to.setVms(new V3VMs());
        to.getVms().getVMs().addAll(adaptOut(from.getVms().getVms()));
    }
    if (from.isSetWipeAfterDelete()) {
        to.setWipeAfterDelete(from.isWipeAfterDelete());
    }
    return to;
}
Also used : V3Disk(org.ovirt.engine.api.v3.types.V3Disk) V3Status(org.ovirt.engine.api.v3.types.V3Status) V3Statistics(org.ovirt.engine.api.v3.types.V3Statistics) V3VMs(org.ovirt.engine.api.v3.types.V3VMs) V3StorageDomains(org.ovirt.engine.api.v3.types.V3StorageDomains)

Aggregations

V3Status (org.ovirt.engine.api.v3.types.V3Status)23 V3Statistics (org.ovirt.engine.api.v3.types.V3Statistics)6 DiskAttachment (org.ovirt.engine.api.model.DiskAttachment)4 TimeZone (org.ovirt.engine.api.model.TimeZone)4 V3CustomProperties (org.ovirt.engine.api.v3.types.V3CustomProperties)4 V3Disk (org.ovirt.engine.api.v3.types.V3Disk)4 HashSet (java.util.HashSet)3 List (java.util.List)3 Set (java.util.Set)3 Collectors.toList (java.util.stream.Collectors.toList)3 Link (org.ovirt.engine.api.model.Link)3 V3Adapter (org.ovirt.engine.api.v3.V3Adapter)3 V3OutAdapters.adaptOut (org.ovirt.engine.api.v3.adapters.V3OutAdapters.adaptOut)3 V3KatelloErrata (org.ovirt.engine.api.v3.types.V3KatelloErrata)3 Disk (org.ovirt.engine.api.model.Disk)2 Host (org.ovirt.engine.api.model.Host)2 HostType (org.ovirt.engine.api.model.HostType)2 Spm (org.ovirt.engine.api.model.Spm)2 Vm (org.ovirt.engine.api.model.Vm)2 V3CdRoms (org.ovirt.engine.api.v3.types.V3CdRoms)2