Part of the fix to bug #1489618 was working only accidentally. The
implicit update logic of the allocated table (and the allocatedIds dict)
treated ctrl.available.sourceItems and ctrl.allocated.sourceItems as
parallel arrays, while they were not parallel in fact.
This change allows the sender of the CHANGED message to specify all four
tables and by that spare any implicit logic of updating some of the
tables. However if a table is not included in the CHANGED message it
will be left unchanged. The event is also renamed according to the new
meaning.
The single sender of the original message from the horizon repo (ie.
Launch Instance / Source) is updated.
The original message type and its handler logic is removed without
deprecation. That theoretically could cause problems for horizon plugins
outside of the horizon repo. But I find that unlikely because if
somebody had relied on that logic they would have likely discovered
already that it was faulty.
Reviewed: https:/ /review. openstack. org/493070 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=58b14a83bce 12cceeeabcc3531 f4b2c842591b5f
Committed: https:/
Submitter: Zuul
Branch: master
commit 58b14a83bce12cc eeeabcc3531f4b2 c842591b5f
Author: Bence Romsics <email address hidden>
Date: Mon Aug 14 15:30:51 2017 +0200
transfer-table: Rethink CHANGED message handler
Part of the fix to bug #1489618 was working only accidentally. The sourceItems and ctrl.allocated. sourceItems as
implicit update logic of the allocated table (and the allocatedIds dict)
treated ctrl.available.
parallel arrays, while they were not parallel in fact.
This change allows the sender of the CHANGED message to specify all four
tables and by that spare any implicit logic of updating some of the
tables. However if a table is not included in the CHANGED message it
will be left unchanged. The event is also renamed according to the new
meaning.
The single sender of the original message from the horizon repo (ie.
Launch Instance / Source) is updated.
The original message type and its handler logic is removed without
deprecation. That theoretically could cause problems for horizon plugins
outside of the horizon repo. But I find that unlikely because if
somebody had relied on that logic they would have likely discovered
already that it was faulty.
Change-Id: I38972558e1823f 9a88702d2ebcb8d e5244cfe16a 4e10040fb27b443 6d489fd8163
Related-Change: I647b31c7a280af
Related-Bug: #1489618