opsmgr-cgfrost 0.35.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/LEGAL.txt +13 -0
  3. data/README.md +123 -0
  4. data/lib/opsmgr.rb +12 -0
  5. data/lib/opsmgr/api/client.rb +116 -0
  6. data/lib/opsmgr/api/http_client.rb +399 -0
  7. data/lib/opsmgr/api/results.rb +280 -0
  8. data/lib/opsmgr/api/version20/endpoints.rb +121 -0
  9. data/lib/opsmgr/bosh_command_runner.rb +84 -0
  10. data/lib/opsmgr/cmd/bosh_command.rb +189 -0
  11. data/lib/opsmgr/cmd/ops_manager.rb +142 -0
  12. data/lib/opsmgr/environments.rb +106 -0
  13. data/lib/opsmgr/errand_runner.rb +62 -0
  14. data/lib/opsmgr/log.rb +70 -0
  15. data/lib/opsmgr/product_upload_wrapper.rb +71 -0
  16. data/lib/opsmgr/renderer.rb +23 -0
  17. data/lib/opsmgr/renderer/aws.rb +148 -0
  18. data/lib/opsmgr/renderer/noop.rb +21 -0
  19. data/lib/opsmgr/settings/microbosh/installation_settings.rb +84 -0
  20. data/lib/opsmgr/settings/microbosh/job.rb +56 -0
  21. data/lib/opsmgr/settings/microbosh/job_list.rb +27 -0
  22. data/lib/opsmgr/settings/microbosh/network.rb +21 -0
  23. data/lib/opsmgr/settings/microbosh/product.rb +90 -0
  24. data/lib/opsmgr/settings/microbosh/product_list.rb +27 -0
  25. data/lib/opsmgr/settings/microbosh/property.rb +33 -0
  26. data/lib/opsmgr/settings/microbosh/property_list.rb +27 -0
  27. data/lib/opsmgr/tasks.rb +16 -0
  28. data/lib/opsmgr/tasks/bosh.rake +104 -0
  29. data/lib/opsmgr/tasks/destroy.rake +42 -0
  30. data/lib/opsmgr/tasks/info.rake +19 -0
  31. data/lib/opsmgr/tasks/opsmgr.rake +205 -0
  32. data/lib/opsmgr/tasks/product.rake +82 -0
  33. data/lib/opsmgr/ui_helpers/add_first_user_spec.rb +25 -0
  34. data/lib/opsmgr/ui_helpers/config_helper.rb +38 -0
  35. data/lib/opsmgr/ui_helpers/delete_installation_spec.rb +41 -0
  36. data/lib/opsmgr/ui_helpers/delete_product_if_present_spec.rb +37 -0
  37. data/lib/opsmgr/ui_helpers/delete_product_spec.rb +39 -0
  38. data/lib/opsmgr/ui_helpers/export_installation_spec.rb +31 -0
  39. data/lib/opsmgr/ui_helpers/get_latest_install_log_spec.rb +29 -0
  40. data/lib/opsmgr/ui_helpers/import_stemcell_spec.rb +30 -0
  41. data/lib/opsmgr/ui_helpers/microbosh/configure_microbosh_spec.rb +32 -0
  42. data/lib/opsmgr/ui_helpers/post_import_configuration_spec.rb +31 -0
  43. data/lib/opsmgr/ui_helpers/revert_staged_changes_spec.rb +39 -0
  44. data/lib/opsmgr/ui_helpers/settings_helper.rb +132 -0
  45. data/lib/opsmgr/ui_helpers/trigger_install_spec.rb +35 -0
  46. data/lib/opsmgr/ui_helpers/ui_spec_runner.rb +122 -0
  47. data/lib/opsmgr/ui_helpers/uncheck_errands_spec.rb +29 -0
  48. data/lib/opsmgr/ui_helpers/upload_and_add_product_spec.rb +27 -0
  49. data/lib/opsmgr/ui_helpers/upload_and_upgrade_product_spec.rb +36 -0
  50. data/lib/opsmgr/version.rb +11 -0
  51. data/sample_env_files/aws.yml +95 -0
  52. data/sample_env_files/vsphere.yml +87 -0
  53. metadata +392 -0
