function updateInstancesFromPolling(instances) {
      let haveChanges = false;

      // Update existing VMs
      haveChanges = updateInstancesWithInstancesFromApi(instances, true) || haveChanges;
      // Add new VMs, and delete removed VMs
      haveChanges = addOrDeleteInstancesWithInstancesFromApi(instances) || haveChanges;

      // Public IPs are into the instance infos, so we need to took them
      const publicIpAddresses = getPublicIpAddressesFromInstances(instances);
      updateIpsWithIpsFromApi(publicIpAddresses, 'public');
      addOrDeleteIpsWithIpsFromApi(publicIpAddresses, 'public');

      self.refreshLinks();

      if (haveChanges) {
        self.saveToUserPref();
        CloudProjectComputeVolumesOrchestrator.pollVolumes(); // [async]
      }
      return $q.when(instances);
    }
/**
     *  Triggered by polling: Update instances list
     *
     *  /!\ take care to don't update all datas, user can be in edition for example.
     */
Triggered by polling: Update instances list
/!\ take care to don't update all datas, user can be in edition for example.
Triggered by polling : Update instances list / ! \ take care to don ' t update all datas user can be in edition for example .
function updateInstancesFromPolling(instances) {
      let haveChanges = false;
      haveChanges = updateInstancesWithInstancesFromApi(instances, true) || haveChanges;
      haveChanges = addOrDeleteInstancesWithInstancesFromApi(instances) || haveChanges;
      const publicIpAddresses = getPublicIpAddressesFromInstances(instances);
      updateIpsWithIpsFromApi(publicIpAddresses, 'public');
      addOrDeleteIpsWithIpsFromApi(publicIpAddresses, 'public');
      self.refreshLinks();
      if (haveChanges) {
        self.saveToUserPref();
        CloudProjectComputeVolumesOrchestrator.pollVolumes(); 
      }
      return $q.when(instances);
    }
function updateInstancesFromPolling ( instances ) { let haveChanges = false ; haveChanges = updateInstancesWithInstancesFromApi ( instances , true ) || haveChanges ; haveChanges = addOrDeleteInstancesWithInstancesFromApi ( instances ) || haveChanges ; const publicIpAddresses = getPublicIpAddressesFromInstances ( instances ) ; updateIpsWithIpsFromApi ( publicIpAddresses , 'public' ) ; addOrDeleteIpsWithIpsFromApi ( publicIpAddresses , 'public' ) ; self . refreshLinks ( ) ; if ( haveChanges ) { self . saveToUserPref ( ) ; CloudProjectComputeVolumesOrchestrator . pollVolumes ( ) ; } return $q . when ( instances ) ; }
Triggered by polling: Update instances list
  /!\ take care to don't update all datas, user can be in edition for example.
Triggered by polling : Update instances list / ! \ take care to don ' t update all datas user can be in edition for example .
// Update existing VMs // Add new VMs, and delete removed VMs // Public IPs are into the instance infos, so we need to took them // [async]