ops_manager_ui_drivers 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ops_manager_ui_drivers/version.rb +1 -1
  3. data/lib/ops_manager_ui_drivers/version15/ops_manager_director.rb +19 -21
  4. data/lib/ops_manager_ui_drivers/version15/sections/advanced_infrastructure_config.rb +18 -0
  5. data/lib/ops_manager_ui_drivers/version15/sections/availability_zones.rb +29 -0
  6. data/lib/ops_manager_ui_drivers/version15/sections/iaas_configuration.rb +17 -0
  7. data/lib/ops_manager_ui_drivers/version15/sections/microbosh_form_section.rb +39 -0
  8. data/lib/ops_manager_ui_drivers/version15/sections/networks.rb +51 -0
  9. data/lib/ops_manager_ui_drivers/version15/settings.rb +20 -4
  10. data/lib/ops_manager_ui_drivers/version16/ops_manager_director.rb +19 -21
  11. data/lib/ops_manager_ui_drivers/version16/sections/advanced_infrastructure_config.rb +18 -0
  12. data/lib/ops_manager_ui_drivers/version16/sections/availability_zones.rb +29 -0
  13. data/lib/ops_manager_ui_drivers/version16/sections/iaas_configuration.rb +17 -0
  14. data/lib/ops_manager_ui_drivers/version16/sections/microbosh_form_section.rb +39 -0
  15. data/lib/ops_manager_ui_drivers/version16/sections/networks.rb +51 -0
  16. data/lib/ops_manager_ui_drivers/version16/settings.rb +20 -4
  17. metadata +12 -8
  18. data/lib/ops_manager_ui_drivers/version15/availability_zones.rb +0 -54
  19. data/lib/ops_manager_ui_drivers/version15/iaas_configuration.rb +0 -28
  20. data/lib/ops_manager_ui_drivers/version15/networks.rb +0 -55
  21. data/lib/ops_manager_ui_drivers/version16/availability_zones.rb +0 -54
  22. data/lib/ops_manager_ui_drivers/version16/iaas_configuration.rb +0 -28
  23. data/lib/ops_manager_ui_drivers/version16/networks.rb +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6077d80e46eb38cff09d0120cb6867e8490e3c04
4
- data.tar.gz: c5adbba698bf03de4747fe69aec4585c29686e74
3
+ metadata.gz: a2adace82508594ca66b825dcf12f2d24ed869b2
4
+ data.tar.gz: eaa72f99892cf8920b5834de16824a787ca9acdc
5
5
  SHA512:
6
- metadata.gz: 8865b18eb9a16aa2836d1779ebd7681fdd7b88183bfe8b5c2941b0ff906715851eacb11787bfdbd2cc5503b2df62bc1644866a214e5002969691c6de63f9b030
7
- data.tar.gz: af1010289135d4597d20b3450efc937d47394927e44e98a18735d76f19187e293bd97ec024d4fb500df949186fd239aa9b61a4d0ff68208a526fb4435dc40b8b
6
+ metadata.gz: 11379c79012607f75fa406cc10e4497af8fbfa82d2b9786f15059452c2cdfad7864bab239ac494be989210e77e0861e09ee9bfca3e0ab814e0bfb91a780d986d
7
+ data.tar.gz: 481e62fde74bb1fd12aba3f57497e757da83267c0cef96b8f1d0796073e5b1202ed1a16beec434d52453a6ac5ca7ba32ac84b4b59dc1df2a1d6d424fa475712a
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module OpsManagerUiDrivers
2
2
  module Version15
3
3
  class OpsManagerDirector
4
- def initialize(browser:, iaas_configuration: Version15::IaasConfiguration.new(browser: browser))
4
+ def initialize(browser:, iaas_configuration: Version15::Sections::IaasConfiguration.new(browser: browser))
5
5
  @browser = browser
6
6
  @iaas_configuration = iaas_configuration
7
7
  end
@@ -23,12 +23,11 @@ module OpsManagerUiDrivers
23
23
  end
24
24
 
25
25
  def configure_iaas(test_settings)
26
- iaas_configuration.open_form
27
26
  iaas_settings = Settings.for(test_settings)
28
- iaas_settings.fields.each do |name, value|
29
- iaas_configuration.set_field(name, value)
30
- end
31
- iaas_configuration.save_form
27
+ iaas_specific_fields = iaas_settings.iaas_configuration_fields
28
+ advanced_infrastructure_config_fields = iaas_settings.advanced_infrastructure_config_fields
29
+ iaas_configuration.fill_iaas_settings(iaas_specific_fields)
30
+ advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(advanced_infrastructure_config_fields)
32
31
  end
