module Vcdm class Helpers def self.ingressUrl ip = `kubectl get ingress` if ip.nil? || ip.empty? puts "Can't fetch ip from kubectl".yellow return nil end match = ip.scan(/((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})/); return match[0].first end def self.to_hash(str) Hash[ str.split("\n").map{|i|i.split('=')} ] end end end