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,72 @@
|
|
1
|
+
# does not support add/remove permissions or ACL, makes no sense in BRPM
|
2
|
+
# does not support creating job groups
|
3
|
+
# does not support setting descriptions
|
4
|
+
class JobGroup < BsaSoapBase
|
5
|
+
def create_group_with_parent_name(options = {})
|
6
|
+
validate_cli_options_hash([:group_name, :parent_group_name], options)
|
7
|
+
integer_result = execute_cli_with_param_list(self.class, "createGroupWithParentName",
|
8
|
+
[
|
9
|
+
options[:group_name], # group name to be created
|
10
|
+
options[:parent_group_name] # parent group name
|
11
|
+
])
|
12
|
+
integer_value = get_cli_return_value(integer_result)
|
13
|
+
rescue => exception
|
14
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_job_group(options = {})
|
18
|
+
validate_cli_options_hash([:group_name, :parent_id], options)
|
19
|
+
integer_result = execute_cli_with_param_list(self.class, "createJobGroup",
|
20
|
+
[
|
21
|
+
options[:group_name], # group name to be created
|
22
|
+
options[:parent_id] # parent group id
|
23
|
+
])
|
24
|
+
integer_value = get_cli_return_value(integer_result)
|
25
|
+
rescue => exception
|
26
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
27
|
+
end
|
28
|
+
|
29
|
+
def find_all_groups_by_parent_group_name(options = {})
|
30
|
+
validate_cli_options_hash([:job_group], options)
|
31
|
+
string_result = execute_cli_with_param_list(self.class, "findAllGroupsByParentGroupName",
|
32
|
+
[
|
33
|
+
options[:job_group] # Fully qualified parent job group name (/ for root group)
|
34
|
+
])
|
35
|
+
string_value = get_cli_return_value(string_result)
|
36
|
+
rescue => exception
|
37
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
38
|
+
end
|
39
|
+
|
40
|
+
def group_exists(options = {})
|
41
|
+
validate_cli_options_hash([:group_name], options)
|
42
|
+
boolean_result = execute_cli_with_param_list(self.class, "groupExists",
|
43
|
+
[
|
44
|
+
options[:group_name] # Fully qualified job group name (/ for root group)
|
45
|
+
])
|
46
|
+
boolean_value = get_cli_return_value(boolean_result)
|
47
|
+
rescue => exception
|
48
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
49
|
+
end
|
50
|
+
|
51
|
+
def group_name_to_db_key(options = {})
|
52
|
+
validate_cli_options_hash([:group_name], options)
|
53
|
+
db_key_result = execute_cli_with_param_list(self.class, "groupNameToDBKey",
|
54
|
+
[
|
55
|
+
options[:group_name] # Fully qualified job group name (/ for root group)
|
56
|
+
])
|
57
|
+
db_key = get_cli_return_value(db_key_result)
|
58
|
+
rescue => exception
|
59
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
60
|
+
end
|
61
|
+
|
62
|
+
def group_name_to_id(options = {})
|
63
|
+
validate_cli_options_hash([:group_name], options)
|
64
|
+
integer_result = execute_cli_with_param_list(self.class, "groupNameToId",
|
65
|
+
[
|
66
|
+
options[:group_name] # Fully qualified job group name (/ for root group)
|
67
|
+
])
|
68
|
+
integer_value = get_cli_return_value(integer_result)
|
69
|
+
rescue => exception
|
70
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class JobManagement < BsaSoapBase
|
2
|
+
def get_job_manager_full_status(options = {})
|
3
|
+
string_result = execute_cli_with_param_list(self.class, "getJobManagerFullStatus")
|
4
|
+
string_value = get_cli_return_value(string_result)
|
5
|
+
rescue => exception
|
6
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
7
|
+
end
|
8
|
+
|
9
|
+
def get_job_manager_status(options = {})
|
10
|
+
string_result = execute_cli_with_param_list(self.class, "getJobManagerStatus")
|
11
|
+
string_value = get_cli_return_value(string_result)
|
12
|
+
rescue => exception
|
13
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_running_jobs_status(options = {})
|
17
|
+
string_result = execute_cli_with_param_list(self.class, "getRunningJobsStatus")
|
18
|
+
string_value = get_cli_return_value(string_result)
|
19
|
+
rescue => exception
|
20
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class JobResult < BsaSoapBase
|
2
|
+
def find_job_result_key(options = {})
|
3
|
+
validate_cli_options_hash([:job_run_key], options)
|
4
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "findJobResultKey",
|
5
|
+
[
|
6
|
+
options[:job_run_key] # Handle associated with a particular job run
|
7
|
+
])
|
8
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
9
|
+
rescue => exception
|
10
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,271 @@
|
|
1
|
+
class JobRun < BsaSoapBase
|
2
|
+
def change_priority_of_running_job_by_job_run_id(options = {})
|
3
|
+
validate_cli_options_hash([:job_run_id, :priority_string], options)
|
4
|
+
void_result = execute_cli_with_param_list(self.class, "changePriorityOfRunningJobByJobRunId",
|
5
|
+
[
|
6
|
+
options[:job_run_id], # Job run ID number
|
7
|
+
options[:priority_string] # Priority to change job run to
|
8
|
+
])
|
9
|
+
void_value = get_cli_return_value(void_result)
|
10
|
+
rescue => exception
|
11
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def find_all_run_keys_by_job_key(options = {})
|
15
|
+
validate_cli_options_hash([:job_key], options)
|
16
|
+
string_result = execute_cli_with_param_list(self.class, "findAllRunKeysByJobKey",
|
17
|
+
[
|
18
|
+
options[:job_key] # DBKey key for the job
|
19
|
+
])
|
20
|
+
string_value = get_cli_return_value(string_result)
|
21
|
+
rescue => exception
|
22
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
23
|
+
end
|
24
|
+
|
25
|
+
def find_last_run_key_by_job_key(options = {})
|
26
|
+
validate_cli_options_hash([:job_key], options)
|
27
|
+
db_key_result = execute_cli_with_param_list(self.class, "findLastRunKeyByJobKey",
|
28
|
+
[
|
29
|
+
options[:job_key], # DBKey for the job
|
30
|
+
# NIEK options[:exclude_deploy_attempts] || false # Exclude deploy attempt run id
|
31
|
+
])
|
32
|
+
db_key = get_cli_return_value(db_key_result)
|
33
|
+
rescue => exception
|
34
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def find_last_run_key_by_job_key_ignore_version(options = {})
|
38
|
+
validate_cli_options_hash([:job_key], options)
|
39
|
+
db_key_result = execute_cli_with_param_list(self.class, "findLastRunKeyByJobKeyIgnoreVersion",
|
40
|
+
[
|
41
|
+
options[:job_key] # DBKey for the job
|
42
|
+
])
|
43
|
+
db_key = get_cli_return_value(db_key_result)
|
44
|
+
rescue => exception
|
45
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
46
|
+
end
|
47
|
+
|
48
|
+
def find_run_count_by_job_key(options = {})
|
49
|
+
validate_cli_options_hash([:job_key], options)
|
50
|
+
integer_result = execute_cli_with_param_list(self.class, "findRunCountByJobKey",
|
51
|
+
[
|
52
|
+
options[:job_key] # DBKey for the job
|
53
|
+
])
|
54
|
+
integer_value = get_cli_return_value(integer_result)
|
55
|
+
rescue => exception
|
56
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
57
|
+
end
|
58
|
+
|
59
|
+
def find_run_key_by_id(options = {})
|
60
|
+
#findRunKeyById_1 is deprecated => No support for job_key option
|
61
|
+
validate_cli_options_hash([:job_run_id], options)
|
62
|
+
db_key_result = execute_cli_with_param_list(self.class, "findRunKeyById",
|
63
|
+
[
|
64
|
+
options[:job_run_id] # Run number of the job run
|
65
|
+
])
|
66
|
+
db_key = get_cli_return_value(db_key_result)
|
67
|
+
rescue => exception
|
68
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def get_aborted_job_runs_by_end_date(options = {})
|
72
|
+
validate_cli_options_hash([:end_type], options)
|
73
|
+
string_result = execute_cli_with_param_list(self.class, "getAbortedJobRunsByEndDate",
|
74
|
+
[
|
75
|
+
options[:end_time] # Time to use as the earliest end date, only runs aborted after this date will be shown
|
76
|
+
])
|
77
|
+
string_value = get_cli_return_value(string_result)
|
78
|
+
rescue => exception
|
79
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
80
|
+
end
|
81
|
+
|
82
|
+
def get_end_time_by_run_key(options = {})
|
83
|
+
validate_cli_options_hash([:job_run_key], options)
|
84
|
+
object_result = execute_cli_with_param_list(self.class, "getEndTimeByRunKey",
|
85
|
+
[
|
86
|
+
options[:job_run_key], # Handle identifying a particular job run
|
87
|
+
options[:format] || "yyyy/MM/dd HH:mm:ss" # Format for presenting time
|
88
|
+
])
|
89
|
+
object_value = get_cli_return_value(object_result)
|
90
|
+
rescue => exception
|
91
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
92
|
+
end
|
93
|
+
|
94
|
+
def get_executing_user_and_role_by_run_key(options = {})
|
95
|
+
validate_cli_options_hash([:job_run_key], options)
|
96
|
+
string_result = execute_cli_with_param_list(self.class, "getExecutingUserAndRoleByRunKey",
|
97
|
+
[
|
98
|
+
options[:job_run_key] # Handle identifying a particular job run
|
99
|
+
])
|
100
|
+
string_value = get_cli_return_value(string_result)
|
101
|
+
rescue => exception
|
102
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
103
|
+
end
|
104
|
+
|
105
|
+
def get_job_run_had_errors(options = {})
|
106
|
+
# getJobRunHadErrors_1 deprecated => No support
|
107
|
+
validate_cli_options_hash([:job_run_key], options)
|
108
|
+
boolean_result = execute_cli_with_param_list(self.class, "getJobRunHadErrors",
|
109
|
+
[
|
110
|
+
options[:job_run_key] # Handle identifying a particular job run
|
111
|
+
])
|
112
|
+
boolean_value = get_cli_return_value(boolean_result)
|
113
|
+
rescue => exception
|
114
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
115
|
+
end
|
116
|
+
|
117
|
+
def get_job_run_had_errors_by_id(options = {})
|
118
|
+
validate_cli_options_hash([:job_run_id], options)
|
119
|
+
boolean_result = execute_cli_with_param_list(self.class, "getJobRunHadErrorsById",
|
120
|
+
[
|
121
|
+
options[:job_run_id] # Run ID for the job run
|
122
|
+
])
|
123
|
+
boolean_value = get_cli_return_value(boolean_result)
|
124
|
+
rescue => exception
|
125
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
126
|
+
end
|
127
|
+
|
128
|
+
def get_job_run_is_running_by_run_key(options = {})
|
129
|
+
validate_cli_options_hash([:job_run_key], options)
|
130
|
+
boolean_result = execute_cli_with_param_list(self.class, "getJobRunIsRunningByRunKey",
|
131
|
+
[
|
132
|
+
options[:job_run_key] # Handle identifying a particular job run
|
133
|
+
])
|
134
|
+
boolean_value = get_cli_return_value(boolean_result)
|
135
|
+
rescue => exception
|
136
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
137
|
+
end
|
138
|
+
|
139
|
+
def get_job_run_status_by_schedule_id(options = {})
|
140
|
+
validate_cli_options_hash([:schedule_id], options)
|
141
|
+
string_result = execute_cli_with_param_list(self.class, "getJobRunStatusByScheduleId",
|
142
|
+
[
|
143
|
+
options[:schedule_id] # Handle identifying a particular job run
|
144
|
+
])
|
145
|
+
string_value = get_cli_return_value(string_result)
|
146
|
+
rescue => exception
|
147
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
148
|
+
end
|
149
|
+
|
150
|
+
def get_log_items_by_job_run_id(options = {})
|
151
|
+
validate_cli_options_hash([:job_key, :job_run_id], options)
|
152
|
+
string_result = execute_cli_with_param_list(self.class, "getLogItemsByJobRunId",
|
153
|
+
[
|
154
|
+
options[:job_key], # DB Key of the job
|
155
|
+
options[:job_run_id] # Job run ID number
|
156
|
+
])
|
157
|
+
string_value = get_cli_return_value(string_result)
|
158
|
+
rescue => exception
|
159
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
160
|
+
end
|
161
|
+
|
162
|
+
def get_servers_status_by_job_run(options = {})
|
163
|
+
validate_cli_options_hash([:job_run_id], options)
|
164
|
+
map_result = execute_cli_with_param_list(self.class, "getServerStatusByJobRun",
|
165
|
+
[
|
166
|
+
options[:job_run_id] # Job run ID number
|
167
|
+
])
|
168
|
+
map_value = get_cli_return_value(map_result)
|
169
|
+
rescue => exception
|
170
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
171
|
+
end
|
172
|
+
|
173
|
+
def get_start_time_by_run_key(options = {})
|
174
|
+
validate_cli_options_hash([:job_run_key], options)
|
175
|
+
object_result = execute_cli_with_param_list(self.class, "getStartTimeByRunKey",
|
176
|
+
[
|
177
|
+
options[:job_run_key], # Handle identifying a particular job run
|
178
|
+
options[:format] || "yyyy/MM/dd HH:mm:ss" # Format for presenting time
|
179
|
+
])
|
180
|
+
object_value = get_cli_return_value(object_result)
|
181
|
+
rescue => exception
|
182
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
183
|
+
end
|
184
|
+
|
185
|
+
def job_run_key_to_job_run_id(options = {})
|
186
|
+
validate_cli_options_hash([:job_run_key], options)
|
187
|
+
integer_result = execute_cli_with_param_list(self.class, "jobRunKeyToJobRunId",
|
188
|
+
[
|
189
|
+
options[:job_run_key] # Handle identifying a particular job run
|
190
|
+
])
|
191
|
+
integer_value = get_cli_return_value(integer_result)
|
192
|
+
rescue => exception
|
193
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
194
|
+
end
|
195
|
+
|
196
|
+
def pause_running_job_by_job_run_key(options = {})
|
197
|
+
validate_cli_options_hash([:job_run_key], options)
|
198
|
+
void_result = execute_cli_with_param_list(self.class, "pauseRunningJobByJobRunKey",
|
199
|
+
[
|
200
|
+
options[:job_run_key] # Handle identifying a particular job run
|
201
|
+
])
|
202
|
+
void_value = get_cli_return_value(void_result)
|
203
|
+
rescue => exception
|
204
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
205
|
+
end
|
206
|
+
|
207
|
+
def resume_paused_job_by_job_run_key(options = {})
|
208
|
+
validate_cli_options_hash([:job_run_key], options)
|
209
|
+
void_result = execute_cli_with_param_list(self.class, "resumePausedJobByJobRunKey",
|
210
|
+
[
|
211
|
+
options[:job_run_key] # Handle identifying a particular job run
|
212
|
+
])
|
213
|
+
void_value = get_cli_return_value(void_result)
|
214
|
+
rescue => exception
|
215
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
216
|
+
end
|
217
|
+
|
218
|
+
def show_all_running_batch_job_run_status(options = {})
|
219
|
+
void_result = execute_cli_with_param_list(self.class, "showAllRunningBatchJobRunStatus")
|
220
|
+
void_value = get_cli_return_value(void_result)
|
221
|
+
rescue => exception
|
222
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
223
|
+
end
|
224
|
+
|
225
|
+
def show_all_running_post_prov_batch_job_run_status(options = {})
|
226
|
+
list_result = execute_cli_with_param_list(self.class, "showAllRunningPostProvBatchJobRunStatus")
|
227
|
+
list_value = get_cli_return_value(list_result)
|
228
|
+
rescue => exception
|
229
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
230
|
+
end
|
231
|
+
|
232
|
+
def show_batch_job_run_status_by_run_id(options = {})
|
233
|
+
validate_cli_options_hash([:run_id], options)
|
234
|
+
void_result = execute_cli_with_param_list(self.class, "showBatchJobRunStatusByRunId",
|
235
|
+
[
|
236
|
+
options[:run_id] # Handle identifying a particular job run
|
237
|
+
])
|
238
|
+
void_value = get_cli_return_value(void_result)
|
239
|
+
rescue => exception
|
240
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
241
|
+
end
|
242
|
+
|
243
|
+
def show_batch_job_run_status_by_run_key(options = {})
|
244
|
+
validate_cli_options_hash([:job_run_key], options)
|
245
|
+
void_result = execute_cli_with_param_list(self.class, "showBatchJobRunStatusByRunId",
|
246
|
+
[
|
247
|
+
options[:job_run_key] # Handle identifying a particular job run
|
248
|
+
])
|
249
|
+
void_value = get_cli_return_value(void_result)
|
250
|
+
rescue => exception
|
251
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
252
|
+
end
|
253
|
+
|
254
|
+
def show_running_jobs(options = {})
|
255
|
+
void_result = execute_cli_with_param_list(self.class, "showRunningJobs")
|
256
|
+
void_value = get_cli_return_value(void_result)
|
257
|
+
rescue => exception
|
258
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
259
|
+
end
|
260
|
+
|
261
|
+
def get_deploy_job_max_run_id(options = {})
|
262
|
+
validate_cli_options_hash([:db_key_of_deploy_job], options)
|
263
|
+
void_result = execute_cli_with_param_list(self.class, "getDeployJobMaxRunId",
|
264
|
+
[
|
265
|
+
options[:db_key_of_deploy_job] # Handle identifying a particular job run
|
266
|
+
])
|
267
|
+
void_value = get_cli_return_value(void_result)
|
268
|
+
rescue => exception
|
269
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
270
|
+
end
|
271
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
class Login < BsaSoapBase
|
2
|
+
def initialize(integration_settings = BrpmAuto.integration_settings)
|
3
|
+
@url = integration_settings.dns
|
4
|
+
@username = integration_settings.username
|
5
|
+
@password = integration_settings.password
|
6
|
+
@role = integration_settings.details["role"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def login
|
10
|
+
login_with_role(@url, @username, @password, @role)
|
11
|
+
end
|
12
|
+
|
13
|
+
def login_with_credentials(url, username, password, auth_type = DEFAULT_AUTH_TYPE)
|
14
|
+
client = Savon.client("#{url}#{LOGIN_WSDL}") do |wsdl, http|
|
15
|
+
http.auth.ssl.verify_mode = :none
|
16
|
+
end
|
17
|
+
|
18
|
+
response = client.request(:login_using_user_credential) do |soap|
|
19
|
+
soap.endpoint = "#{url}#{LOGIN_SERVICE}"
|
20
|
+
soap.body = {:userName => username, :password => password, :authenticationType => auth_type}
|
21
|
+
end
|
22
|
+
|
23
|
+
session_id = response.body[:login_using_user_credential_response][:return_session_id]
|
24
|
+
rescue Savon::Error => error
|
25
|
+
raise "Error while attempting BSA login,ensure connectivity and BSA Integration properties: #{error.to_s}"
|
26
|
+
end
|
27
|
+
|
28
|
+
def assume_role(url, role, session_id, http_timeout = HTTP_READ_TIMEOUT)
|
29
|
+
client = Savon.client("#{url}#{ROLE_WSDL}") do |wsdl, http|
|
30
|
+
http.auth.ssl.verify_mode = :none
|
31
|
+
end
|
32
|
+
client.http.read_timeout = http_timeout
|
33
|
+
response = client.request(:assume_role) do |soap|
|
34
|
+
soap.endpoint = "#{url}#{ROLE_SERVICE}"
|
35
|
+
soap.header = {"ins0:sessionId" => session_id}
|
36
|
+
soap.body = { :roleName => role }
|
37
|
+
end
|
38
|
+
rescue Savon::Error => error
|
39
|
+
raise "Error while acquiring BSA role(#{role}), ensure connectivity and BSA Integration properties: #{error.to_s}"
|
40
|
+
end
|
41
|
+
|
42
|
+
def login_with_role(url, username, password, role)
|
43
|
+
session_id = login_with_credentials(url, username, password)
|
44
|
+
assume_role(url, role, session_id)
|
45
|
+
return session_id
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# very basic support right now
|
2
|
+
class NSHScriptJob < BsaSoapBase
|
3
|
+
def get_dbkey_by_group_and_name(options = {})
|
4
|
+
validate_cli_options_hash([:group_name, :job_name], options)
|
5
|
+
db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
|
6
|
+
[
|
7
|
+
options[:group_name], # Fully qualified path to the job group containing the job
|
8
|
+
options[:job_name] # Name of the job
|
9
|
+
])
|
10
|
+
db_key = get_cli_return_value(db_key_result)
|
11
|
+
rescue => exception
|
12
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
class PatchCatalog < BsaSoapBase
|
2
|
+
# internal function
|
3
|
+
def internal_delete_obsolete_patches(cmd, options = {})
|
4
|
+
validate_cli_options_hash([:catalog_name], options)
|
5
|
+
deleted_count_result = execute_cli_with_param_list(self.class, cmd,
|
6
|
+
[
|
7
|
+
options[:catalog_name] # Fully qualified catalog name
|
8
|
+
])
|
9
|
+
deleted_count = get_cli_return_value(deleted_count_result)
|
10
|
+
rescue => exception
|
11
|
+
raise "Problem executing #{self.class} command(#{cmd}): #{exception.to_s}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def internal_execute_update_and_wait(cmd, options = {})
|
15
|
+
validate_cli_options_hash([:group_name], options)
|
16
|
+
job_run_key_result = execute_cli_with_param_list(self.class, cmd,
|
17
|
+
[
|
18
|
+
options[:group_name] # Fully qualified catalog name
|
19
|
+
])
|
20
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
21
|
+
rescue => exception
|
22
|
+
raise "Problem executing #{self.class} command(#{cmd}): #{exception.to_s}"
|
23
|
+
end
|
24
|
+
|
25
|
+
def delete_obsolete_patches_from_aix_catalog( options = {})
|
26
|
+
deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromAixCatalog", options)
|
27
|
+
rescue => exception
|
28
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def delete_obsolete_patches_from_other_linux_catalog(options = {})
|
32
|
+
deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromOtherLinuxCatalog", options)
|
33
|
+
rescue => exception
|
34
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def delete_obsolete_patches_from_redhat_linux_catalog(options = {})
|
38
|
+
deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromRedhatLinuxCatalog", options)
|
39
|
+
rescue => exception
|
40
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
41
|
+
end
|
42
|
+
|
43
|
+
def delete_obsolete_patches_from_solaris_catalog(options = {})
|
44
|
+
deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromSolarisCatalog", options)
|
45
|
+
rescue => exception
|
46
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
47
|
+
end
|
48
|
+
|
49
|
+
def delete_obsolete_patches_from_windows_catalog(options = {})
|
50
|
+
deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromWindowsCatalog", options)
|
51
|
+
rescue => exception
|
52
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def execute_aix_catalog_update_and_wait(options = {})
|
56
|
+
job_run_key = self.internal_delete_obsolete_patches("executeAixCatalogUpdateAndWait", options)
|
57
|
+
rescue => exception
|
58
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
59
|
+
end
|
60
|
+
|
61
|
+
def execute_other_linux_catalog_update_and_wait(options = {})
|
62
|
+
job_run_key = self.internal_delete_obsolete_patches("executeOtherLinuxCatalogUpdateAndWait", options)
|
63
|
+
rescue => exception
|
64
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
65
|
+
end
|
66
|
+
|
67
|
+
def execute_redhat_catalog_update_and_wait(options = {})
|
68
|
+
job_run_key = self.internal_delete_obsolete_patches("executeRedhatCatalogUpdateAndWait", options)
|
69
|
+
rescue => exception
|
70
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
71
|
+
end
|
72
|
+
|
73
|
+
def execute_solaris_catalog_update_and_wait(options = {})
|
74
|
+
job_run_key = self.internal_delete_obsolete_patches("executeSolarisCatalogUpdateAndWait", options)
|
75
|
+
rescue => exception
|
76
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
77
|
+
end
|
78
|
+
|
79
|
+
def execute_windows_catalog_update_and_wait(options = {})
|
80
|
+
job_run_key = self.internal_delete_obsolete_patches("executeWindowsCatalogUpdateAndWait", options)
|
81
|
+
rescue => exception
|
82
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
83
|
+
end
|
84
|
+
|
85
|
+
def get_cuj_dbkey_by_fully_qualified_catalog_name(options = {})
|
86
|
+
validate_cli_options_hash([:type, :group_name], options)
|
87
|
+
validate_cli_option_hash_string_values(["WINDOWS", "REDHAT", "SOLARIS", "AIX", "OTHERLINUX"],options[:type])
|
88
|
+
db_key_result = execute_cli_with_param_list(self.class, "getCUJDBKeyByFullyQualifiedCatalogName",
|
89
|
+
[
|
90
|
+
options[:type], # Type of catalog: WINDOWS, REDHAT, SOLARIS, AIX, OTHERLINUX
|
91
|
+
option[:group_name] # Fully qualified name of patch catalog
|
92
|
+
])
|
93
|
+
db_key = get_cli_return_value(db_key_result)
|
94
|
+
rescue => exception
|
95
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
96
|
+
end
|
97
|
+
|
98
|
+
def get_dbkey_by_type_and_name_from_catalog(options = {})
|
99
|
+
validate_cli_options_hash([:depot_group_type, :depot_object_type, :group_name, :depot_object_name], options)
|
100
|
+
validate_cli_options_hash_string_values(
|
101
|
+
[
|
102
|
+
"RED_HAT_CATALOG_GROUP", # RedHat Catalog
|
103
|
+
"SOLARIS_CATALOG_GROUP", # Solaris Catalog
|
104
|
+
"WINDOWS_CATALOG_GROUP", # Windows Catalog
|
105
|
+
"OTHER_LINUX_CATALOG_GROUP" # Other Linux Catalog
|
106
|
+
], options[:depot_group_type])
|
107
|
+
validate_cli_options_hash_string_values(
|
108
|
+
[
|
109
|
+
"AIX_FILESET_INSTALLABLE", # AIX Fileset
|
110
|
+
"AIX_CONTAINER_INSTALLABLE", # AIX Patch Container
|
111
|
+
"RPM_INSTALLABLE", # Linux RPM
|
112
|
+
"ERRATA_INSTALLABLE", # Linux Errata
|
113
|
+
"SOLARIS_PATCH_INSTALLABLE", # Solaris Path
|
114
|
+
"SOLARIS_PATCH_TCLUSTER_INSTALLABLE", # Solaris Cluster
|
115
|
+
"HOTFIX_WINDOWS_INSTALLABLE", # Windows HotFix
|
116
|
+
"WINDOWS_BULLETIN_INSTALLABLE" # Windows Bulletin
|
117
|
+
], options[:dept_object_type])
|
118
|
+
db_key = execute_cli_with_param_list(self.class, "getDBKeyByTypeAndNameFromCatalog",
|
119
|
+
[
|
120
|
+
options[:depot_group_type], # String representation of catalog type
|
121
|
+
options[:depot_object_type], # String representation of depot object type
|
122
|
+
options[:group_name], # Fully qualified path to parent depot group
|
123
|
+
options[:depot_object_name] # Name of depot object
|
124
|
+
])
|
125
|
+
db_key = get_cli_return_value(db_key_result)
|
126
|
+
rescue => exception
|
127
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
128
|
+
end
|
129
|
+
|
130
|
+
def list_all_by_catalog_name_and_type(options = {})
|
131
|
+
validate_cli_options_hash([:qualified_group_name, :catalog_type_string], options)
|
132
|
+
validate_cli_options_hash_string_values(
|
133
|
+
[
|
134
|
+
"WINDOWS_CATALOG_GROUP", # Windows Catalog
|
135
|
+
"SOLARIS_CATALOG_GROUP", # Solaris Catalog
|
136
|
+
"RED_HAT_CATALOG_GROUP", # Redhat Catalog
|
137
|
+
"OTHER_LINUX_CATALOG_GROUP", # Other Linux Catalog
|
138
|
+
"AIX_CATALOG_GROUP" # AIX Catalog
|
139
|
+
], options[:catalog_type_string])
|
140
|
+
string_result = execute_cli_with_param_list(self.class, "listAllByCatalogNameAndType",
|
141
|
+
[
|
142
|
+
options[:qualified_group_name], # Name of depot group whose objects you want to list
|
143
|
+
options[:catalog_type_string] # String representation of depot object type
|
144
|
+
])
|
145
|
+
str_value = get_cli_return_value(dstring_result)
|
146
|
+
rescue => exception
|
147
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
148
|
+
end
|
149
|
+
|
150
|
+
def recursively_set_property_for_catalog(options ={})
|
151
|
+
validate_cli_options_hash([:group_path, :property_name, :value, :catalog_type_string], options)
|
152
|
+
validate_cli_options_hash_string_values(
|
153
|
+
[
|
154
|
+
"RPM_INSTALLABLE", # Linux RPM
|
155
|
+
"SOLARIS_PATCH_INSTALLABLE", # Solaris Patch
|
156
|
+
"HOTFIX_WINDOWS_INSTALLABLE", # Windows HotFix
|
157
|
+
"WINDOWS_BULLETIN_INSTALLABLE", # Windows Bulletin
|
158
|
+
"ERRATA_INSTALLABLE", # Redhat Errata
|
159
|
+
"SOLARIS_PATCH_TCLUSTER_INSTALLABLE", # Solaris Patch Cluster
|
160
|
+
"AIX_FILESET_INSTALLABLE", # AIX Fileset
|
161
|
+
"AIX_CONTAINER_INSTALLABLE" # AIX Container
|
162
|
+
], options[:catalog_type_string])
|
163
|
+
void_result = execute_cli_with_param_list(self.class, "recursivelySetPropertyForCatalog",
|
164
|
+
[
|
165
|
+
options[:group_path], # The path to the folder
|
166
|
+
options[:property_name], # The name of the property to set
|
167
|
+
options[:value], # The value to set
|
168
|
+
options[:catalog_type_string] # String representation of depot object type
|
169
|
+
])
|
170
|
+
void_value = get_cli_return_value(void_result)
|
171
|
+
rescue => exception
|
172
|
+
raise "#{self.class} Execution Exception: #{exception.to_s}"
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|