Search in sources :

Example 1 with V3Properties

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

the class V3OpenStackNetworkProviderOutAdapter method adapt.

@Override
public V3OpenStackNetworkProvider adapt(OpenStackNetworkProvider from) {
    V3OpenStackNetworkProvider to = new V3OpenStackNetworkProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetAgentConfiguration()) {
        to.setAgentConfiguration(adaptOut(from.getAgentConfiguration()));
    }
    if (from.isSetAuthenticationUrl()) {
        to.setAuthenticationUrl(from.getAuthenticationUrl());
    }
    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.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetPluginType()) {
        to.setPluginType(from.getPluginType().value());
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    if (from.isSetRequiresAuthentication()) {
        to.setRequiresAuthentication(from.isRequiresAuthentication());
    }
    if (from.isSetTenantName()) {
        to.setTenantName(from.getTenantName());
    }
    if (from.isSetUrl()) {
        to.setUrl(from.getUrl());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : V3OpenStackNetworkProvider(org.ovirt.engine.api.v3.types.V3OpenStackNetworkProvider) V3Properties(org.ovirt.engine.api.v3.types.V3Properties)

Example 2 with V3Properties

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

the class V3OpenStackVolumeTypeOutAdapter method adapt.

@Override
public V3OpenStackVolumeType adapt(OpenStackVolumeType from) {
    V3OpenStackVolumeType to = new V3OpenStackVolumeType();
    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.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOpenstackVolumeProvider()) {
        to.setOpenstackVolumeProvider(adaptOut(from.getOpenstackVolumeProvider()));
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    return to;
}
Also used : V3OpenStackVolumeType(org.ovirt.engine.api.v3.types.V3OpenStackVolumeType) V3Properties(org.ovirt.engine.api.v3.types.V3Properties)

Example 3 with V3Properties

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

the class V3HostNicOutAdapter method adapt.

@Override
public V3HostNIC adapt(HostNic from) {
    V3HostNIC to = new V3HostNIC();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
        // In version 3 of the API the name of the network labels sub-collection was just "labels", but in version
        // 4 of the API it has been renamed to "networklabels", so we need to adjust the links accordingly:
        to.getLinks().stream().filter(this::isNetworksLabelsLink).forEach(this::fixNetworkLabelsLink);
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetBaseInterface()) {
        to.setBaseInterface(from.getBaseInterface());
    }
    if (from.isSetBonding()) {
        to.setBonding(adaptOut(from.getBonding()));
    }
    if (from.isSetBootProtocol()) {
        to.setBootProtocol(from.getBootProtocol().value());
    }
    if (from.isSetBridged()) {
        to.setBridged(from.isBridged());
    }
    if (from.isSetCheckConnectivity()) {
        to.setCheckConnectivity(from.isCheckConnectivity());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetCustomConfiguration()) {
        to.setCustomConfiguration(from.isCustomConfiguration());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetHost()) {
        to.setHost(adaptOut(from.getHost()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetIp()) {
        to.setIp(adaptOut(from.getIp()));
    }
    if (from.isSetNetworkLabels()) {
        to.setLabels(new V3Labels());
        to.getLabels().getLabels().addAll(adaptOut(from.getNetworkLabels().getNetworkLabels()));
    }
    if (from.isSetMac()) {
        to.setMac(adaptOut(from.getMac()));
    }
    if (from.isSetMtu()) {
        to.setMtu(from.getMtu());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetNetwork()) {
        to.setNetwork(adaptOut(from.getNetwork()));
    }
    if (from.isSetOverrideConfiguration()) {
        to.setOverrideConfiguration(from.isOverrideConfiguration());
    }
    if (from.isSetPhysicalFunction()) {
        to.setPhysicalFunction(adaptOut(from.getPhysicalFunction()));
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    if (from.isSetQos()) {
        to.setQos(adaptOut(from.getQos()));
    }
    if (from.isSetSpeed()) {
        to.setSpeed(from.getSpeed());
    }
    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.isSetVirtualFunctionsConfiguration()) {
        to.setVirtualFunctionsConfiguration(adaptOut(from.getVirtualFunctionsConfiguration()));
    }
    if (from.isSetVlan()) {
        to.setVlan(adaptOut(from.getVlan()));
    }
    return to;
}
Also used : V3Labels(org.ovirt.engine.api.v3.types.V3Labels) V3Status(org.ovirt.engine.api.v3.types.V3Status) V3Statistics(org.ovirt.engine.api.v3.types.V3Statistics) V3Properties(org.ovirt.engine.api.v3.types.V3Properties) V3HostNIC(org.ovirt.engine.api.v3.types.V3HostNIC)

Example 4 with V3Properties

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

the class V3SchedulingPolicyUnitOutAdapter method adapt.

@Override
public V3SchedulingPolicyUnit adapt(SchedulingPolicyUnit from) {
    V3SchedulingPolicyUnit to = new V3SchedulingPolicyUnit();
    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.isSetEnabled()) {
        to.setEnabled(from.isEnabled());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetInternal()) {
        to.setInternal(from.isInternal());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetProperties()) {
        to.setPropertiesMetaData(new V3Properties());
        to.getPropertiesMetaData().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    if (from.isSetType()) {
        to.setType(from.getType().value());
    }
    return to;
}
Also used : V3SchedulingPolicyUnit(org.ovirt.engine.api.v3.types.V3SchedulingPolicyUnit) V3Properties(org.ovirt.engine.api.v3.types.V3Properties)

Example 5 with V3Properties

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

the class V3SchedulingPolicyOutAdapter method adapt.

@Override
public V3SchedulingPolicy adapt(SchedulingPolicy from) {
    V3SchedulingPolicy to = new V3SchedulingPolicy();
    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.isSetDefaultPolicy()) {
        to.setDefaultPolicy(from.isDefaultPolicy());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetLocked()) {
        to.setLocked(from.isLocked());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetProperties()) {
        to.setProperties(new V3Properties());
        to.getProperties().getProperties().addAll(adaptOut(from.getProperties().getProperties()));
    }
    return to;
}
Also used : V3SchedulingPolicy(org.ovirt.engine.api.v3.types.V3SchedulingPolicy) V3Properties(org.ovirt.engine.api.v3.types.V3Properties)

Aggregations

V3Properties (org.ovirt.engine.api.v3.types.V3Properties)11 V3ExternalHostProvider (org.ovirt.engine.api.v3.types.V3ExternalHostProvider)1 V3ExternalProvider (org.ovirt.engine.api.v3.types.V3ExternalProvider)1 V3HostNIC (org.ovirt.engine.api.v3.types.V3HostNIC)1 V3IpAddressAssignments (org.ovirt.engine.api.v3.types.V3IpAddressAssignments)1 V3Labels (org.ovirt.engine.api.v3.types.V3Labels)1 V3NetworkAttachment (org.ovirt.engine.api.v3.types.V3NetworkAttachment)1 V3OpenStackImageProvider (org.ovirt.engine.api.v3.types.V3OpenStackImageProvider)1 V3OpenStackNetworkProvider (org.ovirt.engine.api.v3.types.V3OpenStackNetworkProvider)1 V3OpenStackProvider (org.ovirt.engine.api.v3.types.V3OpenStackProvider)1 V3OpenStackVolumeProvider (org.ovirt.engine.api.v3.types.V3OpenStackVolumeProvider)1 V3OpenStackVolumeType (org.ovirt.engine.api.v3.types.V3OpenStackVolumeType)1 V3ReportedConfigurations (org.ovirt.engine.api.v3.types.V3ReportedConfigurations)1 V3SchedulingPolicy (org.ovirt.engine.api.v3.types.V3SchedulingPolicy)1 V3SchedulingPolicyUnit (org.ovirt.engine.api.v3.types.V3SchedulingPolicyUnit)1 V3Statistics (org.ovirt.engine.api.v3.types.V3Statistics)1 V3Status (org.ovirt.engine.api.v3.types.V3Status)1