33
32
 
34
33
  def add_availability_zones(iaas_type, iaas_availability_zones)
@@ -49,20 +48,15 @@ module OpsManagerUiDrivers
49
48
  case test_settings.iaas_type
50
49
  when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE
51
50
  first_network = iaas_networks.first
52
- browser.click_on 'show-network-action'
53
- browser.fill_in 'network[networks][][name]', with: first_network['name']
54
- browser.fill_in 'network[networks][][iaas_network_identifier]', with: first_network['identifier']
55
- browser.fill_in 'network[networks][][subnet]', with: first_network['subnet']
56
- browser.fill_in 'network[networks][][reserved_ip_ranges]', with: first_network['reserved_ips']
57
- browser.fill_in 'network[networks][][dns]', with: first_network['dns']
58
- browser.fill_in 'network[networks][][gateway]', with: first_network['gateway']
59
- browser.click_on 'Save'
60
- flash_errors = browser.all('.flash-message.error ul.message li').to_a
61
- flash_errors.reject! { |node| node.text =~ /cannot reach gateway/i }
62
51
 
63
- if (flash_errors.length > 0)
64
- fail flash_errors.collect(&:text).inspect
65
- end
52
+ networks.add_single_network(
53
+ name: first_network['name'],
54
+ iaas_network_identifier: first_network['identifier'],
55
+ subnet: first_network['subnet'],
56
+ reserved_ip_ranges: first_network['reserved_ips'],
57
+ dns: first_network['dns'],
58
+ gateway: first_network['gateway'],
59
+ )
66
60
  else
67
61
  iaas_networks && iaas_networks.each do |network|