@@ -0,0 +1,82 @@
1
+ namespace :opsmgr do
2
+ namespace :product do
3
+ desc 'Upload a Pivotal Product'
4
+ task :upload, [:environment, :om_version, :product_path, :product_name] do |_, args|
5
+ require 'opsmgr/product_upload_wrapper'
6
+
7
+ ProductUploadWrapper.wrap_upload(
8
+ environment: args.environment,
9
+ product_path: args.product_path,
10
+ product_name: args.product_name,
11
+ om_version: args.om_version
12
+ )
13
+ end
14
+
15
+ desc 'Upload and Add a Pivotal Product'
16
+ task :upload_add, [:environment, :om_version, :product_path, :product_name] do |_, args|
17
+ require 'opsmgr/product_upload_wrapper'
18
+
19
+ ProductUploadWrapper.wrap_add(
20
+ environment: args.environment,
21
+ product_path: args.product_path,
22
+ product_name: args.product_name,
23
+ om_version: args.om_version
24
+ )
25
+ end
26
+
27
+ desc 'Upgrade a Generic Pivotal Product'
28
+ task :upload_upgrade, [:environment, :om_version, :product_path, :product_name] do |_, args|
29
+ require 'opsmgr/product_upload_wrapper'
30
+
31
+ ProductUploadWrapper.wrap_upgrade(
32
+ environment: args.environment,
33
+ product_path: args.product_path,
34
+ product_name: args.product_name,
35
+ om_version: args.om_version
36
+ )
37
+ end
38
+
39
+ desc 'Import a stemcell for a Generic Pivotal Product'
40
+ task :import_stemcell, [:environment, :om_version, :stemcell_path, :product_name] do |_, args|
41
+ require 'opsmgr/ui_helpers/ui_spec_runner'
42
+
43
+ UiSpecRunner.new(
44
+ environment: args.environment,
45
+ om_version: args.om_version
46
+ ).import_stemcell(args.stemcell_path, args.product_name)
47
+ end
48
+
49
+ desc 'Uncheck errands for a Generic Pivotal Product'
50
+ task :uncheck_errands, [:environment, :om_version, :product_name] do |_, args|
51
+ require 'opsmgr/ui_helpers/ui_spec_runner'
52
+
53
+ UiSpecRunner.new(
54
+ environment: args.environment,
55
+ om_version: args.om_version
56
+ ).uncheck_errands(args.product_name, args.extras)
57
+ end
58
+
59
+ desc 'Download staged manifest for a Generic Pivotal Product'
60
+ task :download_staged_manifest, [:environment, :om_version, :product_name, :manifest_filepath] do |_, args|
61
+ require 'opsmgr/environments'
62
+ require 'opsmgr/cmd/ops_manager'
63
+ require 'opsmgr/api/client'
64
+
65
+ environment_object = Opsmgr::Environments.for(args.environment)
66
+ client = Opsmgr::Api::Client.new(environment_object, args.om_version)
67
+ opsmgr_cmd = Opsmgr::Cmd::OpsManager.new(environment_object)
68
+
69
+ installed_products = opsmgr_cmd.installed_products(client)
70
+ product_guid = installed_products.guid_for(args.product_name)
71
+ opsmgr_cmd.download_staged_manifest(client, product_guid, args.manifest_filepath)
72
+ end
73
+ end
74
+ end
75
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
76
+ # All rights reserved.
77
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
78
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
79
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
80
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
81
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
82
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Adding the first user', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+ end
18
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
19
+ # All rights reserved.
20
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
25
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ PROJECT_ROOT = File.expand_path(File.join(__dir__, '..'))
2
+
3
+ require 'rspec'
4
+ require 'ops_manager_ui_drivers'
5
+ require 'yaml'
6
+ require 'opsmgr/environments'
7
+ require_relative 'settings_helper'
8
+
9
+ RSpec.configure do |config|
10
+ config.fail_fast = true
11
+ config.default_formatter = 'documentation'
12
+
13
+ config.include(SettingsHelper)
14
+ config.include(Capybara::DSL)
15
+ config.include(OpsManagerUiDrivers::PageHelpers)
16
+ config.include(OpsManagerUiDrivers::WaitHelper)
17
+
18
+ config.after(:each) do |example|
19
+ if example.exception
20
+ page = save_page
21
+ screenshot = save_screenshot(nil)
22
+
23
+ exception = example.exception
24
+ exception.define_singleton_method :message do
25
+ super() +
26
+ "\nHTML page: #{page}\nScreenshot: #{screenshot}"
27
+ end
28
+ end
29
+ end
30
+ end
31
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
32
+ # All rights reserved.
33
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
34
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
35
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
37
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
38
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Deleting the installation', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ # if the ops manager is not up, fail earlier than other cases and
9
+ # let the caller handle the error
10
+ poll_up_to_mins(1) do
11
+ current_ops_manager.setup_page.setup_or_login(
12
+ user: env_settings['ops_manager']['username'],
13
+ password: env_settings['ops_manager']['password'],
14
+ )
15
+
16
+ expect(page).to have_content('Installation Dashboard')
17
+ end
18
+ end
19
+
20
+ it 'deletes the installation' do
21
+ if current_ops_manager.product_dashboard.delete_installation_available?
22
+ current_ops_manager.product_dashboard.delete_whole_installation
23
+
24
+ expect(current_ops_manager.product_dashboard).not_to be_delete_installation_available
25
+
26
+ poll_up_to_mins(45) do
27
+ expect(current_ops_manager.state_change_progress).to be_state_change_success
28
+ end
29
+ else
30
+ puts 'no installation to delete'
31
+ end
32
+ end
33
+ end
34
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
35
+ # All rights reserved.
36
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
37
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
38
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
39
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
40
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
41
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,37 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Deleting a product if it is present', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
18
+ it 'removes the product if it exists on the dashboard' do
19
+ if current_ops_manager.product_dashboard.product_on_dashboard?(product_name)
20
+ current_ops_manager.product_dashboard.delete_product(product_name)
21
+ current_ops_manager.product_dashboard.apply_updates
22
+ poll_up_to_mins(delete_timeout, poll_interval) do
23
+ expect(current_ops_manager.state_change_progress).to be_state_change_success
24
+ end
25
+ else
26
+ puts "#{product_name} does not exist on dashboard, skipping deletion"
27
+ end
28
+ end
29
+ end
30
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
31
+ # All rights reserved.
32
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
33
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
34
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
35
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
37
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Deleting a product', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
18
+ it 'removes the product from the dashboard' do
19
+ current_ops_manager.product_dashboard.delete_product(product_name)
20
+ end
21
+
22
+ it 'deletes' do
23
+ current_ops_manager.product_dashboard.apply_updates
24
+ end
25
+
26
+ it 'waits for a successful installation' do
27
+ poll_up_to_mins(delete_timeout, poll_interval) do
28
+ expect(current_ops_manager.state_change_progress).to be_state_change_success
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.
@@ -0,0 +1,31 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Exporting the installation', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:current_ops_manager_api_driver) { ops_manager_api_driver }
6
+ let!(:env_settings) { fetch_environment_settings }
7
+
8
+ it 'creates the admin user and logs in' do
9
+ poll_up_to_mins(10) do
10
+ current_ops_manager.setup_page.setup_or_login(
11
+ user: env_settings['ops_manager']['username'],
12
+ password: env_settings['ops_manager']['password'],
13
+ )
14
+
15
+ expect(page).to have_content('Installation Dashboard')
16
+ end
17
+ end
18
+
19
+ it 'exports the installation' do
20
+ exported_installation_path = current_ops_manager_api_driver.export_installation.path
21
+ FileUtils.mv(exported_installation_path, export_destination_path)
22
+ end
23
+ end
24
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
25
+ # All rights reserved.
26
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
27
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
28
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
31
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Getting latest install log', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
18
+ it 'prints the most recent install log' do
19
+ puts current_ops_manager.product_dashboard.most_recent_install_log
20
+ end
21
+ end
22
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
23
+ # All rights reserved.
24
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
25
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
26
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
29
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Importing the stemcell', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
18
+ it 'imports the stemcell' do
19
+ current_ops_manager.product(product_name).upload_stemcell(stemcell_file_path)
20
+ current_ops_manager.product_dashboard.version_for_product(product_name)
21
+ end
22
+ end
23
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
24
+ # All rights reserved.
25
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
26
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
27
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
30
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,32 @@
1
+ require_relative '../config_helper'
2
+
3
+ RSpec.describe 'Configuring director', order: :defined do
4
+ let(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
18
+ it 'configures director' do
19
+ product_dashboard = current_ops_manager.product_dashboard
20
+ product_dashboard.revert_pending_changes if product_dashboard.revert_available?
21
+ current_ops_manager.ops_manager_director.configure_bosh_product(env_settings)
22
+ current_ops_manager.ops_manager_director.configure_icmp_checks(env_settings['ops_manager']['icmp_checks_enabled']) if om_version == '1.7'
23
+ end
24
+ end
25
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
26
+ # All rights reserved.
27
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
28
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
29
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
32
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,31 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Post-import configuration', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ poll_up_to_mins(10) do
9
+ current_ops_manager.setup_page.setup_or_login(
10
+ user: env_settings['ops_manager']['username'],
11
+ password: env_settings['ops_manager']['password'],
12
+ )
13
+
14
+ expect(page).to have_content('Installation Dashboard')
15
+ end
16
+ end
17
+
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
22
+ end
23
+ end
24
+ # Copyright (c) 2014-2015 Pivotal Software, Inc.
25
+ # All rights reserved.
26
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
27
+ # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
28
+ # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
31
+ # USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ require_relative 'config_helper'
2
+
3
+ RSpec.describe 'Reverting staged changes', order: :defined do
4
+ let!(:current_ops_manager) { ops_manager_driver }
5
+ let!(:env_settings) { fetch_environment_settings }
6
+
7
+ it 'creates the admin user and logs in' do
8
+ # if the ops manager is not up, fail earlier than other cases and
9
+ # let the caller handle the error
10
+ poll_up_to_mins(1) do
11
+ current_ops_manager.setup_page.setup_or_login(
12
+ user: env_settings['ops_manager']['username'],
13
+ password: env_settings['ops_manager']['password'],
14
+ )
15
+
16
+ expect(page).to have_content('Installation Dashboard')
17
+ end
18
+ end
19
+
20
+ it 'reverts staged changes' do
21
+ if current_ops_manager.product_dashboard.revert_available?
22
+ current_ops_manager.product_dashboard.revert_pending_changes
23
+
24
+ poll_up_to_mins(1) do
25
+ expect(current_ops_manager.product_dashboard.revert_available?).to eq false
26
+ end
27
+ else
28
+ puts 'no staged changes to revert'
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.