Sha256: ad8a0d3785abf933fd9e3398751fc9a0ac6bb78044930311d01e491660359dff

Contents?: true

Size: 876 Bytes

Versions: 5

Compression:

Stored size: 876 Bytes

Contents

module OpsManagerUiDrivers
  module Version12
    class VsphereConfiguration
      def initialize(browser:, product_id:)
        @browser = browser
        @product_id = product_id
      end

      def configure(vsphere_configuration)
        open_vsphere_configuration
        configure_vsphere(vsphere_configuration)
      end

      private

      attr_reader :browser, :product_id

      def open_vsphere_configuration
        browser.visit("/components/#{product_id}/forms/vsphere/edit")
      end

      def configure_vsphere(vsphere_configuration)
        browser.fill_in 'vsphere[datacenter]', with: vsphere_configuration['datacenter']
        browser.fill_in 'vsphere[cluster]', with: vsphere_configuration['cluster']
        browser.fill_in 'vsphere[datastores]', with: vsphere_configuration['datastores']
        browser.click_on 'Save'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-0.5.0 lib/ops_manager_ui_drivers/version12/vsphere_configuration.rb
ops_manager_ui_drivers-0.4.1 lib/ops_manager_ui_drivers/version12/vsphere_configuration.rb
ops_manager_ui_drivers-0.4.0 lib/ops_manager_ui_drivers/version12/vsphere_configuration.rb
ops_manager_ui_drivers-0.3.0 lib/ops_manager_ui_drivers/version12/vsphere_configuration.rb
ops_manager_ui_drivers-0.2.0 lib/ops_manager_ui_drivers/version12/vsphere_configuration.rb