Sha256: dd3dc666f6f66c9a4d78476e5cf7a6b307b8e298f7bac1359ef7fd4d2a9c3aea
Contents?: true
Size: 1.11 KB
Versions: 36
Compression:
Stored size: 1.11 KB
Contents
module HybridPlatformsConductor module HpcPlugins module Test # Test that Public IPs are assigned correctly class PublicIps < HybridPlatformsConductor::Test # Check my_test_plugin.rb.sample documentation for signature details. def test # Get a map of public IPs per node @nodes_handler.prefetch_metadata_of @nodes_handler.known_nodes, :public_ips public_ips = Hash[@nodes_handler. known_nodes. map { |node| [node, @nodes_handler.get_public_ips_of(node) || []] } ] # Check there are no duplicates nodes_per_public_ip = {} public_ips.each do |node, public_ips| public_ips.each do |public_ip| nodes_per_public_ip[public_ip] = [] unless nodes_per_public_ip.key?(public_ip) nodes_per_public_ip[public_ip] << node end end nodes_per_public_ip.each do |public_ip, nodes| error "Public IP #{public_ip} is used by the following nodes: #{nodes.join(', ')}" if nodes.size > 1 end end end end end end
Version data entries
36 entries across 36 versions & 1 rubygems