68
62
  networks.add_network(
@@ -179,11 +173,15 @@ module OpsManagerUiDrivers
179
173
 
180
174
 
181
175
  def availability_zones
182
- @availability_zones ||= Version15::AvailabilityZones.new(browser: browser)
176
+ @availability_zones ||= Version15::Sections::AvailabilityZones.new(browser: browser)
183
177
  end
184
178
 
185
179
  def networks
186
- @networks ||= Version15::Networks.new(browser: browser)
180
+ @networks ||= Version15::Sections::Networks.new(browser: browser)
181
+ end
182
+
183
+ def advanced_infrastructure_config
184
+ @advanced_infrastructure_config ||= Version15::Sections::AdvancedInfrastructureConfig.new(browser: browser)
187
185
  end
188
186
  end
189
187
  end
@@ -0,0 +1,18 @@
1
+ module OpsManagerUiDrivers
2
+ module Version15
3
+ module Sections
4
+ class AdvancedInfrastructureConfig
5
+ def initialize(browser:)
6
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'advanced_infrastructure_config')
7
+ end
8
+
9
+ def fill_advanced_infrastructure_config_settings(fields)
10
+ return if fields.empty?
11
+ @microbosh_form_section.open_form('advanced_infrastructure_config')
12
+ @microbosh_form_section.set_fields(fields)
13
+ @microbosh_form_section.save_form
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ module OpsManagerUiDrivers
2
+ module Version15
3
+ module Sections
4
+ class AvailabilityZones
5
+ def initialize(browser:)
6
+ @browser = browser
7
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'availability_zones[availability_zones][]')
8
+ end
9
+
10
+ def add_single_az(iaas_identifier)
11
+ @microbosh_form_section.open_form('availability_zones')
12
+ @microbosh_form_section.set_fields('iaas_identifier' => iaas_identifier)
13
+ @microbosh_form_section.save_form
14
+ end
15
+
16
+ def add_az(fields)
17
+ @microbosh_form_section.open_form('availability_zones')
18
+ browser.click_on 'Add'
19
+ @microbosh_form_section.set_fields(fields)
20
+ @microbosh_form_section.save_form
21
+ end
22
+
23
+ private
24
+
25
+ attr_reader :browser
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module OpsManagerUiDrivers
2
+ module Version15
3
+ module Sections
4
+ class IaasConfiguration
5
+ def initialize(browser:)
6
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'iaas_configuration')
7
+ end
8
+
9
+ def fill_iaas_settings(fields)
10
+ @microbosh_form_section.open_form('iaas_configuration')
11
+ @microbosh_form_section.set_fields(fields)
12
+ @microbosh_form_section.save_form
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,39 @@
1
+ module OpsManagerUiDrivers
2
+ module Version15
3
+ module Sections
4
+ class MicroboshFormSection
5
+ def initialize(browser, field_prefix)
6
+ @browser = browser
7
+ @field_prefix = field_prefix
8
+ end
9
+
10
+ def open_form(form_name)
11
+ @browser.visit '/'
12
+ @browser.click_on 'show-microbosh-configure-action'
13
+ @browser.click_on "show-#{form_name}-action"
14
+ end
15
+
16
+ def save_form
17
+ @browser.click_on 'Save'
18
+ @browser.expect(@browser.page).to @browser.have_css('.flash-message.success')
19
+ end
20
+
21
+ def set_fields(fields)
22
+ fields.each do |field, value|
23
+ set_field(field, value)
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def set_field(field, value)
30
+ last_field(field).set(value)
31
+ end
32
+
33
+ def last_field(field)
34
+ @browser.all(:field, "#{@field_prefix}[#{field}]").last
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,51 @@
1
+ module OpsManagerUiDrivers
2
+ module Version15
3
+ module Sections
4
+ class Networks
5
+ def initialize(browser:)
6
+ @browser = browser
7
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'network[networks][]')
8
+ end
9
+
10
+ def add_single_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
11
+ @microbosh_form_section.open_form('network')
12
+
13
+ @microbosh_form_section.set_fields(
14
+ 'name' => name,
15
+ 'iaas_network_identifier' => iaas_network_identifier,
16
+ 'subnet' => subnet,
17
+ 'dns' => dns,
18
+ 'gateway' => gateway,
19
+ 'reserved_ip_ranges' => reserved_ip_ranges,
20
+ )
21
+ browser.click_on 'Save'
22
+ flash_errors = browser.all('.flash-message.error ul.message li').to_a
23
+ flash_errors.reject! { |node| node.text =~ /cannot reach gateway/i }
24
+
25
+ if (flash_errors.length > 0)
26
+ fail flash_errors.collect(&:text).inspect
27
+ end
28
+ end
29
+
30
+ def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
31
+ @microbosh_form_section.open_form('network')
32
+
33
+ browser.click_on 'Add'
34
+ @microbosh_form_section.set_fields(
35
+ 'name' => name,
36
+ 'iaas_network_identifier' => iaas_network_identifier,
37
+ 'subnet' => subnet,
38
+ 'dns' => dns,
39
+ 'gateway' => gateway,
40
+ 'reserved_ip_ranges' => reserved_ip_ranges,
41
+ )
42
+ @microbosh_form_section.save_form
43
+ end
44
+
45
+ private
46
+
47
+ attr_reader :browser
48
+ end
49
+ end
50
+ end
51
+ end
@@ -17,7 +17,7 @@ module OpsManagerUiDrivers
17
17
  @test_settings = test_settings
18
18
  end
19
19
 
20
- def fields
20
+ def iaas_configuration_fields
21
21
  {
22
22
  'vcd_url' => test_settings.ops_manager.vcloud.creds.url,
23
23
  'organization' => test_settings.ops_manager.vcloud.creds.organization,
@@ -29,6 +29,10 @@ module OpsManagerUiDrivers
29
29
  }
30
30
  end
31
31
 
32
+ def advanced_infrastructure_config_fields
33
+ { }
34
+ end
35
+
32
36
  private
33
37
 
34
38
  attr_reader :test_settings
@@ -43,7 +47,7 @@ module OpsManagerUiDrivers
43
47
  @test_settings = test_settings
44
48
  end
45
49
 
46
- def fields
50
+ def iaas_configuration_fields
47
51
  {
48
52
  'vcenter_ip' => test_settings.ops_manager.vcenter.creds.ip,
49
53
  'vcenter_username' => test_settings.ops_manager.vcenter.creds.username,
@@ -56,6 +60,10 @@ module OpsManagerUiDrivers
56
60
  }
57
61
  end
58
62
 
63
+ def advanced_infrastructure_config_fields
64
+ { }
65
+ end
66
+
59
67
  private
60
68
 
61
69
  attr_reader :test_settings
@@ -70,7 +78,7 @@ module OpsManagerUiDrivers
70
78
  @test_settings = test_settings
71
79
  end
72
80
 
73
- def fields
81
+ def iaas_configuration_fields
74
82
  {
75
83
  'access_key_id' => test_settings.ops_manager.aws.aws_access_key,
76
84
  'secret_access_key' => test_settings.ops_manager.aws.aws_secret_key,
@@ -82,6 +90,10 @@ module OpsManagerUiDrivers
82
90
  }
