function createStorageDomainList (storageDomains, dataCenterId = null, includeUsage = false) {
  const storageDomainList =
    storageDomains
      .toList()
      .filter(sd =>
        sd.get('canUserUseDomain') &&
        sd.get('type') === 'data' &&
        (dataCenterId === null
          ? true
          : sd.getIn(['statusPerDataCenter', dataCenterId]) === 'active')
      )
      .map(sd => {
        const avail = convertValue('B', sd.get('availableSpace', 0))
        return {
          id: sd.get('id'),
          value:
            sd.get('name') +
            (includeUsage ? ' ' + msg.storageDomainFreeSpace({ size: avail.value, unit: avail.unit }) : ''),
        }
      })
      .sort((a, b) => localeCompare(a.value, b.value))
      .toJS()

  return storageDomainList
}
/**
 * Return a normalized and sorted list of storage domains for use in a __SelectBox__
 * from the List of provided storage domains, optionally filtered to be active in the
 * provided data center.
 */
Return a normalized and sorted list of storage domains for use in a __SelectBox
from the List of provided storage domains, optionally filtered to be active in the
provided data center.
Return a normalized and sorted list of storage domains for use in a __SelectBox from the List of provided storage domains optionally filtered to be active in the provided data center .
function createStorageDomainList (storageDomains, dataCenterId = null, includeUsage = false) {
  const storageDomainList =
    storageDomains
      .toList()
      .filter(sd =>
        sd.get('canUserUseDomain') &&
        sd.get('type') === 'data' &&
        (dataCenterId === null
          ? true
          : sd.getIn(['statusPerDataCenter', dataCenterId]) === 'active')
      )
      .map(sd => {
        const avail = convertValue('B', sd.get('availableSpace', 0))
        return {
          id: sd.get('id'),
          value:
            sd.get('name') +
            (includeUsage ? ' ' + msg.storageDomainFreeSpace({ size: avail.value, unit: avail.unit }) : ''),
        }
      })
      .sort((a, b) => localeCompare(a.value, b.value))
      .toJS()
  return storageDomainList
}
function createStorageDomainList ( storageDomains , dataCenterId = null , includeUsage = false ) { const storageDomainList = storageDomains . toList ( ) . filter ( sd => sd . get ( 'canUserUseDomain' ) && sd . get ( 'type' ) === 'data' && ( dataCenterId === null ? true : sd . getIn ( [ 'statusPerDataCenter' , dataCenterId ] ) === 'active' ) ) . map ( sd => { const avail = convertValue ( 'B' , sd . get ( 'availableSpace' , 0 ) ) return { id : sd . get ( 'id' ) , value : sd . get ( 'name' ) + ( includeUsage ? ' ' + msg . storageDomainFreeSpace ( { size : avail . value , unit : avail . unit } ) : '' ) , } } ) . sort ( ( a , b ) => localeCompare ( a . value , b . value ) ) . toJS ( ) return storageDomainList }
Return a normalized and sorted list of storage domains for use in a __SelectBox__
 from the List of provided storage domains, optionally filtered to be active in the
 provided data center.
Return a normalized and sorted list of storage domains for use in a __SelectBox__ from the List of provided storage domains optionally filtered to be active in the provided data center .