Module: Aerospike::Node::Verify::ClusterName

Defined in:
lib/aerospike/node/verify/cluster_name.rb

Class Method Summary collapse

Class Method Details

.call(node, info_map) ⇒ Object



25
26
27
28
29
30
# File 'lib/aerospike/node/verify/cluster_name.rb', line 25

def call(node, info_map)
  if node.cluster_name && node.cluster_name != info_map['cluster-name']
    node.inactive!
    raise Aerospike::Exceptions::Aerospike.new(Aerospike::ResultCode::INVALID_NODE_ERROR, "Cluster name does not match. expected: #{node.cluster_name}, got: #{info_map['cluster-name']}", [node])
  end
end