83
91
  end
84
92
 
93
+ def advanced_infrastructure_config_fields
94
+ { }
95
+ end
96
+
85
97
  private
86
98
 
87
99
  attr_reader :test_settings
@@ -96,7 +108,7 @@ module OpsManagerUiDrivers
96
108
  @test_settings = test_settings
97
109
  end
98
110
 
99
- def fields
111
+ def iaas_configuration_fields
100
112
  {
101
113
  'identity_endpoint' => test_settings.ops_manager.openstack.identity_endpoint,
102
114
  'username' => test_settings.ops_manager.openstack.username,
@@ -110,6 +122,10 @@ module OpsManagerUiDrivers
110
122
  }
111
123
  end
112
124
 
125
+ def advanced_infrastructure_config_fields
126
+ { 'connection_options' => test_settings.ops_manager.openstack.connection_options }
127
+ end
128
+
113
129
  private
114
130
 
115
131
  attr_reader :test_settings
@@ -1,7 +1,7 @@
1
1
  module OpsManagerUiDrivers
2
2
  module Version16
3
3
  class OpsManagerDirector
4
- def initialize(browser:, iaas_configuration: Version16::IaasConfiguration.new(browser: browser))
4
+ def initialize(browser:, iaas_configuration: Version16::Sections::IaasConfiguration.new(browser: browser))
5
5
  @browser = browser
6
6
  @iaas_configuration = iaas_configuration
7
7
  end
@@ -23,12 +23,11 @@ module OpsManagerUiDrivers
23
23
  end
24
24
 
25
25
  def configure_iaas(test_settings)
26
- iaas_configuration.open_form
27
26
  iaas_settings = Settings.for(test_settings)
28
- iaas_settings.fields.each do |name, value|
29
- iaas_configuration.set_field(name, value)
30
- end
31
- iaas_configuration.save_form
27
+ iaas_specific_fields = iaas_settings.iaas_configuration_fields
28
+ advanced_infrastructure_config_fields = iaas_settings.advanced_infrastructure_config_fields
29
+ iaas_configuration.fill_iaas_settings(iaas_specific_fields)
30
+ advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(advanced_infrastructure_config_fields)
32
31
  end
33
32
 
34
33
  def add_availability_zones(iaas_type, iaas_availability_zones)
@@ -49,20 +48,15 @@ module OpsManagerUiDrivers
49
48
  case test_settings.iaas_type
50
49
  when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE
51
50
  first_network = iaas_networks.first
52
- browser.click_on 'show-network-action'
53
- browser.fill_in 'network[networks][][name]', with: first_network['name']
54
- browser.fill_in 'network[networks][][iaas_network_identifier]', with: first_network['identifier']
55
- browser.fill_in 'network[networks][][subnet]', with: first_network['subnet']
56
- browser.fill_in 'network[networks][][reserved_ip_ranges]', with: first_network['reserved_ips']
57
- browser.fill_in 'network[networks][][dns]', with: first_network['dns']
58
- browser.fill_in 'network[networks][][gateway]', with: first_network['gateway']
59
- browser.click_on 'Save'
60
- flash_errors = browser.all('.flash-message.error ul.message li').to_a
61
- flash_errors.reject! { |node| node.text =~ /cannot reach gateway/i }
62
51
 
63
- if (flash_errors.length > 0)
64
- fail flash_errors.collect(&:text).inspect
65
- end
52
+ networks.add_single_network(
53
+ name: first_network['name'],
54
+ iaas_network_identifier: first_network['identifier'],
55
+ subnet: first_network['subnet'],
56
+ reserved_ip_ranges: first_network['reserved_ips'],
57
+ dns: first_network['dns'],
58
+ gateway: first_network['gateway'],
59
+ )
66
60
  else
67
61
  iaas_networks && iaas_networks.each do |network|
