Sha256: f0c1debd2480f8fd3d0c24c37c101257ea5711ed289f4e8ecbe9b05617e4926d

Contents?: true

Size: 957 Bytes

Versions: 5

Compression:

Stored size: 957 Bytes

Contents

module OpsManagerUiDrivers
  module Version11
    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[network]', with: vsphere_configuration['network']
        browser.fill_in 'vsphere[datacenter]', with: vsphere_configuration['datacenter']
        browser.fill_in 'vsphere[cluster]', with: vsphere_configuration['cluster']
        browser.fill_in 'vsphere[datastore]', with: vsphere_configuration['datastore']
        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/version11/vsphere_configuration.rb
ops_manager_ui_drivers-0.4.1 lib/ops_manager_ui_drivers/version11/vsphere_configuration.rb
ops_manager_ui_drivers-0.4.0 lib/ops_manager_ui_drivers/version11/vsphere_configuration.rb
ops_manager_ui_drivers-0.3.0 lib/ops_manager_ui_drivers/version11/vsphere_configuration.rb
ops_manager_ui_drivers-0.2.0 lib/ops_manager_ui_drivers/version11/vsphere_configuration.rb