function createIsoList (storageDomains, dataCenterId = null) {
  const list = []

  storageDomains
    .toList()
    .filter(storageDomain =>
      storageDomain.has('files') &&
      storageDomain.get('canUserUseDomain') &&
      (dataCenterId === null
        ? true
        : storageDomain.getIn([ 'statusPerDataCenter', dataCenterId ]) === 'active')
    )
    .forEach(storageDomain => {
      storageDomain.get('files').forEach(file => {
        list.push({
          sd: {
            id: storageDomain.get('id'),
            name: storageDomain.get('name'),
          },
          file: {
            id: file.id,
            name: file.name,
          },
        })
      })
    })

  return list
}
/**
 * Return a normalized list of iso files from the set of provided storage domains,
 * optionally limiting to ISOs available in a given data center.
 */
Return a normalized list of iso files from the set of provided storage domains,
optionally limiting to ISOs available in a given data center.
Return a normalized list of iso files from the set of provided storage domains optionally limiting to ISOs available in a given data center .
function createIsoList (storageDomains, dataCenterId = null) {
  const list = []
  storageDomains
    .toList()
    .filter(storageDomain =>
      storageDomain.has('files') &&
      storageDomain.get('canUserUseDomain') &&
      (dataCenterId === null
        ? true
        : storageDomain.getIn([ 'statusPerDataCenter', dataCenterId ]) === 'active')
    )
    .forEach(storageDomain => {
      storageDomain.get('files').forEach(file => {
        list.push({
          sd: {
            id: storageDomain.get('id'),
            name: storageDomain.get('name'),
          },
          file: {
            id: file.id,
            name: file.name,
          },
        })
      })
    })
  return list
}
function createIsoList ( storageDomains , dataCenterId = null ) { const list = [ ] storageDomains . toList ( ) . filter ( storageDomain => storageDomain . has ( 'files' ) && storageDomain . get ( 'canUserUseDomain' ) && ( dataCenterId === null ? true : storageDomain . getIn ( [ 'statusPerDataCenter' , dataCenterId ] ) === 'active' ) ) . forEach ( storageDomain => { storageDomain . get ( 'files' ) . forEach ( file => { list . push ( { sd : { id : storageDomain . get ( 'id' ) , name : storageDomain . get ( 'name' ) , } , file : { id : file . id , name : file . name , } , } ) } ) } ) return list }
Return a normalized list of iso files from the set of provided storage domains,
 optionally limiting to ISOs available in a given data center.
Return a normalized list of iso files from the set of provided storage domains optionally limiting to ISOs available in a given data center .