68
62
  networks.add_network(
@@ -179,11 +173,15 @@ module OpsManagerUiDrivers
179
173
 
180
174
 
181
175
  def availability_zones
182
- @availability_zones ||= Version16::AvailabilityZones.new(browser: browser)
176
+ @availability_zones ||= Version16::Sections::AvailabilityZones.new(browser: browser)
183
177
  end
184
178
 
185
179
  def networks
186
- @networks ||= Version16::Networks.new(browser: browser)
180
+ @networks ||= Version16::Sections::Networks.new(browser: browser)
181
+ end
182
+
183
+ def advanced_infrastructure_config
184
+ @advanced_infrastructure_config ||= Version16::Sections::AdvancedInfrastructureConfig.new(browser: browser)
187
185
  end
188
186
  end
189
187
  end
@@ -0,0 +1,18 @@
1
+ module OpsManagerUiDrivers
2
+ module Version16
3
+ module Sections
4
+ class AdvancedInfrastructureConfig
5
+ def initialize(browser:)
6
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'advanced_infrastructure_config')
7
+ end
8
+
9
+ def fill_advanced_infrastructure_config_settings(fields)
10
+ return if fields.empty?
11
+ @microbosh_form_section.open_form('advanced_infrastructure_config')
12
+ @microbosh_form_section.set_fields(fields)
13
+ @microbosh_form_section.save_form
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ module OpsManagerUiDrivers
2
+ module Version16
3
+ module Sections
4
+ class AvailabilityZones
5
+ def initialize(browser:)
6
+ @browser = browser
7
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'availability_zones[availability_zones][]')
8
+ end
9
+
10
+ def add_single_az(iaas_identifier)
11
+ @microbosh_form_section.open_form('availability_zones')
12
+ @microbosh_form_section.set_fields('iaas_identifier' => iaas_identifier)
13
+ @microbosh_form_section.save_form
14
+ end
15
+
16
+ def add_az(fields)
17
+ @microbosh_form_section.open_form('availability_zones')
18
+ browser.click_on 'Add'
19
+ @microbosh_form_section.set_fields(fields)
20
+ @microbosh_form_section.save_form
21
+ end
22
+
23
+ private
24
+
25
+ attr_reader :browser
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module OpsManagerUiDrivers
2
+ module Version16
3
+ module Sections
4
+ class IaasConfiguration
5
+ def initialize(browser:)
6
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'iaas_configuration')
7
+ end
8
+
9
+ def fill_iaas_settings(fields)
10
+ @microbosh_form_section.open_form('iaas_configuration')
11
+ @microbosh_form_section.set_fields(fields)
12
+ @microbosh_form_section.save_form
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,39 @@
1
+ module OpsManagerUiDrivers
2
+ module Version16
3
+ module Sections
4
+ class MicroboshFormSection
5
+ def initialize(browser, field_prefix)
6
+ @browser = browser
7
+ @field_prefix = field_prefix
8
+ end
9
+
10
+ def open_form(form_name)
11
+ @browser.visit '/'
12
+ @browser.click_on 'show-microbosh-configure-action'
13
+ @browser.click_on "show-#{form_name}-action"
14
+ end
15
+
16
+ def save_form
17
+ @browser.click_on 'Save'
18
+ @browser.expect(@browser.page).to @browser.have_css('.flash-message.success')
19
+ end
20
+
21
+ def set_fields(fields)
22
+ fields.each do |field, value|
23
+ set_field(field, value)
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def set_field(field, value)
30
+ last_field(field).set(value)
31
+ end
32
+
33
+ def last_field(field)
34
+ @browser.all(:field, "#{@field_prefix}[#{field}]").last
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,51 @@
1
+ module OpsManagerUiDrivers
2
+ module Version16
3
+ module Sections
4
+ class Networks
5
+ def initialize(browser:)
6
+ @browser = browser
7
+ @microbosh_form_section = MicroboshFormSection.new(browser, 'network[networks][]')
8
+ end
9
+
10
+ def add_single_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
11
+ @microbosh_form_section.open_form('network')
12
+
13
+ @microbosh_form_section.set_fields(
14
+ 'name' => name,
15
+ 'iaas_network_identifier' => iaas_network_identifier,
16
+ 'subnet' => subnet,
17
+ 'dns' => dns,
18
+ 'gateway' => gateway,
19
+ 'reserved_ip_ranges' => reserved_ip_ranges,
20
+ )
21
+ browser.click_on 'Save'
22
+ flash_errors = browser.all('.flash-message.error ul.message li').to_a
23
+ flash_errors.reject! { |node| node.text =~ /cannot reach gateway/i }
24
+
25
+ if (flash_errors.length > 0)
26
+ fail flash_errors.collect(&:text).inspect
27
+ end
28
+ end
29
+
30
+ def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
31
+ @microbosh_form_section.open_form('network')
32
+
33
+ browser.click_on 'Add'
34
+ @microbosh_form_section.set_fields(
35
+ 'name' => name,
36
+ 'iaas_network_identifier' => iaas_network_identifier,
37
+ 'subnet' => subnet,
38
+ 'dns' => dns,
39
+ 'gateway' => gateway,
40
+ 'reserved_ip_ranges' => reserved_ip_ranges,
41
+ )
42
+ @microbosh_form_section.save_form
43
+ end
44
+
45
+ private
46
+
47
+ attr_reader :browser
48
+ end
49
+ end
50
+ end
51
+ end
@@ -17,7 +17,7 @@ module OpsManagerUiDrivers
17
17
  @test_settings = test_settings
