Search in sources :

Example 16 with Properties

use of org.ovirt.engine.api.model.Properties in project ovirt-engine by oVirt.

the class V3NetworkAttachmentInAdapter method adapt.

@Override
public NetworkAttachment adapt(V3NetworkAttachment from) {
    NetworkAttachment to = new NetworkAttachment();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetHost()) {
        to.setHost(adaptIn(from.getHost()));
    }
    if (from.isSetHostNic()) {
        to.setHostNic(adaptIn(from.getHostNic()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetIpAddressAssignments()) {
        to.setIpAddressAssignments(new IpAddressAssignments());
        to.getIpAddressAssignments().getIpAddressAssignments().addAll(adaptIn(from.getIpAddressAssignments().getIpAddressAssignments()));
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetNetwork()) {
        to.setNetwork(adaptIn(from.getNetwork()));
    }
    if (from.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(from.getProperties().getProperties()));
    }
    if (from.isSetQos()) {
        to.setQos(adaptIn(from.getQos()));
    }
    if (from.isSetReportedConfigurations()) {
        if (from.getReportedConfigurations().isSetInSync()) {
            to.setInSync(from.getReportedConfigurations().isInSync());
        }
        to.setReportedConfigurations(new ReportedConfigurations());
        to.getReportedConfigurations().getReportedConfigurations().addAll(adaptIn(from.getReportedConfigurations().getReportedConfigurations()));
    }
    return to;
}
Also used : ReportedConfigurations(org.ovirt.engine.api.model.ReportedConfigurations) IpAddressAssignments(org.ovirt.engine.api.model.IpAddressAssignments) Properties(org.ovirt.engine.api.model.Properties) V3NetworkAttachment(org.ovirt.engine.api.v3.types.V3NetworkAttachment) NetworkAttachment(org.ovirt.engine.api.model.NetworkAttachment)

Example 17 with Properties

use of org.ovirt.engine.api.model.Properties in project ovirt-engine by oVirt.

the class V3OpenStackProviderInAdapter method adapt.

@Override
public OpenStackProvider adapt(V3OpenStackProvider from) {
    OpenStackProvider to = new OpenStackProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    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.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(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 : OpenStackProvider(org.ovirt.engine.api.model.OpenStackProvider) V3OpenStackProvider(org.ovirt.engine.api.v3.types.V3OpenStackProvider) Properties(org.ovirt.engine.api.model.Properties)

Example 18 with Properties

use of org.ovirt.engine.api.model.Properties in project ovirt-engine by oVirt.

the class V3OpenStackVolumeProviderInAdapter method adapt.

@Override
public OpenStackVolumeProvider adapt(V3OpenStackVolumeProvider from) {
    OpenStackVolumeProvider to = new OpenStackVolumeProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetAuthenticationUrl()) {
        to.setAuthenticationUrl(from.getAuthenticationUrl());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptIn(from.getDataCenter()));
    }
    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.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(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 : V3OpenStackVolumeProvider(org.ovirt.engine.api.v3.types.V3OpenStackVolumeProvider) OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider) Properties(org.ovirt.engine.api.model.Properties)

Aggregations

Properties (org.ovirt.engine.api.model.Properties)18 Map (java.util.Map)5 Property (org.ovirt.engine.api.model.Property)5 HashMap (java.util.HashMap)4 Mapping (org.ovirt.engine.api.restapi.types.Mapping)3 OpenStackImageProvider (org.ovirt.engine.api.model.OpenStackImageProvider)2 OpenStackNetworkProvider (org.ovirt.engine.api.model.OpenStackNetworkProvider)2 OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)2 SchedulingPolicy (org.ovirt.engine.api.model.SchedulingPolicy)2 V3SchedulingPolicy (org.ovirt.engine.api.v3.types.V3SchedulingPolicy)2 V3SchedulingPolicyThresholds (org.ovirt.engine.api.v3.types.V3SchedulingPolicyThresholds)2 WebApplicationException (javax.ws.rs.WebApplicationException)1 CustomProperty (org.ovirt.engine.api.model.CustomProperty)1 DataCenter (org.ovirt.engine.api.model.DataCenter)1 ExternalHostProvider (org.ovirt.engine.api.model.ExternalHostProvider)1 ExternalProvider (org.ovirt.engine.api.model.ExternalProvider)1 HostNic (org.ovirt.engine.api.model.HostNic)1 IpAddressAssignments (org.ovirt.engine.api.model.IpAddressAssignments)1 LinkLayerDiscoveryProtocolElement (org.ovirt.engine.api.model.LinkLayerDiscoveryProtocolElement)1 NetworkAttachment (org.ovirt.engine.api.model.NetworkAttachment)1