Project

General

Profile

Revision 9e11b4c5

Added by Thomas McKay over 7 years ago

updated to work with foreman-csv plugin

fixed roles

updated comment

View differences:

lib/hammer_cli_csv/base.rb
75 75
        JSON.parse(response.body)
76 76
      end
77 77

  
78
      url = "#{server}/api/v2/plugins"
79
      uri = URI(url)
80
      nethttp = Net::HTTP.new(uri.host, uri.port)
81
      nethttp.use_ssl = uri.scheme == 'https'
82
      nethttp.verify_mode = OpenSSL::SSL::VERIFY_NONE
83
      server_status['plugins'] = nethttp.start do |http|
84
        request = Net::HTTP::Get.new uri.request_uri
85
        request.basic_auth(username, password)
86
        response = http.request(request)
87
        JSON.parse(response.body)['results']
88
      end
89

  
78 90
      server_status
79 91
    end
80 92

  

Also available in: Unified diff