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;
}
Aggregations