18
18
  end
19
19
 
20
- def fields
20
+ def iaas_configuration_fields
21
21
  {
22
22
  'vcd_url' => test_settings.ops_manager.vcloud.creds.url,
23
23
  'organization' => test_settings.ops_manager.vcloud.creds.organization,
@@ -29,6 +29,10 @@ module OpsManagerUiDrivers
29
29
  }
30
30
  end
31
31
 
32
+ def advanced_infrastructure_config_fields
33
+ { }
34
+ end
35
+
32
36
  private
33
37
 
34
38
  attr_reader :test_settings
@@ -43,7 +47,7 @@ module OpsManagerUiDrivers
43
47
  @test_settings = test_settings
44
48
  end
45
49
 
46
- def fields
50
+ def iaas_configuration_fields
47
51
  {
48
52
  'vcenter_ip' => test_settings.ops_manager.vcenter.creds.ip,
49
53
  'vcenter_username' => test_settings.ops_manager.vcenter.creds.username,
@@ -56,6 +60,10 @@ module OpsManagerUiDrivers
56
60
  }
57
61
  end
58
62
 
63
+ def advanced_infrastructure_config_fields
64
+ { }
65
+ end
66
+
59
67
  private
60
68
 
61
69
  attr_reader :test_settings
@@ -70,7 +78,7 @@ module OpsManagerUiDrivers
70
78
  @test_settings = test_settings
71
79
  end
72
80
 
73
- def fields
81
+ def iaas_configuration_fields
74
82
  {
75
83
  'access_key_id' => test_settings.ops_manager.aws.aws_access_key,
76
84
  'secret_access_key' => test_settings.ops_manager.aws.aws_secret_key,
@@ -82,6 +90,10 @@ module OpsManagerUiDrivers
82
90
  }
83
91
  end
84
92
 
93
+ def advanced_infrastructure_config_fields
94
+ { }
95
+ end
96
+
85
97
  private
86
98
 
87
99
  attr_reader :test_settings
@@ -96,7 +108,7 @@ module OpsManagerUiDrivers
96
108
  @test_settings = test_settings
97
109
  end
98
110
 
99
- def fields
111
+ def iaas_configuration_fields
100
112
  {
101
113
  'identity_endpoint' => test_settings.ops_manager.openstack.identity_endpoint,
102
114
  'username' => test_settings.ops_manager.openstack.username,
@@ -110,6 +122,10 @@ module OpsManagerUiDrivers
110
122
  }
111
123
  end
112
124
 
125
+ def advanced_infrastructure_config_fields
126
+ { 'connection_options' => test_settings.ops_manager.openstack.connection_options }
127
+ end
128
+
113
129
  private
114
130
 
115
131
  attr_reader :test_settings
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -176,13 +176,10 @@ files:
176
176
  - lib/ops_manager_ui_drivers/version14/state_change_progress.rb
177
177
  - lib/ops_manager_ui_drivers/version14/web_ui.rb
178
178
  - lib/ops_manager_ui_drivers/version15/api_1_5.rb
179
- - lib/ops_manager_ui_drivers/version15/availability_zones.rb
180
179
  - lib/ops_manager_ui_drivers/version15/available_products.rb
181
- - lib/ops_manager_ui_drivers/version15/iaas_configuration.rb
182
180
  - lib/ops_manager_ui_drivers/version15/job_availability_zone_mapping_helper.rb
183
181
  - lib/ops_manager_ui_drivers/version15/job_network_mapping_helper.rb
184
182
  - lib/ops_manager_ui_drivers/version15/job_status_helper.rb
185
- - lib/ops_manager_ui_drivers/version15/networks.rb
186
183
  - lib/ops_manager_ui_drivers/version15/ops_manager_director.rb
187
184
  - lib/ops_manager_ui_drivers/version15/product_availability_zones.rb
188
185
  - lib/ops_manager_ui_drivers/version15/product_configuration.rb
@@ -191,17 +188,19 @@ files:
191
188
  - lib/ops_manager_ui_drivers/version15/product_logs.rb
192
189
  - lib/ops_manager_ui_drivers/version15/product_resource_configuration.rb
