Class: OpsManagerUiDrivers::Version14::Api
- Inherits:
-
Object
- Object
- OpsManagerUiDrivers::Version14::Api
- Defined in:
- lib/ops_manager_ui_drivers/version14/api.rb
Direct Known Subclasses
Instance Method Summary collapse
- #export_installation ⇒ Object
-
#initialize(host_uri:, username:, password:) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(host_uri:, username:, password:) ⇒ Api
Returns a new instance of Api.
6 7 8 9 10 |
# File 'lib/ops_manager_ui_drivers/version14/api.rb', line 6 def initialize(host_uri:, username:, password:) @host_uri = URI.parse(host_uri) # we expect "proto://host(:port)" @username = username @password = password end |
Instance Method Details
#export_installation ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ops_manager_ui_drivers/version14/api.rb', line 12 def export_installation tmpfile = Tempfile.new('installation.zip') http.request(get('installation_asset_collection')) do |response| response.read_body do |chunk| tmpfile.write(chunk) end end tmpfile.close tmpfile end |