brpm_content 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +38 -0
- data/.travis.yml +14 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +308 -0
- data/Rakefile +24 -0
- data/TO_BE_MIGRATED.txt +8 -0
- data/architecture.png +0 -0
- data/brpm_content.gemspec +31 -0
- data/customers/demo/integrations/brpm/process_event_handler_event.rb +183 -0
- data/customers/demo/integrations/jenkins/spec/api/applications_spec.rb +89 -0
- data/customers/demo/integrations/jenkins/spec/api/plans_spec.rb +69 -0
- data/customers/demo/integrations/jenkins/spec/api/requests_spec.rb +57 -0
- data/customers/demo/integrations/jenkins/spec/spec_helper.rb +33 -0
- data/customers/demo/integrations/jira/process_webhook_event.rb +33 -0
- data/customers/demo/jira_mappings.rb +29 -0
- data/infrastructure/integrations/event_handler.rb +62 -0
- data/infrastructure/integrations/webhook_receiver.rb +49 -0
- data/infrastructure/shell_scripts/backup_database.sh +19 -0
- data/infrastructure/shell_scripts/create_bl_package.sh +34 -0
- data/infrastructure/shell_scripts/create_release_request.sh +34 -0
- data/infrastructure/shell_scripts/ddns.sh +10 -0
- data/infrastructure/shell_scripts/install_brpm.sh +63 -0
- data/infrastructure/shell_scripts/install_content_module.sh +66 -0
- data/infrastructure/shell_scripts/install_content_repo.sh +60 -0
- data/infrastructure/shell_scripts/install_module_from_gem.sh +80 -0
- data/infrastructure/shell_scripts/maintenance.sh +4 -0
- data/infrastructure/shell_scripts/patch_brpm.sh +90 -0
- data/infrastructure/shell_scripts/restore_database.sh +33 -0
- data/infrastructure/shell_scripts/run_event_handler.cmd +16 -0
- data/infrastructure/shell_scripts/run_event_handler.sh +20 -0
- data/infrastructure/shell_scripts/run_webhook_receiver.cmd +14 -0
- data/infrastructure/shell_scripts/run_webhook_receiver.sh +15 -0
- data/infrastructure/shell_scripts/update_content_repo.sh +21 -0
- data/infrastructure/silent_install_options_4.6.txt +93 -0
- data/infrastructure/silent_install_options_upgrade_4.6.txt +92 -0
- data/infrastructure/smtp_settings.rb +42 -0
- data/infrastructure/ssh_script_header_additions.rb +21 -0
- data/modules/ansible/automations/execute_role.rb +3 -0
- data/modules/ansible/automations/execute_role.txt +12 -0
- data/modules/ansible/config.yml +5 -0
- data/modules/ansible/lib/ansible.rb +41 -0
- data/modules/atrium_orchestrator/automations/execute_workflow.rb +12 -0
- data/modules/atrium_orchestrator/automations/execute_workflow.txt +25 -0
- data/modules/atrium_orchestrator/automations/reserve_ip_address.rb +22 -0
- data/modules/atrium_orchestrator/automations/reserve_ip_address.txt +21 -0
- data/modules/atrium_orchestrator/config.yml +7 -0
- data/modules/atrium_orchestrator/lib/ao_soap_client.rb +94 -0
- data/modules/bladelogic/automations/create_package.rb +29 -0
- data/modules/bladelogic/automations/create_package.txt +26 -0
- data/modules/bladelogic/automations/deploy_package.rb +137 -0
- data/modules/bladelogic/automations/deploy_package.txt +53 -0
- data/modules/bladelogic/config.yml +7 -0
- data/modules/bladelogic/lib/bl_rest/bsa_rest_client.rb +65 -0
- data/modules/bladelogic/lib/bl_soap/blpackage.rb +43 -0
- data/modules/bladelogic/lib/bl_soap/bsa_soap_base.rb +118 -0
- data/modules/bladelogic/lib/bl_soap/bsa_soap_client.rb +34 -0
- data/modules/bladelogic/lib/bl_soap/compliance_job.rb +155 -0
- data/modules/bladelogic/lib/bl_soap/deploy_job.rb +48 -0
- data/modules/bladelogic/lib/bl_soap/depot_group.rb +47 -0
- data/modules/bladelogic/lib/bl_soap/job.rb +376 -0
- data/modules/bladelogic/lib/bl_soap/job_group.rb +72 -0
- data/modules/bladelogic/lib/bl_soap/job_management.rb +22 -0
- data/modules/bladelogic/lib/bl_soap/job_result.rb +12 -0
- data/modules/bladelogic/lib/bl_soap/job_run.rb +271 -0
- data/modules/bladelogic/lib/bl_soap/login.rb +47 -0
- data/modules/bladelogic/lib/bl_soap/nsh_script_job.rb +14 -0
- data/modules/bladelogic/lib/bl_soap/patch_catalog.rb +178 -0
- data/modules/bladelogic/lib/bl_soap/patch_remediation_job.rb +137 -0
- data/modules/bladelogic/lib/bl_soap/patching_job.rb +250 -0
- data/modules/bladelogic/lib/bl_soap/server.rb +12 -0
- data/modules/bladelogic/lib/bl_soap/template.rb +13 -0
- data/modules/bladelogic/lib/bl_soap/utility.rb +99 -0
- data/modules/bladelogic/resource_automations/select_job.rb +33 -0
- data/modules/bladelogic/resource_automations/select_job.txt +15 -0
- data/modules/bladelogic/tests/create_package_spec.rb +28 -0
- data/modules/bladelogic/tests/deploy_package_spec.rb +23 -0
- data/modules/bladelogic/tests/spec_helper.rb +82 -0
- data/modules/brpm/automations/create_release_from_excel.rb +34 -0
- data/modules/brpm/automations/create_release_from_excel.txt +5 -0
- data/modules/brpm/automations/create_release_request.rb +100 -0
- data/modules/brpm/automations/create_release_request.txt +5 -0
- data/modules/brpm/automations/create_request.rb +73 -0
- data/modules/brpm/automations/create_request.txt +23 -0
- data/modules/brpm/automations/promote_request.rb +197 -0
- data/modules/brpm/automations/promote_request.txt +24 -0
- data/modules/brpm/automations/select_application_version.rb +22 -0
- data/modules/brpm/automations/select_application_version.txt +17 -0
- data/modules/brpm/automations/select_component_version.rb +12 -0
- data/modules/brpm/automations/select_component_version.txt +5 -0
- data/modules/brpm/automations/select_request_template.rb +6 -0
- data/modules/brpm/automations/select_request_template.txt +13 -0
- data/modules/brpm/automations/wait_for_step_in_other_request.rb +11 -0
- data/modules/brpm/automations/wait_for_step_in_other_request.txt +13 -0
- data/modules/brpm/automations/wait_till_promoted_request_is_completed.rb +9 -0
- data/modules/brpm/automations/wait_till_promoted_request_is_completed.txt +5 -0
- data/modules/brpm/config.yml +6 -0
- data/modules/brpm/lib/brpm_request.rb +207 -0
- data/modules/brpm/lib/brpm_rest.rb +312 -0
- data/modules/brpm/lib/brpm_rest_client.rb +1501 -0
- data/modules/brpm/resource_automations/select_application.rb +16 -0
- data/modules/brpm/resource_automations/select_application.txt +5 -0
- data/modules/brpm/resource_automations/select_environment.rb +14 -0
- data/modules/brpm/resource_automations/select_environment.txt +5 -0
- data/modules/brpm/resource_automations/select_request_template.rb +16 -0
- data/modules/brpm/resource_automations/select_request_template.txt +5 -0
- data/modules/brpm/resource_automations/select_step_in_request.rb +33 -0
- data/modules/brpm/resource_automations/select_step_in_request.txt +5 -0
- data/modules/brpm/sample_applications/e-finance.json +0 -0
- data/modules/brpm/tests/create_release_request_spec.rb +66 -0
- data/modules/brpm/tests/create_request_spec.rb +84 -0
- data/modules/brpm/tests/select_application_version_spec.rb +47 -0
- data/modules/brpm/tests/spec_helper.rb +63 -0
- data/modules/docker_brpm/automations/create_brpm_instance_input_params.rb +10 -0
- data/modules/docker_brpm/automations/create_brpm_instance_input_params.txt +17 -0
- data/modules/docker_brpm/automations/create_brpm_instance_one_shot.rb +60 -0
- data/modules/docker_brpm/automations/create_brpm_instance_one_shot.txt +14 -0
- data/modules/docker_brpm/automations/create_brpm_instance_show_results.rb +23 -0
- data/modules/docker_brpm/automations/create_brpm_instance_show_results.txt +13 -0
- data/modules/docker_brpm/automations/create_database.rb +24 -0
- data/modules/docker_brpm/automations/create_database.txt +3 -0
- data/modules/docker_brpm/automations/create_environment.rb +14 -0
- data/modules/docker_brpm/automations/create_environment.txt +3 -0
- data/modules/docker_brpm/automations/create_image_for_application.rb +23 -0
- data/modules/docker_brpm/automations/create_image_for_application.txt +6 -0
- data/modules/docker_brpm/automations/create_image_for_brpm_application_input_params.rb +7 -0
- data/modules/docker_brpm/automations/create_image_for_brpm_application_input_params.txt +8 -0
- data/modules/docker_brpm/automations/create_image_for_brpm_database_creator_input_params.rb +7 -0
- data/modules/docker_brpm/automations/create_image_for_brpm_database_creator_input_params.txt +8 -0
- data/modules/docker_brpm/automations/create_image_for_database_creator.rb +21 -0
- data/modules/docker_brpm/automations/create_image_for_database_creator.txt +6 -0
- data/modules/docker_brpm/automations/create_installed_component_for_application.rb +11 -0
- data/modules/docker_brpm/automations/create_installed_component_for_application.txt +3 -0
- data/modules/docker_brpm/automations/create_installed_component_for_database.rb +7 -0
- data/modules/docker_brpm/automations/create_installed_component_for_database.txt +3 -0
- data/modules/docker_brpm/automations/create_installed_component_for_database_creator.rb +8 -0
- data/modules/docker_brpm/automations/create_installed_component_for_database_creator.txt +3 -0
- data/modules/docker_brpm/automations/create_installed_component_for_utilities.rb +7 -0
- data/modules/docker_brpm/automations/create_installed_component_for_utilities.txt +3 -0
- data/modules/docker_brpm/automations/create_version_tags_for_component_in_all_envs.rb +13 -0
- data/modules/docker_brpm/automations/create_version_tags_for_component_in_all_envs.txt +6 -0
- data/modules/docker_brpm/automations/delete_brpm_instance.rb +38 -0
- data/modules/docker_brpm/automations/delete_brpm_instance.txt +8 -0
- data/modules/docker_brpm/automations/execute_test_run_in_jenkins.rb +43 -0
- data/modules/docker_brpm/automations/execute_test_run_in_jenkins.txt +13 -0
- data/modules/docker_brpm/automations/execute_test_run_in_jenkins_show_results.rb +5 -0
- data/modules/docker_brpm/automations/execute_test_run_in_jenkins_show_results.txt +9 -0
- data/modules/docker_brpm/automations/launch_create_image_for_brpm_application_request.rb +27 -0
- data/modules/docker_brpm/automations/launch_create_image_for_brpm_application_request.txt +3 -0
- data/modules/docker_brpm/automations/launch_test_run_request.rb +30 -0
- data/modules/docker_brpm/automations/launch_test_run_request.txt +14 -0
- data/modules/docker_brpm/automations/release_brpm_input_params.rb +7 -0
- data/modules/docker_brpm/automations/release_brpm_input_params.txt +8 -0
- data/modules/docker_brpm/automations/run_application_container.rb +27 -0
- data/modules/docker_brpm/automations/run_application_container.txt +3 -0
- data/modules/docker_brpm/automations/run_database_container.rb +14 -0
- data/modules/docker_brpm/automations/run_database_container.txt +3 -0
- data/modules/docker_brpm/automations/stop_application_container.rb +11 -0
- data/modules/docker_brpm/automations/stop_application_container.txt +3 -0
- data/modules/docker_brpm/automations/stop_database_container.rb +11 -0
- data/modules/docker_brpm/automations/stop_database_container.txt +3 -0
- data/modules/docker_brpm/automations/test_rest_api.rb +18 -0
- data/modules/docker_brpm/automations/test_rest_api.txt +3 -0
- data/modules/docker_brpm/automations/upgrade_database.rb +19 -0
- data/modules/docker_brpm/automations/upgrade_database.txt +8 -0
- data/modules/docker_brpm/config.yml +8 -0
- data/modules/docker_brpm/lib/docker.rb +39 -0
- data/modules/docker_brpm/lib/git.rb +16 -0
- data/modules/docker_brpm/sample_applications/dockerizedbrpm.json +0 -0
- data/modules/email/automations/send_notification.rb +48 -0
- data/modules/email/automations/send_notification.txt +27 -0
- data/modules/email/config.yml +6 -0
- data/modules/framework/automations/direct_execute.rb +10 -0
- data/modules/framework/automations/direct_execute.txt +16 -0
- data/modules/framework/automations/install_module.rb +13 -0
- data/modules/framework/automations/install_module.txt +16 -0
- data/modules/framework/bin/brpm_install +106 -0
- data/modules/framework/bin/event_handler +63 -0
- data/modules/framework/bin/webhook_receiver +49 -0
- data/modules/framework/brpm_auto.rb +307 -0
- data/modules/framework/brpm_framework.rb +88 -0
- data/modules/framework/brpm_script_executor.rb +146 -0
- data/modules/framework/config.yml +7 -0
- data/modules/framework/config/customer_include.rb +26 -0
- data/modules/framework/config/server.yml +3 -0
- data/modules/framework/customer_include_default.rb +25 -0
- data/modules/framework/lib/logging/brpm_logger.rb +39 -0
- data/modules/framework/lib/logging/logger_base.rb +36 -0
- data/modules/framework/lib/logging/simple_logger.rb +27 -0
- data/modules/framework/lib/params/all_params.rb +80 -0
- data/modules/framework/lib/params/integration_settings.rb +27 -0
- data/modules/framework/lib/params/params.rb +172 -0
- data/modules/framework/lib/params/params_base.rb +81 -0
- data/modules/framework/lib/params/request_params.rb +38 -0
- data/modules/framework/lib/resource_framework.rb +211 -0
- data/modules/framework/lib/rest_api.rb +155 -0
- data/modules/framework/lib/semaphore.rb +79 -0
- data/modules/framework/lib/utilities.rb +317 -0
- data/modules/framework/lib/version_control/git.rb +192 -0
- data/modules/framework/lib/version_control/svn.rb +221 -0
- data/modules/framework/log.html +39 -0
- data/modules/framework/tests/all_params_spec.rb +116 -0
- data/modules/framework/tests/brpm_auto_spec.rb +84 -0
- data/modules/framework/tests/customer_include/config/customer_include.rb +10 -0
- data/modules/framework/tests/customer_include/config/server.yml +3 -0
- data/modules/framework/tests/customer_include_spec.rb +29 -0
- data/modules/framework/tests/local_jirb.rb +15 -0
- data/modules/framework/tests/params_spec.rb +172 -0
- data/modules/framework/tests/request_params_spec.rb +86 -0
- data/modules/framework/tests/server_yaml_spec.rb +19 -0
- data/modules/framework/tests/spec_helper.rb +42 -0
- data/modules/framework/transport/dispatch_baa.rb +355 -0
- data/modules/framework/transport/dispatch_base.rb +345 -0
- data/modules/framework/transport/dispatch_nsh.rb +248 -0
- data/modules/framework/transport/dispatch_ssh.rb +154 -0
- data/modules/framework/transport/transport_baa.rb +1095 -0
- data/modules/framework/transport/transport_nsh.rb +359 -0
- data/modules/framework/transport/transport_ssh.rb +220 -0
- data/modules/framework/write_to.rb +1 -0
- data/modules/jenkins/automations/create_release.rb +4 -0
- data/modules/jenkins/automations/create_release.txt +23 -0
- data/modules/jenkins/automations/f2_downloadJenkinsArtifact.rb +126 -0
- data/modules/jenkins/config.yml +7 -0
- data/modules/jenkins/lib/jenkins.rb +300 -0
- data/modules/jenkins/resource_automations/f2_rsc_jenkinsJobs.rb +58 -0
- data/modules/jira/automations/add_comment.rb +4 -0
- data/modules/jira/automations/add_comment.txt +23 -0
- data/modules/jira/automations/create_release.rb +4 -0
- data/modules/jira/automations/create_release.txt +23 -0
- data/modules/jira/automations/delete_release.rb +4 -0
- data/modules/jira/automations/delete_release.txt +23 -0
- data/modules/jira/automations/transition_issue.rb +4 -0
- data/modules/jira/automations/transition_issue.txt +23 -0
- data/modules/jira/automations/transition_issues_for_request.rb +29 -0
- data/modules/jira/automations/transition_issues_for_request.txt +20 -0
- data/modules/jira/automations/transition_issues_for_run.rb +26 -0
- data/modules/jira/automations/transition_issues_for_run.txt +20 -0
- data/modules/jira/automations/update_release.rb +4 -0
- data/modules/jira/automations/update_release.txt +26 -0
- data/modules/jira/config.yml +7 -0
- data/modules/jira/lib/jira_rest_client.rb +185 -0
- data/modules/jira/tests/create_read_update_delete_release_spec.rb +39 -0
- data/modules/jira/tests/spec_helper.rb +39 -0
- data/modules/jira/tests/transition_issue_spec.rb +32 -0
- data/modules/patch_process_management/automations/execute_job/script.rb +105 -0
- data/modules/patch_process_management/automations/execute_job/wrapper.txt +39 -0
- data/modules/patch_process_management/automations/patch_analysis/script.rb +107 -0
- data/modules/patch_process_management/automations/patch_analysis/wrapper.txt +33 -0
- data/modules/patch_process_management/automations/patch_readiness/script.rb +89 -0
- data/modules/patch_process_management/automations/patch_readiness/wrapper.txt +33 -0
- data/modules/patch_process_management/automations/patch_remediation/script.rb +217 -0
- data/modules/patch_process_management/automations/patch_remediation/wrapper.txt +40 -0
- data/modules/patch_process_management/config.yml +10 -0
- data/modules/teamcity/automations/trigger_build.rb +4 -0
- data/modules/teamcity/automations/trigger_build.txt +14 -0
- data/modules/teamcity/config.yml +7 -0
- data/modules/teamcity/lib/teamcity_rest_client.rb +17 -0
- data/modules/teamcity/tests/spec_helper.rb +34 -0
- data/modules/teamcity/tests/trigger_build_spec.rb +27 -0
- data/modules/windows/automations/deploy_directory_over_windows_shares/script.rb +87 -0
- data/modules/windows/automations/deploy_directory_over_windows_shares/wrapper.txt +29 -0
- data/modules/windows/automations/deploy_file_over_windows_shares/script.rb +31 -0
- data/modules/windows/automations/deploy_file_over_windows_shares/wrapper.txt +24 -0
- data/modules/windows/config.yml +6 -0
- data/modules/windows/lib/samba.rb +29 -0
- metadata +397 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
# very basic support right now
|
2
|
+
class DeployJob < BsaSoapBase
|
3
|
+
def create_deploy_job(options = {})
|
4
|
+
validate_cli_options_hash([:job_name, :group_id, :package_db_key, :server_name], options)
|
5
|
+
db_key_result = execute_cli_with_param_list(self.class, "createDeployJob",
|
6
|
+
[
|
7
|
+
options[:job_name],
|
8
|
+
options[:group_id],
|
9
|
+
options[:package_db_key],
|
10
|
+
options[:server_name],
|
11
|
+
true, #isSimulateEnabled
|
12
|
+
true, #isCommitEnabled
|
13
|
+
false, #isStagedIndirect
|
14
|
+
])
|
15
|
+
db_key = get_cli_return_value(db_key_result)
|
16
|
+
rescue => exception
|
17
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_dbkey_by_group_and_name(options = {})
|
21
|
+
validate_cli_options_hash([:group_name, :job_name], options)
|
22
|
+
db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
|
23
|
+
[
|
24
|
+
options[:group_name], # Fully qualified path to the job group containing the job
|
25
|
+
options[:job_name] # Name of the job
|
26
|
+
])
|
27
|
+
db_key = get_cli_return_value(db_key_result)
|
28
|
+
rescue => exception
|
29
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_phase_schedule_by_dbkey(options = {})
|
33
|
+
validate_cli_options_hash([:job_run_key], options)
|
34
|
+
void_result = execute_cli_with_param_list(self.class, "setAdvanceDeployJobPhaseScheduleByDBKey",
|
35
|
+
[
|
36
|
+
options[:job_run_key],
|
37
|
+
options[:simulate_type],
|
38
|
+
options[:simulate_date],
|
39
|
+
options[:stage_type],
|
40
|
+
options[:stage_date],
|
41
|
+
options[:commit_type],
|
42
|
+
options[:commit_date],
|
43
|
+
])
|
44
|
+
void_value = get_cli_return_value(void_result)
|
45
|
+
rescue => exception
|
46
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
class DepotGroup < BsaSoapBase
|
2
|
+
def create_depot_group(options = {})
|
3
|
+
validate_cli_options_hash([:group_name, :parent_id], options)
|
4
|
+
integer_result = execute_cli_with_param_list(self.class, "createDepotGroup",
|
5
|
+
[
|
6
|
+
options[:group_name], # group name to be created
|
7
|
+
options[:parent_id] # parent id
|
8
|
+
])
|
9
|
+
integer_value = get_cli_return_value(integer_result)
|
10
|
+
rescue => exception
|
11
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_depot_group_with_parent_name(options = {})
|
15
|
+
validate_cli_options_hash([:group_name, :parent_group_name], options)
|
16
|
+
integer_result = execute_cli_with_param_list(self.class, "createDepotGroupWithParentName",
|
17
|
+
[
|
18
|
+
options[:group_name], # group name to be created
|
19
|
+
options[:parent_group_name] # parent group name
|
20
|
+
])
|
21
|
+
integer_value = get_cli_return_value(integer_result)
|
22
|
+
rescue => exception
|
23
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def group_exists(options = {})
|
27
|
+
validate_cli_options_hash([:group_name], options)
|
28
|
+
boolean_result = execute_cli_with_param_list(self.class, "groupExists",
|
29
|
+
[
|
30
|
+
options[:group_name] # fully qualified group to check
|
31
|
+
])
|
32
|
+
boolean_value = get_cli_return_value(boolean_result)
|
33
|
+
rescue => exception
|
34
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def group_name_to_id(options = {})
|
38
|
+
validate_cli_options_hash([:group_name], options)
|
39
|
+
integer_result = execute_cli_with_param_list(self.class, "groupNameToId",
|
40
|
+
[
|
41
|
+
options[:group_name] # Fully qualified path
|
42
|
+
])
|
43
|
+
integer_value = get_cli_return_value(integer_result)
|
44
|
+
rescue => exception
|
45
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,376 @@
|
|
1
|
+
# Does not support Schedule manipulation, makes no sense in BRPM situation
|
2
|
+
# Does not support ACL or permission manipulation, makes no sense in BRPM situation
|
3
|
+
# Does not support Bulk property configuration
|
4
|
+
# Does not support Moving or Copy of Jobs
|
5
|
+
# Does not support Removing properties
|
6
|
+
class Job < BsaSoapBase
|
7
|
+
def add_target_component_group(options = {})
|
8
|
+
validate_cli_options_hash([:job_key, :group_name], options)
|
9
|
+
db_key_result = execute_cli_with_param_list(self.class, "addTargetComponentGroup",
|
10
|
+
[
|
11
|
+
options[:job_key], # Handle of the job to be updated
|
12
|
+
options[:group_name] # Name of the component server group
|
13
|
+
])
|
14
|
+
db_key = get_cli_return_value(db_key_result)
|
15
|
+
rescue => exception
|
16
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
17
|
+
end
|
18
|
+
|
19
|
+
def add_target_group(options = {})
|
20
|
+
validate_cli_options_hash([:job_key, :group_name], options)
|
21
|
+
db_key_result = execute_cli_with_param_list(self.class, "addTargetGroup",
|
22
|
+
[
|
23
|
+
options[:job_key], # Handle of the job to be updated
|
24
|
+
options[:group_name] # Name of the server group
|
25
|
+
])
|
26
|
+
db_key = get_cli_return_value(db_key_result)
|
27
|
+
rescue => exception
|
28
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def add_target_groups(options = {})
|
32
|
+
validate_cli_options_hash([:job_key, :group_names], options)
|
33
|
+
db_key_result = execute_cli_with_param_list(self.class, "addTargetGroups",
|
34
|
+
[
|
35
|
+
options[:job_key], # Handle of the job to be updated
|
36
|
+
options[:group_names] # Name of the groups to add (comma separated list)
|
37
|
+
])
|
38
|
+
db_key = get_cli_return_value(db_key_result)
|
39
|
+
rescue => exception
|
40
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
41
|
+
end
|
42
|
+
|
43
|
+
def add_target_server(options = {})
|
44
|
+
validate_cli_options_hash([:job_key, :server_name], options)
|
45
|
+
db_key_result = execute_cli_with_param_list(self.class, "addTargetServer",
|
46
|
+
[
|
47
|
+
options[:job_key], # Handle of the job to be updated
|
48
|
+
options[:server_name] # Name of the server to add
|
49
|
+
])
|
50
|
+
db_key = get_cli_return_value(db_key_result)
|
51
|
+
rescue => exception
|
52
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def add_target_servers(options = {})
|
56
|
+
validate_cli_options_hash([:job_key, :server_names], options)
|
57
|
+
db_key_result = execute_cli_with_param_list(self.class, "addTargetServers",
|
58
|
+
[
|
59
|
+
options[:job_key], # Handle of the job to be updated
|
60
|
+
options[:server_names] # Name of the servers to add (comma separated list)
|
61
|
+
])
|
62
|
+
db_key = get_cli_return_value(db_key_result)
|
63
|
+
rescue => exception
|
64
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
65
|
+
end
|
66
|
+
|
67
|
+
def clear_target_group(options = {})
|
68
|
+
validate_cli_options_hash([:job_key, :group_name], options)
|
69
|
+
db_key_result = execute_cli_with_param_list(self.class, "clearTargetGroup",
|
70
|
+
[
|
71
|
+
options[:job_key], # Handle of the job to be updated
|
72
|
+
options[:group_name] # Name of the server group
|
73
|
+
])
|
74
|
+
db_key = get_cli_return_value(db_key_result)
|
75
|
+
rescue => exception
|
76
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
77
|
+
end
|
78
|
+
|
79
|
+
def clear_target_groups(options = {})
|
80
|
+
validate_cli_options_hash([:job_key], options)
|
81
|
+
db_key_result = execute_cli_with_param_list(self.class, "clearTargetGroups",
|
82
|
+
[
|
83
|
+
options[:job_key] # Handle of the job to be updated
|
84
|
+
])
|
85
|
+
db_key = get_cli_return_value(db_key_result)
|
86
|
+
rescue => exception
|
87
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
88
|
+
end
|
89
|
+
|
90
|
+
def clear_target_server(options = {})
|
91
|
+
validate_cli_options_hash([:job_key, :server_name], options)
|
92
|
+
db_key_result = execute_cli_with_param_list(self.class, "clearTargetServer",
|
93
|
+
[
|
94
|
+
options[:job_key], # Handle of the job to be updated
|
95
|
+
options[:server_name] # Name of the server to add
|
96
|
+
])
|
97
|
+
db_key = get_cli_return_value(db_key_result)
|
98
|
+
rescue => exception
|
99
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
100
|
+
end
|
101
|
+
|
102
|
+
def clear_target_servers(options = {})
|
103
|
+
validate_cli_options_hash([:job_key], options)
|
104
|
+
db_key_result = execute_cli_with_param_list(self.class, "clearTargetServers",
|
105
|
+
[
|
106
|
+
options[:job_key] # Handle of the job to be updated
|
107
|
+
])
|
108
|
+
db_key = get_cli_return_value(db_key_result)
|
109
|
+
rescue => exception
|
110
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
111
|
+
end
|
112
|
+
|
113
|
+
def create_approval(options = {})
|
114
|
+
validate_cli_options_hash([:approval_type, :change_type, :impact_id, :risk_level], options)
|
115
|
+
integer_result = execute_cli_with_param_list(self.class, "createApproval",
|
116
|
+
[
|
117
|
+
options[:approval_type], # The approval type
|
118
|
+
options[:change_type], # The change type
|
119
|
+
options[:comments] || "", # A string that appears in the change summary (if approval_type = 5, change can be "")
|
120
|
+
options[:impact_id], # The impact id
|
121
|
+
options[:risk_level], # The risk level
|
122
|
+
options[:change_id] || "", # The change id from the change management system (only if approval_type = 5)
|
123
|
+
options[:task_id] || "" # The task id from the change management system ( only if approval_type = 5)
|
124
|
+
])
|
125
|
+
integer_value = get_cli_return_value(integer_result)
|
126
|
+
rescue => exception
|
127
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
128
|
+
end
|
129
|
+
|
130
|
+
def execute(options = {})
|
131
|
+
validate_cli_options_hash([:job_key], options)
|
132
|
+
void_result = execute_cli_with_param_list(self.class, "execute",
|
133
|
+
[
|
134
|
+
options[:job_key] # Handle of the job to be updated
|
135
|
+
])
|
136
|
+
void_value = get_cli_return_value(void_result)
|
137
|
+
rescue => exception
|
138
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
139
|
+
end
|
140
|
+
|
141
|
+
def execute_against_component_groups(options = {})
|
142
|
+
validate_cli_options_hash([:job_key, :group_names], options)
|
143
|
+
integer_result = execute_cli_with_param_list(self.class, "executeAgainstComponentGroups",
|
144
|
+
[
|
145
|
+
options[:job_key], # Handle of the job to be updated
|
146
|
+
options[:group_names] # Name of component group(s) - comma-separated list of group names
|
147
|
+
])
|
148
|
+
integer_value = get_cli_return_value(integer_result)
|
149
|
+
rescue => exception
|
150
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
151
|
+
end
|
152
|
+
|
153
|
+
def execute_against_component_groups_for_run_id(options = {})
|
154
|
+
validate_cli_options_hash([:job_key, :group_names], options)
|
155
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeAgainstComponentGroupsForRunID",
|
156
|
+
[
|
157
|
+
options[:job_key], # Handle of the job to be updated
|
158
|
+
options[:group_names] # Name of component group(s) - comma-separated list of group names
|
159
|
+
])
|
160
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
161
|
+
rescue => exception
|
162
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
163
|
+
end
|
164
|
+
|
165
|
+
def execute_against_failed_target(options = {})
|
166
|
+
validate_cli_options_hash([:job_key, :filter_type], options)
|
167
|
+
integer_result = execute_cli_with_param_list(self.class, "executeAgainstFailedTarget",
|
168
|
+
[
|
169
|
+
options[:job_key], # Handle of the job to be updated
|
170
|
+
options[:filter_type] # The failure level of the targets you want to execute against
|
171
|
+
])
|
172
|
+
integer_value = get_cli_return_value(integer_result)
|
173
|
+
rescue => exception
|
174
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
175
|
+
end
|
176
|
+
|
177
|
+
def execute_against_server_groups(options = {})
|
178
|
+
validate_cli_options_hash([:job_key, :server_groups], options)
|
179
|
+
integer_result = execute_cli_with_param_list(self.class, "executeAgainstServerGroups",
|
180
|
+
[
|
181
|
+
options[:job_key], # Handle of the job to be updated
|
182
|
+
options[:server_groups] # Name of server group(s) - comma-separated list of group names
|
183
|
+
])
|
184
|
+
integer_value = get_cli_return_value(integer_result)
|
185
|
+
rescue => exception
|
186
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
187
|
+
end
|
188
|
+
|
189
|
+
def execute_against_server_groups_for_run_id(options = {})
|
190
|
+
validate_cli_options_hash([:job_key, :server_groups], options)
|
191
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeAgainstServerGroupsForRunID",
|
192
|
+
[
|
193
|
+
options[:job_key], # Handle of the job to be updated
|
194
|
+
options[:server_groups] # Name of server group(s) - comma-separated list of group names
|
195
|
+
])
|
196
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
197
|
+
rescue => exception
|
198
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
199
|
+
end
|
200
|
+
|
201
|
+
def execute_against_servers(options = {})
|
202
|
+
validate_cli_options_hash([:job_key, :server_names], options)
|
203
|
+
integer_result = execute_cli_with_param_list(self.class, "executeAgainstServers",
|
204
|
+
[
|
205
|
+
options[:job_key], # Handle of the job to be updated
|
206
|
+
options[:server_names] # Name of server group(s) - comma-separated list of group names
|
207
|
+
])
|
208
|
+
integer_value = get_cli_return_value(integer_result)
|
209
|
+
rescue => exception
|
210
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
211
|
+
end
|
212
|
+
|
213
|
+
def execute_against_servers_for_run_id(options = {})
|
214
|
+
validate_cli_options_hash([:job_key, :server_names], options)
|
215
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeAgainstServersForRunID",
|
216
|
+
[
|
217
|
+
options[:job_key], # Handle of the job to be updated
|
218
|
+
options[:server_names] # Name of server group(s) - comma-separated list of group names
|
219
|
+
])
|
220
|
+
job_run_key = get_cli_return_value(job_key_result)
|
221
|
+
rescue => exception
|
222
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
223
|
+
end
|
224
|
+
|
225
|
+
def execute_job_and_wait(options = {})
|
226
|
+
validate_cli_options_hash([:job_key], options)
|
227
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeJobAndWait",
|
228
|
+
[
|
229
|
+
options[:job_key] # Handle of the job to be updated
|
230
|
+
])
|
231
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
232
|
+
rescue => exception
|
233
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
234
|
+
end
|
235
|
+
|
236
|
+
def execute_job_and_wait_for_run_id(options = {})
|
237
|
+
validate_cli_options_hash([:job_key], options)
|
238
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeJobAndWaitForRunID",
|
239
|
+
[
|
240
|
+
options[:job_key] # Handle of the job to be updated
|
241
|
+
])
|
242
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
243
|
+
rescue => exception
|
244
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
245
|
+
end
|
246
|
+
|
247
|
+
def execute_job_with_approval_and_wait_for_run_id(options = {})
|
248
|
+
validate_cli_options_hash([:job_key, :approval_id], options)
|
249
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeJobWithApprovalAndWaitForRunID",
|
250
|
+
[
|
251
|
+
options[:job_key], # Handle of the job to be updated
|
252
|
+
options[:approval_id] # Approval id
|
253
|
+
])
|
254
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
255
|
+
rescue => exception
|
256
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
257
|
+
end
|
258
|
+
|
259
|
+
def execute_with_approval(options = {})
|
260
|
+
validate_cli_options_hash([:job_key, :approval_id], options)
|
261
|
+
void_result = execute_cli_with_param_list(self.class, "executeJobWithApprovalAndWaitForRunID",
|
262
|
+
[
|
263
|
+
options[:job_key], # Handle of the job to be updated
|
264
|
+
options[:approval_id] # Approval id
|
265
|
+
])
|
266
|
+
void_value = get_cli_return_value(void_result)
|
267
|
+
rescue => exception
|
268
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
269
|
+
end
|
270
|
+
|
271
|
+
def get_group_id(options = {})
|
272
|
+
validate_cli_options_hash([:job_key], options)
|
273
|
+
integer_result = execute_cli_with_param_list(self.class, "getGroupId",
|
274
|
+
[
|
275
|
+
options[:job_key] # Handle of the job to be updated
|
276
|
+
])
|
277
|
+
integer_value = get_cli_return_value(integer_result)
|
278
|
+
rescue => exception
|
279
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
280
|
+
end
|
281
|
+
|
282
|
+
def get_job_name_by_db_key(options = {})
|
283
|
+
validate_cli_options_hash([:job_db_key], options)
|
284
|
+
string_result = execute_cli_with_param_list(self.class, "getJobNameByDBKey",
|
285
|
+
[
|
286
|
+
options[:job_db_key] # Handle of the job
|
287
|
+
])
|
288
|
+
string_value = get_cli_return_value(string_result)
|
289
|
+
rescue => exception
|
290
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
291
|
+
end
|
292
|
+
|
293
|
+
def get_last_job_db_key_by_job_id(options = {})
|
294
|
+
validate_cli_options_hash([:job_id], options)
|
295
|
+
db_key_result = execute_cli_with_param_list(self.class, "getLastJobDBKeyByJobId",
|
296
|
+
[
|
297
|
+
options[:job_id] # Handle of the job
|
298
|
+
])
|
299
|
+
db_key = get_cli_return_value(db_key_result)
|
300
|
+
rescue => exception
|
301
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
302
|
+
end
|
303
|
+
|
304
|
+
def get_target_servers(options = {})
|
305
|
+
validate_cli_options_hash([:job_key, :server_state], options)
|
306
|
+
list_result = execute_cli_with_param_list(self.class, "getTargetServers",
|
307
|
+
[
|
308
|
+
options[:job_key], # Handle of the job
|
309
|
+
options[:server_state] # desired server states
|
310
|
+
])
|
311
|
+
list_value = get_cli_return_value(list_result)
|
312
|
+
rescue => exception
|
313
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
314
|
+
end
|
315
|
+
|
316
|
+
def get_targets(options = {})
|
317
|
+
validate_cli_options_hash([:job_key, :taret_types], options)
|
318
|
+
list_result = execute_cli_with_param_list(self.class, "getTargets",
|
319
|
+
[
|
320
|
+
options[:job_key], # Handle of the job
|
321
|
+
options[:target_types] # desired target types
|
322
|
+
])
|
323
|
+
list_value = get_cli_return_value(list_result)
|
324
|
+
rescue => exception
|
325
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
326
|
+
end
|
327
|
+
|
328
|
+
def list_all_by_group(options = {})
|
329
|
+
validate_cli_options_hash([:group_name], options)
|
330
|
+
string_result = execute_cli_with_param_list(self.class, "listAllByGroup",
|
331
|
+
[
|
332
|
+
options[:group_name] # Fully qualified group name
|
333
|
+
])
|
334
|
+
string_value = get_cli_return_value(string_result)
|
335
|
+
rescue => exception
|
336
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
337
|
+
end
|
338
|
+
|
339
|
+
def set_max_parallelism(options = {})
|
340
|
+
validate_cli_options_hash([:job_key, :parallelism], options)
|
341
|
+
db_key_result = execute_cli_with_param_list(self.class, "setMaxParallelism",
|
342
|
+
[
|
343
|
+
options[:job_key], # Handle of the job
|
344
|
+
options[:parallelism] # max parallelism
|
345
|
+
])
|
346
|
+
db_key = get_cli_return_value(db_key_result)
|
347
|
+
rescue => exception
|
348
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
349
|
+
end
|
350
|
+
|
351
|
+
def set_property_value(options = {})
|
352
|
+
validate_cli_options_hash([:object_key, :property_name, :value_as_string], options)
|
353
|
+
job_id_result = execute_cli_with_param_list(self.class, "getTargets",
|
354
|
+
[
|
355
|
+
options[:object_key], # DBKey of the job
|
356
|
+
options[:property_name], # property name
|
357
|
+
options[:value_as_string] # property value
|
358
|
+
])
|
359
|
+
job_id = get_cli_return_value(job_id_result)
|
360
|
+
rescue => exception
|
361
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|