opsmgr 0.33.5 → 0.34.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.
- checksums.yaml +4 -4
- data/lib/opsmgr/api/client.rb +6 -3
- data/lib/opsmgr/api/http_client.rb +168 -26
- data/lib/opsmgr/api/version20/endpoints.rb +18 -2
- data/lib/opsmgr/bosh_command_runner.rb +21 -17
- data/lib/opsmgr/cmd/bosh_command.rb +54 -78
- data/lib/opsmgr/cmd/ops_manager.rb +7 -4
- data/lib/opsmgr/environments.rb +34 -5
- data/lib/opsmgr/errand_runner.rb +1 -3
- data/lib/opsmgr/product_upload_wrapper.rb +8 -8
- data/lib/opsmgr/tasks/bosh.rake +1 -7
- data/lib/opsmgr/tasks/destroy.rake +2 -2
- data/lib/opsmgr/tasks/info.rake +1 -1
- data/lib/opsmgr/tasks/opsmgr.rake +11 -8
- data/lib/opsmgr/tasks/product.rake +9 -6
- data/lib/opsmgr/ui_helpers/add_first_user_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/config_helper.rb +18 -18
- data/lib/opsmgr/ui_helpers/delete_installation_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/delete_product_if_present_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/delete_product_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/export_installation_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/get_latest_install_log_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/import_stemcell_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/microbosh/configure_microbosh_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/{import_installation_spec.rb → post_import_configuration_spec.rb} +7 -5
- data/lib/opsmgr/ui_helpers/trigger_install_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/ui_spec_runner.rb +2 -4
- data/lib/opsmgr/ui_helpers/uncheck_errands_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/upload_and_add_product_spec.rb +2 -2
- data/lib/opsmgr/ui_helpers/upload_and_upgrade_product_spec.rb +2 -2
- data/lib/opsmgr/version.rb +1 -1
- data/sample_env_files/aws.yml +1 -0
- metadata +23 -10
- data/lib/opsmgr/api/endpoints_factory.rb +0 -39
@@ -7,8 +7,8 @@ RSpec.describe 'Adding the first user', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -47,16 +47,16 @@ module SettingsHelper
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def ops_manager_driver
|
50
|
-
configure_capybara(fetch_environment_settings
|
50
|
+
configure_capybara(fetch_environment_settings['ops_manager']['url'])
|
51
51
|
case om_version
|
52
52
|
when '1.4'
|
53
|
-
om_1_4(fetch_environment_settings
|
53
|
+
om_1_4(fetch_environment_settings['ops_manager']['url'])
|
54
54
|
when '1.5'
|
55
|
-
om_1_5(fetch_environment_settings
|
55
|
+
om_1_5(fetch_environment_settings['ops_manager']['url'])
|
56
56
|
when '1.6'
|
57
|
-
om_1_6(fetch_environment_settings
|
57
|
+
om_1_6(fetch_environment_settings['ops_manager']['url'])
|
58
58
|
when '1.7'
|
59
|
-
om_1_7(fetch_environment_settings
|
59
|
+
om_1_7(fetch_environment_settings['ops_manager']['url'])
|
60
60
|
else
|
61
61
|
fail "Unsupported Ops Manager Version #{om_version.inspect}"
|
62
62
|
end
|
@@ -67,27 +67,27 @@ module SettingsHelper
|
|
67
67
|
case om_version
|
68
68
|
when '1.4'
|
69
69
|
api_1_4(
|
70
|
-
host: env_settings
|
71
|
-
username: env_settings
|
72
|
-
password: env_settings
|
70
|
+
host: env_settings['ops_manager']['url'],
|
71
|
+
username: env_settings['ops_manager']['username'],
|
72
|
+
password: env_settings['ops_manager']['password'],
|
73
73
|
)
|
74
74
|
when '1.5'
|
75
75
|
api_1_5(
|
76
|
-
host: env_settings
|
77
|
-
username: env_settings
|
78
|
-
password: env_settings
|
76
|
+
host: env_settings['ops_manager']['url'],
|
77
|
+
username: env_settings['ops_manager']['username'],
|
78
|
+
password: env_settings['ops_manager']['password'],
|
79
79
|
)
|
80
80
|
when '1.6'
|
81
81
|
api_1_6(
|
82
|
-
host: env_settings
|
83
|
-
username: env_settings
|
84
|
-
password: env_settings
|
82
|
+
host: env_settings['ops_manager']['url'],
|
83
|
+
username: env_settings['ops_manager']['username'],
|
84
|
+
password: env_settings['ops_manager']['password'],
|
85
85
|
)
|
86
86
|
when '1.7'
|
87
87
|
api_1_7(
|
88
|
-
host: env_settings
|
89
|
-
username: env_settings
|
90
|
-
password: env_settings
|
88
|
+
host: env_settings['ops_manager']['url'],
|
89
|
+
username: env_settings['ops_manager']['username'],
|
90
|
+
password: env_settings['ops_manager']['password'],
|
91
91
|
)
|
92
92
|
else
|
93
93
|
fail "Unsupported Ops Manager Version #{om_version.inspect}"
|
@@ -116,7 +116,7 @@ module SettingsHelper
|
|
116
116
|
# Capybara says, "All configuration must take place before the driver starts"
|
117
117
|
end
|
118
118
|
|
119
|
-
page.current_window.resize_to(1024,
|
119
|
+
page.current_window.resize_to(1024, 2600) # avoid overlapping footer spec failures
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
@@ -9,8 +9,8 @@ RSpec.describe 'Deleting the installation', order: :defined do
|
|
9
9
|
# let the caller handle the error
|
10
10
|
poll_up_to_mins(1) do
|
11
11
|
current_ops_manager.setup_page.setup_or_login(
|
12
|
-
user: env_settings
|
13
|
-
password: env_settings
|
12
|
+
user: env_settings['ops_manager']['username'],
|
13
|
+
password: env_settings['ops_manager']['password'],
|
14
14
|
)
|
15
15
|
|
16
16
|
expect(page).to have_content('Installation Dashboard')
|
@@ -7,8 +7,8 @@ RSpec.describe 'Deleting a product if it is present', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -7,8 +7,8 @@ RSpec.describe 'Deleting a product', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -8,8 +8,8 @@ RSpec.describe 'Exporting the installation', order: :defined do
|
|
8
8
|
it 'creates the admin user and logs in' do
|
9
9
|
poll_up_to_mins(10) do
|
10
10
|
current_ops_manager.setup_page.setup_or_login(
|
11
|
-
user: env_settings
|
12
|
-
password: env_settings
|
11
|
+
user: env_settings['ops_manager']['username'],
|
12
|
+
password: env_settings['ops_manager']['password'],
|
13
13
|
)
|
14
14
|
|
15
15
|
expect(page).to have_content('Installation Dashboard')
|
@@ -7,8 +7,8 @@ RSpec.describe 'Getting latest install log', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -7,8 +7,8 @@ RSpec.describe 'Importing the stemcell', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -7,8 +7,8 @@ RSpec.describe 'Configuring director', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
data/lib/opsmgr/ui_helpers/{import_installation_spec.rb → post_import_configuration_spec.rb}
RENAMED
@@ -1,22 +1,24 @@
|
|
1
1
|
require_relative 'config_helper'
|
2
2
|
|
3
|
-
RSpec.describe '
|
3
|
+
RSpec.describe 'Post-import configuration', order: :defined do
|
4
4
|
let!(:current_ops_manager) { ops_manager_driver }
|
5
5
|
let!(:env_settings) { fetch_environment_settings }
|
6
6
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
it '
|
19
|
-
|
18
|
+
it 'configures the security group' do
|
19
|
+
if env_settings['iaas_type'] != 'vsphere' && env_settings['iaas_type'] != 'vcloud'
|
20
|
+
current_ops_manager.ops_manager_director.configure_security_group(env_settings)
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
# Copyright (c) 2014-2015 Pivotal Software, Inc.
|
@@ -7,8 +7,8 @@ RSpec.describe 'Triggering Install', order: :defined do
|
|
7
7
|
it 'creates the admin user and logs in' do
|
8
8
|
poll_up_to_mins(10) do
|
9
9
|
current_ops_manager.setup_page.setup_or_login(
|
10
|
-
user: env_settings
|
11
|
-
password: env_settings
|
10
|
+
user: env_settings['ops_manager']['username'],
|
11
|
+
password: env_settings['ops_manager']['password'],
|
12
12
|
)
|
13
13
|
|
14
14
|
expect(page).to have_content('Installation Dashboard')
|
@@ -47,10 +47,8 @@ class UiSpecRunner
|
|
47
47
|
run_spec([spec_path + '/export_installation_spec.rb'])
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
51
|
-
|
52
|
-
|
53
|
-
run_spec([spec_path + '/import_installation_spec.rb'])
|
50
|
+
def post_import_configuration
|
51
|
+
run_spec([spec_path + '/post_import_configuration_spec.rb'])
|
54
52
|
end
|
55
53
|
|
56
54
|
def delete_installation
|
@@ -6,8 +6,8 @@ RSpec.describe 'Unchecking Errands', order: :defined do
|
|
6
6
|
|
7
7
|
it 'logs in' do
|
8
8
|
current_ops_manager.setup_page.setup_or_login(
|
9
|
-
user: env_settings
|
10
|
-
password: env_settings
|
9
|
+
user: env_settings['ops_manager']['username'],
|
10
|
+
password: env_settings['ops_manager']['password'],
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ RSpec.describe 'Uploading and Adding a Product', order: :defined do
|
|
6
6
|
|
7
7
|
it 'logs in' do
|
8
8
|
current_ops_manager.setup_page.setup_or_login(
|
9
|
-
user: env_settings
|
10
|
-
password: env_settings
|
9
|
+
user: env_settings['ops_manager']['username'],
|
10
|
+
password: env_settings['ops_manager']['password'],
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
@@ -6,8 +6,8 @@ RSpec.describe 'Uploading and Upgrading a Product', order: :defined do
|
|
6
6
|
|
7
7
|
it 'logs in' do
|
8
8
|
current_ops_manager.setup_page.setup_or_login(
|
9
|
-
user: env_settings
|
10
|
-
password: env_settings
|
9
|
+
user: env_settings['ops_manager']['username'],
|
10
|
+
password: env_settings['ops_manager']['password'],
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
data/lib/opsmgr/version.rb
CHANGED
data/sample_env_files/aws.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsmgr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Release Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 3.0.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 3.0.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: ops_manager_ui_drivers
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 2.4.2
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 2.4.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: mustache
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: net-scp
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: capybara
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -318,7 +332,6 @@ files:
|
|
318
332
|
- README.md
|
319
333
|
- lib/opsmgr.rb
|
320
334
|
- lib/opsmgr/api/client.rb
|
321
|
-
- lib/opsmgr/api/endpoints_factory.rb
|
322
335
|
- lib/opsmgr/api/http_client.rb
|
323
336
|
- lib/opsmgr/api/results.rb
|
324
337
|
- lib/opsmgr/api/version20/endpoints.rb
|
@@ -356,9 +369,9 @@ files:
|
|
356
369
|
- lib/opsmgr/ui_helpers/delete_product_spec.rb
|
357
370
|
- lib/opsmgr/ui_helpers/export_installation_spec.rb
|
358
371
|
- lib/opsmgr/ui_helpers/get_latest_install_log_spec.rb
|
359
|
-
- lib/opsmgr/ui_helpers/import_installation_spec.rb
|
360
372
|
- lib/opsmgr/ui_helpers/import_stemcell_spec.rb
|
361
373
|
- lib/opsmgr/ui_helpers/microbosh/configure_microbosh_spec.rb
|
374
|
+
- lib/opsmgr/ui_helpers/post_import_configuration_spec.rb
|
362
375
|
- lib/opsmgr/ui_helpers/trigger_install_spec.rb
|
363
376
|
- lib/opsmgr/ui_helpers/ui_spec_runner.rb
|
364
377
|
- lib/opsmgr/ui_helpers/uncheck_errands_spec.rb
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'net/http'
|
2
|
-
require 'opsmgr/api/version20/endpoints'
|
3
|
-
|
4
|
-
module Opsmgr
|
5
|
-
module Api
|
6
|
-
class EndpointsFactory
|
7
|
-
def self.create(environment)
|
8
|
-
req = Net::HTTP::Get.new('/api/api_version')
|
9
|
-
uri = URI.parse(environment.settings.ops_manager.url)
|
10
|
-
req.basic_auth(environment.settings.ops_manager.username, environment.settings.ops_manager.password)
|
11
|
-
|
12
|
-
response = http(uri).request(req)
|
13
|
-
|
14
|
-
api_version = JSON.parse(response.body).fetch('version')
|
15
|
-
case api_version
|
16
|
-
when '2.0'
|
17
|
-
return Opsmgr::Api::Version20::Endpoints.new
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.http(uri)
|
22
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
23
|
-
if uri.scheme == 'https'
|
24
|
-
http.use_ssl = true
|
25
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
26
|
-
end
|
27
|
-
http
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
# Copyright (c) 2014-2015 Pivotal Software, Inc.
|
33
|
-
# All rights reserved.
|
34
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
35
|
-
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
36
|
-
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
37
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
38
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
39
|
-
# USE OR OTHER DEALINGS IN THE SOFTWARE.
|