193
190
  - lib/ops_manager_ui_drivers/version15/product_status_helper.rb
191
+ - lib/ops_manager_ui_drivers/version15/sections/advanced_infrastructure_config.rb
192
+ - lib/ops_manager_ui_drivers/version15/sections/availability_zones.rb
193
+ - lib/ops_manager_ui_drivers/version15/sections/iaas_configuration.rb
194
+ - lib/ops_manager_ui_drivers/version15/sections/microbosh_form_section.rb
195
+ - lib/ops_manager_ui_drivers/version15/sections/networks.rb
194
196
  - lib/ops_manager_ui_drivers/version15/settings.rb
195
197
  - lib/ops_manager_ui_drivers/version15/setup.rb
196
198
  - lib/ops_manager_ui_drivers/version15/state_change_progress.rb
197
199
  - lib/ops_manager_ui_drivers/version15/web_ui.rb
198
- - lib/ops_manager_ui_drivers/version16/availability_zones.rb
199
200
  - lib/ops_manager_ui_drivers/version16/available_products.rb
200
- - lib/ops_manager_ui_drivers/version16/iaas_configuration.rb
201
201
  - lib/ops_manager_ui_drivers/version16/job_availability_zone_mapping_helper.rb
202
202
  - lib/ops_manager_ui_drivers/version16/job_network_mapping_helper.rb
203
203
  - lib/ops_manager_ui_drivers/version16/job_status_helper.rb
204
- - lib/ops_manager_ui_drivers/version16/networks.rb
205
204
  - lib/ops_manager_ui_drivers/version16/ops_manager_director.rb
206
205
  - lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
207
206
  - lib/ops_manager_ui_drivers/version16/product_configuration.rb
@@ -210,6 +209,11 @@ files:
210
209
  - lib/ops_manager_ui_drivers/version16/product_logs.rb
211
210
  - lib/ops_manager_ui_drivers/version16/product_resource_configuration.rb
212
211
  - lib/ops_manager_ui_drivers/version16/product_status_helper.rb
212
+ - lib/ops_manager_ui_drivers/version16/sections/advanced_infrastructure_config.rb
213
+ - lib/ops_manager_ui_drivers/version16/sections/availability_zones.rb
214
+ - lib/ops_manager_ui_drivers/version16/sections/iaas_configuration.rb
215
+ - lib/ops_manager_ui_drivers/version16/sections/microbosh_form_section.rb
216
+ - lib/ops_manager_ui_drivers/version16/sections/networks.rb
213
217
  - lib/ops_manager_ui_drivers/version16/settings.rb
214
218
  - lib/ops_manager_ui_drivers/version16/setup.rb
215
219
  - lib/ops_manager_ui_drivers/version16/state_change_progress.rb
