Sha256: c2bf89e3e93b53ea43c2739d31b15cee622cb429febb8be83045c6bf6695adfa
Contents?: true
Size: 485 Bytes
Versions: 3
Compression:
Stored size: 485 Bytes
Contents
require 'json' module Ring class SQA class NodesJSON def get node (@nodes[node] or {}) rescue {} end private def initialize @file = CFG.nodes_json @nodes = (load_json rescue {}) end def load_json nodes = {} json = JSON.load File.read(@file) json['results']['nodes'].each do |node| addr = CFG.ipv6? ? node['ipv6'] : node['ipv4'] nodes[addr] = node end nodes end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ring-sqa-0.0.18 | lib/ring/sqa/nodes_json.rb |
ring-sqa-0.0.16 | lib/ring/sqa/nodes_json.rb |
ring-sqa-0.0.15 | lib/ring/sqa/nodes_json.rb |