ops_manager_ui_drivers 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73a3f106789d50ea07ba4600485708043fbf98ef
4
- data.tar.gz: 5e6d464653c9688a473761daf207a6daf3882420
3
+ metadata.gz: 2106eb9ec8050edbf458f776025c171e45b283cf
4
+ data.tar.gz: fd46c9b4b0c67929f1850d82d7737c9f6c729c3e
5
5
  SHA512:
6
- metadata.gz: 1486f957adddf008b71fca0aab0b78ba451c41c10ce34543791d622baaf8afd920e353db48ff6b0383e643d5b45aa57fc112487ec49d734330c3dceca420df70
7
- data.tar.gz: c59aded15ea1967952f0a04f9eed2d434513504110ee952f855ada0605062bfbf408a414e8cefc7272ed6ce3946557af210a8a0d0ef65dfeafc9b84984ea8fdc
6
+ metadata.gz: 5a23dde9c57d044a5c4d49dc27d9eb4f625d2b8437981716693d5713baaaed18fffc30e9f9163927561ac6a1e97d5d96074a4f2e3af7460f7ed9db71002bfbe7
7
+ data.tar.gz: 1b6a97c24cbafbf3172c07f34c05f852671868b378e0d9eb95d8109574b1b6b528056d2e290d5d263f1c2f0efbacd434b82f8612ec372f89809ad7d697d2052b
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '1.10.0'
2
+ VERSION = '1.11.0'
3
3
  end
@@ -4,12 +4,13 @@ module OpsManagerUiDrivers
4
4
  class Networks
5
5
  def initialize(browser:)
6
6
  @browser = browser
7
- @bosh_product_form_section = BoshProductFormSection.new(browser, 'network_collection[networks_attributes][0]')
7
+ @bosh_product_form_section = BoshProductFormSection.new(@browser, 'network_collection[networks_attributes][0]')
8
8
  end
9
9
 
10
- def add_single_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
10
+ def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
11
11
  @bosh_product_form_section.open_form('network')
12
12
 
13
+ @browser.click_on 'Add'
13
14
  @bosh_product_form_section.set_fields(
14
15
  'name' => name,
15
16
  'iaas_network_identifier' => iaas_network_identifier,
@@ -18,8 +19,9 @@ module OpsManagerUiDrivers
18
19
  'gateway' => gateway,
19
20
  'reserved_ip_ranges' => reserved_ip_ranges,
20
21
  )
21
- browser.click_on 'Save'
22
- flash_errors = browser.all('.flash-message.error ul.message li').to_a
22
+ @browser.click_on 'Save'
23
+ @browser.expect(@browser.page).to @browser.have_css('.flash-message')
24
+ flash_errors = @browser.all('.flash-message.error ul.message li').to_a
23
25
  flash_errors.reject! { |node| node.text =~ /cannot reach gateway/i }
24
26
 
25
27
  if (flash_errors.length > 0)
@@ -27,32 +29,13 @@ module OpsManagerUiDrivers
27
29
  end
28
30
  end
29
31
 
30
- def add_network(name:, iaas_network_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
31
- @bosh_product_form_section.open_form('network')
32
-
33
- browser.click_on 'Add'
34
- @bosh_product_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
- @bosh_product_form_section.save_form
43
- end
44
-
45
32
  def delete_network(network_name)
46
33
  @bosh_product_form_section.open_form('network')
47
- button = browser.find("i[id='delete-#{network_name}']")
34
+ button = @browser.find("i[id='delete-#{network_name}']")
48
35
  button.trigger('click')
49
36
 
50
37
  @bosh_product_form_section.save_form
51
38
  end
52
-
53
- private
54
-
55
- attr_reader :browser
56
39
  end
57
40
  end
58
41
  end
@@ -2,7 +2,7 @@ module OpsManagerUiDrivers
2
2
  module Version17
3
3
  class OpsManagerDirector
4
4
  def initialize(browser:, iaas_configuration: Version17::BoshProductSections::IaasConfiguration.new(browser: browser))
5
- @browser = browser
5
+ @browser = browser
6
6
  @iaas_configuration = iaas_configuration
7
7
  end
8
8
 
@@ -45,29 +45,15 @@ module OpsManagerUiDrivers
45
45
  def add_networks(test_settings)
46
46
  iaas_networks = test_settings.ops_manager.networks
47
47
 
48
- case test_settings.iaas_type
49
- when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE
50
- first_network = iaas_networks.first
51
-
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
- )
60
- else
61
- iaas_networks && iaas_networks.each do |network|
62
- networks.add_network(
63
- name: network['name'],
64
- iaas_network_identifier: network['identifier'],
65
- subnet: network['subnet'],
66
- reserved_ip_ranges: network['reserved_ips'],
67
- dns: network['dns'],
68
- gateway: network['gateway'],
69
- )
70
- end
48
+ iaas_networks && iaas_networks.each do |network|
49
+ networks.add_network(
50
+ name: network['name'],
51
+ iaas_network_identifier: network['identifier'],
52
+ subnet: network['subnet'],
53
+ reserved_ip_ranges: network['reserved_ips'],
54
+ dns: network['dns'],
55
+ gateway: network['gateway'],
56
+ )
71
57
  end
72
58
  end
73
59
 
@@ -117,19 +103,7 @@ module OpsManagerUiDrivers
117
103
  end
118
104
 
119
105
  def assign_networks(ops_manager)
120
- if ops_manager.vcenter
121
- deployment_network = ops_manager.networks[0]
122
-
123
- infrastructure_network =
124
- ops_manager.networks[1] ? ops_manager.networks[1] : ops_manager.networks[0]
125
-
126
- assign_networks_vsphere(
127
- infrastructure_network: infrastructure_network['name'],
128
- deployment_network: deployment_network['name'],
129
- )
130
- else
131
- assign_network(deployment_network: ops_manager.networks[0]['name'])
132
- end
106
+ assign_network(ops_manager.networks[0]['name'])
133
107
  end
134
108
 
135
109
  def customize_resource_config(resource_config)
@@ -139,24 +113,10 @@ module OpsManagerUiDrivers
139
113
  end
140
114
  end
141
115
 
142
- def assign_networks_vsphere(infrastructure_network:, deployment_network:)
143
- browser.click_on 'Assign Networks'
144
-
145
- browser.within browser.find '#director_network_assignments_infrastructure_network' do
146
- browser.select infrastructure_network
147
- end
148
-
149
- browser.within browser.find '#director_network_assignments_deployment_network' do
150
- browser.select deployment_network
151
- end
152
- browser.click_on 'Save'
153
- browser.poll_up_to_times(20) { browser.assert_text('Successfully assigned infrastructure network') }
154
- end
155
-
156
- def assign_network(deployment_network:)
116
+ def assign_network(network_name)
157
117
  browser.click_on 'Assign Networks'
158
118
 
159
- browser.select(deployment_network, from: 'Network')
119
+ browser.select(network_name, from: 'Network')
160
120
  browser.click_on 'Save'
161
121
  end
162
122
 
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.10.0
4
+ version: 1.11.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-11-12 00:00:00.000000000 Z
11
+ date: 2015-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara