crowbar/barclamp-crowbar — pull request #446 by VictorLowther (2013-03-08 19:59:04+00:00)
Title: Change how we calculate fingerprints. [1/1]

Saving the individual fingerprints for a node and then adding was
giving me intermittent integer overflows when adding up the fingerprints.

Since fingerprint is only used to force a refresh of the UI when we
add or remove a node, instead add a class method to the Node model
that returns the sha1sum of all the node names sorted in ascending
order. This achieves the same goal without worrying about how Ruby
string hash values will fit into the database or worrying about
triggering an integer overflow in the database.

BDD/features/node.feature | 3 +--
BDD/node.erl | 1 -
.../app/controllers/dashboard_controller.rb | 2 +-
.../app/controllers/nodes_controller.rb | 2 +-
crowbar_framework/app/models/node.rb | 10 +++++-----
.../db/migrate/20120731225516_create_nodes.rb | 1 -
crowbar_framework/test/unit/node_model_test.rb | 10 ----------
doc/devguide/api/node.md | 1 -
doc/devguide/testing/bdd/dsl.md | 1 -
9 files changed, 8 insertions(+), 23 deletions(-)

Crowbar-Pull-ID: 394a32993d751a1a01cd1e69f92a8757fd5d0a97

Crowbar-Release: development