Search in sources :

Example 6 with IscsiDetails

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

the class BackendHostResource method getInitializedConnectionIscsiDetails.

private StorageServerConnections getInitializedConnectionIscsiDetails(Action action) {
    StorageServerConnections connectionDetails = new StorageServerConnections();
    IscsiDetails iscsiDetails = action.getIscsi();
    connectionDetails.setConnection(iscsiDetails.getAddress());
    connectionDetails.setStorageType(StorageType.ISCSI);
    if (iscsiDetails.isSetPort()) {
        connectionDetails.setPort(iscsiDetails.getPort().toString());
    } else {
        connectionDetails.setPort(DEFAULT_ISCSI_PORT);
    }
    if (iscsiDetails.isSetUsername()) {
        connectionDetails.setUserName(iscsiDetails.getUsername());
    }
    if (iscsiDetails.isSetPassword()) {
        connectionDetails.setPassword(iscsiDetails.getPassword());
    }
    return connectionDetails;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) IscsiDetails(org.ovirt.engine.api.model.IscsiDetails)

Aggregations

IscsiDetails (org.ovirt.engine.api.model.IscsiDetails)6 Test (org.junit.Test)2 Action (org.ovirt.engine.api.model.Action)2 StorageServerConnectionParametersBase (org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase)2 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)2 BigDecimal (java.math.BigDecimal)1 Certificate (org.ovirt.engine.api.model.Certificate)1 Cluster (org.ovirt.engine.api.model.Cluster)1 Cpu (org.ovirt.engine.api.model.Cpu)1 CpuTopology (org.ovirt.engine.api.model.CpuTopology)1 Display (org.ovirt.engine.api.model.Display)1 ExternalHostProvider (org.ovirt.engine.api.model.ExternalHostProvider)1 ExternalStatus (org.ovirt.engine.api.model.ExternalStatus)1 HardwareInformation (org.ovirt.engine.api.model.HardwareInformation)1 Host (org.ovirt.engine.api.model.Host)1 HostDevicePassthrough (org.ovirt.engine.api.model.HostDevicePassthrough)1 HostStatus (org.ovirt.engine.api.model.HostStatus)1 HostType (org.ovirt.engine.api.model.HostType)1 Ksm (org.ovirt.engine.api.model.Ksm)1 PowerManagement (org.ovirt.engine.api.model.PowerManagement)1