Sha256: 858b744c40cada02935a9ce0204e6601e99dd9b1db5279885480a59da22812fb

Contents?: true

Size: 1002 Bytes

Versions: 5

Compression:

Stored size: 1002 Bytes

Contents

module OpsManagerUiDrivers
  module Version11
    class VcenterCredentials

      def initialize(browser:, product_id:)
        @browser = browser
        @product_id = product_id
      end

      def configure(vcenter_credentials_configuration)
        open_vcenter_credentials
        configure_vcenter_credentials(vcenter_credentials_configuration)
      end

      private

      attr_reader :browser, :product_id

      def open_vcenter_credentials
        browser.visit "/components/#{product_id}/forms/vcenter/edit"
      end

      def configure_vcenter_credentials(vcenter_credentials_configuration)
        browser.fill_in 'vcenter[vcenter_ip]', with: vcenter_credentials_configuration['ip_address']
        browser.fill_in 'vcenter[login_credentials][identity]', with: vcenter_credentials_configuration['identity']
        browser.fill_in 'vcenter[login_credentials][password]', with: vcenter_credentials_configuration['password']
        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/vcenter_credentials.rb
ops_manager_ui_drivers-0.4.1 lib/ops_manager_ui_drivers/version11/vcenter_credentials.rb
ops_manager_ui_drivers-0.4.0 lib/ops_manager_ui_drivers/version11/vcenter_credentials.rb
ops_manager_ui_drivers-0.3.0 lib/ops_manager_ui_drivers/version11/vcenter_credentials.rb
ops_manager_ui_drivers-0.2.0 lib/ops_manager_ui_drivers/version11/vcenter_credentials.rb