@@ -1,54 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version15
3
- class AvailabilityZones
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def add_single_az(iaas_identifier)
9
- open_form('availability_zones')
10
-
11
- set_fields(fields: {'iaas_identifier' => iaas_identifier})
12
-
13
- save_form
14
- end
15
-
16
- def add_az(fields)
17
- open_form('availability_zones')
18
-
19
- browser.click_on 'Add'
20
- set_fields(fields: fields)
21
- save_form
22
- end
23
-
24
- private
25
-
26
- attr_reader :browser
27
-
28
- def save_form
29
- browser.click_on 'Save'
30
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
31
- end
32
-
33
- def open_form(form)
34
- browser.visit '/'
35
- browser.click_on 'show-microbosh-configure-action'
36
- browser.click_on "show-#{form}-action"
37
- end
38
-
39
- def set_fields(fields:)
40
- fields.each do |field, value|
41
- set_field(field, value)
42
- end
43
- end
44
-
45
- def set_field(field, value)
46
- last_field(field).set(value)
47
- end
48
-
49
- def last_field(field)
50
- browser.all(:field, "availability_zones[availability_zones][][#{field}]").last
51
- end
52
- end
53
- end
54
- end
@@ -1,28 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version15
3
- class IaasConfiguration
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def open_form
9
- browser.visit '/'
10
- browser.click_on 'show-microbosh-configure-action'
11
- browser.click_on 'show-iaas_configuration-action'
12
- end
13
-
14
- def save_form
15
- browser.click_on 'Save'
16
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
17
- end
18
-
19
- def set_field(field, value)
20
- browser.find_field("iaas_configuration[#{field}]").set(value)
21
- end
22
-
23
- private
24
-
25
- attr_reader :browser
26
- end
27
- end
28
- end
@@ -1,55 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version15
3
- class Networks
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
9
- open_form('network')
10
-
11
- browser.click_on 'Add'
12
- set_fields(
13
- fields: {
14
- 'name' => name,
15
- 'iaas_network_identifier' => iaas_network_identifier,
16
- 'subnet' => subnet,
17
- 'dns' => dns,
18
- 'gateway' => gateway,
19
- 'reserved_ip_ranges' => reserved_ip_ranges,
20
- }
21
- )
22
- save_form
23
- end
24
-
25
- private
26
-
27
- attr_reader :browser
28
-
29
- def save_form
30
- browser.click_on 'Save'
31
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
32
- end
33
-
34
- def open_form(form)
35
- browser.visit '/'
36
- browser.click_on 'show-microbosh-configure-action'
37
- browser.click_on "show-#{form}-action"
38
- end
39
-
40
- def set_fields(fields:)
41
- fields.each do |field, value|
42
- set_field(field, value)
43
- end
44
- end
45
-
46
- def set_field(field, value)
47
- last_field(field).set(value)
48
- end
49
-
50
- def last_field(field)
51
- browser.all(:field, "network[networks][][#{field}]").last
52
- end
53
- end
54
- end
55
- end
@@ -1,54 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version16
3
- class AvailabilityZones
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def add_single_az(iaas_identifier)
9
- open_form('availability_zones')
10
-
11
- set_fields(fields: {'iaas_identifier' => iaas_identifier})
12
-
13
- save_form
14
- end
15
-
16
- def add_az(fields)
17
- open_form('availability_zones')
18
-
19
- browser.click_on 'Add'
20
- set_fields(fields: fields)
21
- save_form
22
- end
23
-
24
- private
25
-
26
- attr_reader :browser
27
-
28
- def save_form
29
- browser.click_on 'Save'
30
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
31
- end
32
-
33
- def open_form(form)
34
- browser.visit '/'
35
- browser.click_on 'show-microbosh-configure-action'
36
- browser.click_on "show-#{form}-action"
37
- end
38
-
39
- def set_fields(fields:)
40
- fields.each do |field, value|
41
- set_field(field, value)
42
- end
43
- end
44
-
45
- def set_field(field, value)
46
- last_field(field).set(value)
47
- end
48
-
49
- def last_field(field)
50
- browser.all(:field, "availability_zones[availability_zones][][#{field}]").last
51
- end
52
- end
53
- end
54
- end
@@ -1,28 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version16
3
- class IaasConfiguration
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def open_form
9
- browser.visit '/'
10
- browser.click_on 'show-microbosh-configure-action'
11
- browser.click_on 'show-iaas_configuration-action'
12
- end
13
-
14
- def save_form
15
- browser.click_on 'Save'
16
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
17
- end
18
-
19
- def set_field(field, value)
20
- browser.find_field("iaas_configuration[#{field}]").set(value)
21
- end
22
-
23
- private
24
-
25
- attr_reader :browser
26
- end
27
- end
28
- end
@@ -1,55 +0,0 @@
1
- module OpsManagerUiDrivers
2
- module Version16
3
- class Networks
4
- def initialize(browser:)
5
- @browser = browser
6
- end
7
-
8
- def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
9
- open_form('network')
10
-
11
- browser.click_on 'Add'
12
- set_fields(
13
- fields: {
14
- 'name' => name,
15
- 'iaas_network_identifier' => iaas_network_identifier,
16
- 'subnet' => subnet,
17
- 'dns' => dns,
18
- 'gateway' => gateway,
19
- 'reserved_ip_ranges' => reserved_ip_ranges,
20
- }
21
- )
22
- save_form
23
- end
24
-
25
- private
26
-
27
- attr_reader :browser
28
-
29
- def save_form
30
- browser.click_on 'Save'
31
- browser.expect(browser.page).to browser.have_css('.flash-message.success')
32
- end
33
-
34
- def open_form(form)
35
- browser.visit '/'
36
- browser.click_on 'show-microbosh-configure-action'
37
- browser.click_on "show-#{form}-action"
38
- end
39
-
40
- def set_fields(fields:)
41
- fields.each do |field, value|
42
- set_field(field, value)
43
- end
44
- end
45
-
46
- def set_field(field, value)
47
- last_field(field).set(value)
48
- end
49
-
50
- def last_field(field)
51
- browser.all(:field, "network[networks][][#{field}]").last
52
- end
53
- end
54
- end
55
- end