brpm_module_bladelogic 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/.gitignore +37 -0
- data/.ruby-version +1 -0
- data/.travis.yml +17 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +7 -0
- data/Rakefile +24 -0
- data/automations/create_package.rb +29 -0
- data/automations/create_package.txt +26 -0
- data/automations/deploy_package.rb +137 -0
- data/automations/deploy_package.txt +53 -0
- data/bin/create_bl_package +22 -0
- data/brpm_module_bladelogic.gemspec +39 -0
- data/config.yml +13 -0
- data/lib/bl_rest/bsa_rest_client.rb +65 -0
- data/lib/bl_soap/blpackage.rb +43 -0
- data/lib/bl_soap/bsa_soap_base.rb +118 -0
- data/lib/bl_soap/bsa_soap_client.rb +34 -0
- data/lib/bl_soap/compliance_job.rb +155 -0
- data/lib/bl_soap/deploy_job.rb +48 -0
- data/lib/bl_soap/depot_group.rb +47 -0
- data/lib/bl_soap/job.rb +376 -0
- data/lib/bl_soap/job_group.rb +72 -0
- data/lib/bl_soap/job_management.rb +22 -0
- data/lib/bl_soap/job_result.rb +12 -0
- data/lib/bl_soap/job_run.rb +271 -0
- data/lib/bl_soap/login.rb +47 -0
- data/lib/bl_soap/nsh_script_job.rb +14 -0
- data/lib/bl_soap/patch_catalog.rb +178 -0
- data/lib/bl_soap/patch_remediation_job.rb +137 -0
- data/lib/bl_soap/patching_job.rb +250 -0
- data/lib/bl_soap/server.rb +12 -0
- data/lib/bl_soap/template.rb +13 -0
- data/lib/bl_soap/utility.rb +99 -0
- data/resource_automations/select_job.rb +33 -0
- data/resource_automations/select_job.txt +15 -0
- data/tests/create_package_spec.rb +28 -0
- data/tests/deploy_package_spec.rb +23 -0
- data/tests/spec_helper.rb +90 -0
- metadata +128 -0
@@ -0,0 +1,137 @@
|
|
1
|
+
class PatchRemediationJob < BsaSoapBase
|
2
|
+
def create_remediation_job(options)
|
3
|
+
validate_cli_options_hash(
|
4
|
+
[:remediation_name, :job_group_name, :pa_job_run_key, :pck_prefix, :depot_group_name, :dep_job_group_name],
|
5
|
+
options)
|
6
|
+
|
7
|
+
puts "Content from bsa_patch_utils "
|
8
|
+
options.each_pair {|key,value| puts "#{key} = #{value}" }
|
9
|
+
|
10
|
+
db_key_result = execute_cli_with_param_list(self.class, "createRemediationJob",
|
11
|
+
[
|
12
|
+
options[:remediation_name], # Name of the job
|
13
|
+
options[:job_group_name], # Name of the group that should contain the new remediation job(s)
|
14
|
+
options[:pa_job_run_key], # Handle to the job run whose result you want to use for remediation
|
15
|
+
options[:pck_prefix], # Prefix for naming the new Batch Job/Deploy Job/Package(s)
|
16
|
+
options[:depot_group_name], # Name of a group that should contain the new Package(s)
|
17
|
+
options[:dep_job_group_name] # Name of a group that should contain the generated Deploy Job(s)
|
18
|
+
])
|
19
|
+
|
20
|
+
db_key = get_cli_return_value(db_key_result)
|
21
|
+
|
22
|
+
rescue => exception
|
23
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_remediation_job_for_a_target(options)
|
27
|
+
validate_cli_options_hash(
|
28
|
+
[:remediation_name, :job_group_name, :pa_job_run_key, :server_name, :pck_prefix, :depot_group_name, :dep_job_group_name],
|
29
|
+
options)
|
30
|
+
db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobForATarget",
|
31
|
+
[
|
32
|
+
options[:remediation_name], # Name of the job
|
33
|
+
options[:job_group_name], # Name of the group that should contain the new remediation job(s)
|
34
|
+
options[:pa_job_run_key], # Handle to the job run whose result you want to use for remedation
|
35
|
+
options[:server_name], # Server where you want to run this job, should be one of the server where analysis was run
|
36
|
+
options[:pck_prefix], # Prefix for naming the new Batch Job/Deploy Job/Package(s)
|
37
|
+
options[:depot_group_name], # Name of a group that should contain the new Package(s)
|
38
|
+
options[:dep_job_group_name] # Name of a group that should contain the generated Deploy Job(s)
|
39
|
+
])
|
40
|
+
db_key = get_cli_return_value(db_key_result)
|
41
|
+
rescue => exception
|
42
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
43
|
+
end
|
44
|
+
|
45
|
+
def create_remediation_job_with_deploy_opts(options)
|
46
|
+
validate_cli_options_hash(
|
47
|
+
[:remediation_name, :job_group_name, :pa_job_run_key, :pck_prefix, :depot_group_name, :dep_job_group_name, :deploy_job_key],
|
48
|
+
options)
|
49
|
+
db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobWithDeployOpts",
|
50
|
+
[
|
51
|
+
options[:remediation_name], # Name of the job
|
52
|
+
options[:job_group_name], # Name of the group that should contain the new remediation job(s)
|
53
|
+
options[:pa_job_run_key], # Hand to the patching job run whose results you want to use for remediation
|
54
|
+
options[:pck_prefix], # Prefix for naming the new Batch Job/Deploy Job/Package(s)
|
55
|
+
options[:depot_group_name], # Name of a group that should contain the new Package(s)
|
56
|
+
options[:dep_job_group_name], # Name of a group that should contain the new generated Deploy Job(s)
|
57
|
+
options[:deploy_job_key] # Handle to the Deploy Job run whose options you want to use generated Deploy Job(s)
|
58
|
+
])
|
59
|
+
db_key = get_cli_return_value(db_key_result)
|
60
|
+
rescue => exception
|
61
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
62
|
+
end
|
63
|
+
|
64
|
+
def create_remediation_job_with_deploy_opts_for_a_target(options)
|
65
|
+
validate_cli_options_hash(
|
66
|
+
[:remediation_name, :job_group_name, :pa_job_run_key, :server_name, :pck_prefix, :depot_group_name, :dep_job_group_name, :deploy_job_key],
|
67
|
+
options)
|
68
|
+
db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobWithDeployOpts",
|
69
|
+
[
|
70
|
+
options[:remediation_name], # Name of the job
|
71
|
+
options[:job_group_name], # Name of the group that should contain the new remediation job(s)
|
72
|
+
options[:pa_job_run_key], # Hand to the patching job run whose results you want to use for remediation
|
73
|
+
options[:server_name], # Server where you want to run this job. Server should be a server which had an anaylsis run
|
74
|
+
options[:pck_prefix], # Prefix for naming the new Batch Job/Deploy Job/Package(s)
|
75
|
+
options[:depot_group_name], # Name of a group that should contain the new Package(s)
|
76
|
+
options[:dep_job_group_name], # Name of a group that should contain the new generated Deploy Job(s)
|
77
|
+
options[:deploy_job_key] # Handle to the Deploy Job run whose options you want to use generated Deploy Job(s)
|
78
|
+
])
|
79
|
+
db_key = get_cli_return_value(db_key_result)
|
80
|
+
rescue => exception
|
81
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
82
|
+
end
|
83
|
+
|
84
|
+
def modify_job_set_(options)
|
85
|
+
validate_cli_options_hash(
|
86
|
+
[:remediation_name, :job_group_name, :pa_job_run_key, :server_name, :pck_prefix, :depot_group_name, :dep_job_group_name, :deploy_job_key],
|
87
|
+
options)
|
88
|
+
db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobWithDeployOpts",
|
89
|
+
[
|
90
|
+
options[:remediation_name], # Name of the job
|
91
|
+
options[:job_group_name], # Name of the group that should contain the new remediation job(s)
|
92
|
+
options[:pa_job_run_key], # Hand to the patching job run whose results you want to use for remediation
|
93
|
+
options[:server_name], # Server where you want to run this job. Server should be a server which had an anaylsis run
|
94
|
+
options[:pck_prefix], # Prefix for naming the new Batch Job/Deploy Job/Package(s)
|
95
|
+
options[:depot_group_name], # Name of a group that should contain the new Package(s)
|
96
|
+
options[:dep_job_group_name], # Name of a group that should contain the new generated Deploy Job(s)
|
97
|
+
options[:deploy_job_key] # Handle to the Deploy Job run whose options you want to use generated Deploy Job(s)
|
98
|
+
])
|
99
|
+
db_key = get_cli_return_value(db_key_result)
|
100
|
+
rescue => exception
|
101
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
102
|
+
end
|
103
|
+
|
104
|
+
def execute_job_and_wait(options)
|
105
|
+
validate_cli_options_hash([:job_key], options)
|
106
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeJobAndWait",
|
107
|
+
[
|
108
|
+
options[:job_key] # Handle to the remediation job to be executed
|
109
|
+
])
|
110
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
111
|
+
rescue => exception
|
112
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
113
|
+
end
|
114
|
+
|
115
|
+
def execute_job_get_job_result_key(options)
|
116
|
+
validate_cli_options_hash([:job_key], options)
|
117
|
+
db_key_result = execute_cli_with_param_list(self.class, "executeJobGetJobResultKey",
|
118
|
+
[
|
119
|
+
options[:job_key] # Handle to the remediation job to be executed
|
120
|
+
])
|
121
|
+
db_key = get_cli_return_value(db_key_result)
|
122
|
+
rescue => exception
|
123
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
124
|
+
end
|
125
|
+
|
126
|
+
def get_dbkey_by_group_and_name(options)
|
127
|
+
validate_cli_options_hash([:group_name, :job_name], options)
|
128
|
+
db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
|
129
|
+
[
|
130
|
+
options[:group_name], # Fully qualified path to the job group containing the job
|
131
|
+
options[:job_name] # Name of the job
|
132
|
+
])
|
133
|
+
db_key = get_cli_return_value(db_key_result)
|
134
|
+
rescue => exception
|
135
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,250 @@
|
|
1
|
+
class PatchingJob < BsaSoapBase
|
2
|
+
def internal_aix_execute(cmd, options = {})
|
3
|
+
validate_cli_options_hash([:job_name, :group_name, :target, :catalog_name, :include_file, :exclude_file],options)
|
4
|
+
b_key_result = execute_cli_with_param_list(self.class, cmd,
|
5
|
+
[
|
6
|
+
options[:job_name], # Name of job
|
7
|
+
options[:group_name], # Parent group of the job
|
8
|
+
options[:target], # Name of target (server, group, or smart group)
|
9
|
+
options[:catalog_name], # Catalog name
|
10
|
+
options[:include_file], # Include file path
|
11
|
+
options[:exclude_file], # Exclude file path
|
12
|
+
options[:analysis_option] || 1, # Analysis options:
|
13
|
+
# 1 - Use global settings (DEFAULT)
|
14
|
+
# 2 - Stop analysis if any applied fileset found
|
15
|
+
# 3 - Continue analysis even if applied fileset found
|
16
|
+
options[:analysis_mode] || 2 # Analysis mode:
|
17
|
+
# 1 - Report on all missing filesets, the ones that are
|
18
|
+
# not install on the target
|
19
|
+
# 2 - report only updates for the installed fileset on
|
20
|
+
# the target
|
21
|
+
])
|
22
|
+
db_key = get_cli_return_value(db_key_result)
|
23
|
+
rescue => exception
|
24
|
+
raise "#{self.class} #{cmd} Exception: #{exception.to_s}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def internal_linux_execute(cmd, options = {})
|
28
|
+
validate_cli_options_hash([:job_name, :group_name, :target, :catalog_name, :include_file, :exclude_file],options)
|
29
|
+
db_key_result = execute_cli_with_param_list(self.class, cmd,
|
30
|
+
[
|
31
|
+
options[:job_name], # Name of job
|
32
|
+
options[:group_name], # Parent group of the job
|
33
|
+
options[:target], # Name of target (server, group, or smart group)
|
34
|
+
options[:catalog_name], # Catalog name
|
35
|
+
options[:include_file], # Include file path
|
36
|
+
options[:exclude_file], # Exclude file path
|
37
|
+
options[:set_install_mode] || true, # Install mode: true to set install mode, false otherwise
|
38
|
+
options[:set_exact_arch] || false # Architecture: true to use exact architecture match, false otherwise
|
39
|
+
])
|
40
|
+
db_key = get_cli_return_value(db_key_result)
|
41
|
+
rescue => exception
|
42
|
+
raise "#{self.class} #{cmd} Exception: #{exception.to_s}"
|
43
|
+
end
|
44
|
+
|
45
|
+
def internal_redhat_execute(cmd, options = {})
|
46
|
+
validate_cli_options_hash([:job_name, :group_name, :target],options)
|
47
|
+
db_key_result = execute_cli_with_param_list(self.class, cmd,
|
48
|
+
[
|
49
|
+
options[:job_name], # Name of job
|
50
|
+
options[:group_name], # Parent group of the job
|
51
|
+
options[:target], # Name of target (server, group, or smart group)
|
52
|
+
options[:catalog_name] || "", # Catalog name
|
53
|
+
options[:include_file] || "", # Include file path
|
54
|
+
options[:exclude_file] || "", # Exclude file path
|
55
|
+
options[:set_install_mode] || true # Install mode: true to set install mode, false otherwise
|
56
|
+
])
|
57
|
+
db_key = get_cli_return_value(db_key_result)
|
58
|
+
rescue => exception
|
59
|
+
raise "#{self.class} #{cmd} Exception: #{exception.to_s}"
|
60
|
+
end
|
61
|
+
|
62
|
+
def internal_solaris_execute(cmd, options = {})
|
63
|
+
validate_cli_options_hash([:job_name, :group_name, :target, :catalog_name, :include_file, :exclude_file],options)
|
64
|
+
db_key_result = execute_cli_with_param_list(self.class, cmd,
|
65
|
+
[
|
66
|
+
options[:job_name], # Name of job
|
67
|
+
options[:group_name], # Parent group of the job
|
68
|
+
options[:target], # Name of target (server, group, or smart group)
|
69
|
+
options[:catalog_name], # Catalog name
|
70
|
+
options[:include_file], # Include file path
|
71
|
+
options[:exclude_file], # Exclude file path
|
72
|
+
options[:recommended_only] || true, # Analyze recommended patches only, false otherwise
|
73
|
+
options[:security_only] || false, # Analyze security patches only, false otherwise
|
74
|
+
options[:without_dependencies] || false # Analyze without dependencies, false otherwise
|
75
|
+
])
|
76
|
+
db_key = get_cli_return_value(db_key_result)
|
77
|
+
rescue => exception
|
78
|
+
raise "#{self.class} #{cmd} Exception: #{exception.to_s}"
|
79
|
+
end
|
80
|
+
|
81
|
+
def internal_windows_execute(cmd, options = {})
|
82
|
+
validate_cli_options_hash([:job_name, :group_name, :target, :catalog_name, :include_file, :exclude_file],options)
|
83
|
+
db_key_result = execute_cli_with_param_list(self.class, cmd,
|
84
|
+
[
|
85
|
+
options[:job_name], # Name of job
|
86
|
+
options[:group_name], # Parent group of the job
|
87
|
+
options[:target], # Name of target (server, group, or smart group)
|
88
|
+
options[:catalog_name], # Catalog name
|
89
|
+
options[:include_file], # Include file path
|
90
|
+
options[:exclude_file], # Exclude file path
|
91
|
+
options[:analyze_security_tools] || true, # Analyze security tools, false otherwise
|
92
|
+
options[:analyze_security_patches] || false, # Analyze security patches, false otherwise
|
93
|
+
options[:analyze_non_security_patches] || false, # Analyze non-security patches, false otherwise
|
94
|
+
options[:filter_service_packs] || false # Filter services packs, false otherwise
|
95
|
+
])
|
96
|
+
db_key = get_cli_return_value(db_key_result)
|
97
|
+
rescue => exception
|
98
|
+
raise "#{self.class} #{cmd} Exception: #{exception.to_s}"
|
99
|
+
end
|
100
|
+
|
101
|
+
def create_aix_patching_job_with_target_group(options = {})
|
102
|
+
db_key = self.internal_aix_execute("createAixPatchingJobWithTargetGroup", options)
|
103
|
+
rescue => exception
|
104
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
105
|
+
end
|
106
|
+
|
107
|
+
def create_aix_patching_job_with_target_server(options = {})
|
108
|
+
db_key = self.internal_aix_execute("createAixPatchingJobWithTargetServer", options)
|
109
|
+
rescue => exception
|
110
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
111
|
+
end
|
112
|
+
|
113
|
+
def create_download_job_for_missing_patches(options = {})
|
114
|
+
validate_cli_options_hash([:pa_job_run_key, :job_name, :dep_job_group_name],options)
|
115
|
+
db_key_result = execute_cli_with_param_list(self.class, "createDownloadJobForMissingPatches",
|
116
|
+
[
|
117
|
+
options[:pa_job_run_key], # Handle to the patching job run
|
118
|
+
options[:job_name], # Name of the download job
|
119
|
+
options[:dep_job_group_name] # Name of a group that should contain the download job
|
120
|
+
])
|
121
|
+
db_key = get_cli_return_value(db_key_result)
|
122
|
+
rescue => exception
|
123
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
124
|
+
end
|
125
|
+
|
126
|
+
def create_other_linux_patching_job_with_target_group(options = {})
|
127
|
+
db_key = self.internal_linux_execute("createOtherLinuxPatchingJobWithTargetGroup", options)
|
128
|
+
rescue => exception
|
129
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
130
|
+
end
|
131
|
+
|
132
|
+
def create_other_linux_patching_job_with_target_server(options = {})
|
133
|
+
db_key = self.internal_linux_execute("createOtherLinuxPatchingJobWithTargetServer", options)
|
134
|
+
rescue => exception
|
135
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
136
|
+
end
|
137
|
+
|
138
|
+
def create_redhat_patching_job_with_target_group(options = {})
|
139
|
+
db_key = self.internal_redhat_execute("createRedhatPatchingJobWithTargetGroup", options)
|
140
|
+
rescue => exception
|
141
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
142
|
+
end
|
143
|
+
|
144
|
+
def create_redhat_patching_job_with_target_server(options = {})
|
145
|
+
db_key = self.internal_redhat_execute("createRedhatPatchingJobWithTargetServer", options)
|
146
|
+
rescue => exception
|
147
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
148
|
+
end
|
149
|
+
|
150
|
+
def create_solaris_patching_job_with_target_group(options = {})
|
151
|
+
db_key = self.internal_solaris_execute("createSolarisPatchingJobWithTargetGroup", options)
|
152
|
+
rescue => exception
|
153
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
154
|
+
end
|
155
|
+
|
156
|
+
def create_solaris_patching_job_with_target_server(options = {})
|
157
|
+
db_key = self.internal_solaris_execute("createSolarisPatchingJobWithTargetServer", options)
|
158
|
+
rescue => exception
|
159
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
160
|
+
end
|
161
|
+
|
162
|
+
def create_windows_patching_job_with_target_group(options = {})
|
163
|
+
db_key = self.internal_windows_execute("createWindowsPatchingJobWithTargetGroup", options)
|
164
|
+
rescue => exception
|
165
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
166
|
+
end
|
167
|
+
|
168
|
+
def create_windows_patching_job_with_target_server(options = {})
|
169
|
+
db_key = self.internal_windows_execute("createWindowsPatchingJobWithTargetServer", options)
|
170
|
+
rescue => exception
|
171
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
172
|
+
end
|
173
|
+
|
174
|
+
def delete_job_by_group_and_name(options = {})
|
175
|
+
validate_cli_options_hash([:parent_group, :job_name],options)
|
176
|
+
void_result = execute_cli_with_param_list(self.class, "deleteJobByGroupAndName",
|
177
|
+
[
|
178
|
+
options[:parent_group], # Fully qualifed path to the job group containing the patching job
|
179
|
+
options[:job_name] # Name of the patching job
|
180
|
+
])
|
181
|
+
void_value = get_cli_return_value(void_result)
|
182
|
+
rescue => exception
|
183
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
184
|
+
end
|
185
|
+
|
186
|
+
def execute_job_and_wait(options = {})
|
187
|
+
validate_cli_options_hash([:job_key],options)
|
188
|
+
job_run_key_result = execute_cli_with_param_list(self.class, "executeJobAndWait",
|
189
|
+
[
|
190
|
+
options[:job_key] # Handle to the patching job to execute
|
191
|
+
])
|
192
|
+
job_run_key = get_cli_return_value(job_run_key_result)
|
193
|
+
rescue => exception
|
194
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
195
|
+
end
|
196
|
+
|
197
|
+
def get_dbkey_by_group_and_name(options = {})
|
198
|
+
validate_cli_options_hash([:group_name, :job_name],options)
|
199
|
+
db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
|
200
|
+
[
|
201
|
+
options[:group_name], # Fully qualified path the the job group containing the job
|
202
|
+
options[:job_name] # Name of the job
|
203
|
+
])
|
204
|
+
db_key = get_cli_return_value(db_key_result)
|
205
|
+
rescue => exception
|
206
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
207
|
+
end
|
208
|
+
|
209
|
+
def set_description(options = {})
|
210
|
+
validate_cli_options_hash([:job_key, :desc],options)
|
211
|
+
db_key_result = execute_cli_with_param_list(self.class, "setDescription",
|
212
|
+
[
|
213
|
+
options[:job_key], # the handle to the patching job
|
214
|
+
options[:job_name] # the description for the job
|
215
|
+
])
|
216
|
+
db_key = get_cli_return_value(db_key_result)
|
217
|
+
rescue => exception
|
218
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
219
|
+
end
|
220
|
+
|
221
|
+
def set_remediation_options(options = {})
|
222
|
+
validate_cli_options_hash([:patching_job_key, :pck_prefix, :depot_group_name, :depot_job_group_name],options)
|
223
|
+
db_key_result = execute_cli_with_param_list(self.class, "setRemediationOptions",
|
224
|
+
[
|
225
|
+
options[:patching_job_key], # handle to the patching job
|
226
|
+
options[:pck_prefix], # prefix for naming the new batch job/deploy job/package(s)
|
227
|
+
options[:depot_group_name], # name of group that should contain the new package(s)
|
228
|
+
options[:depot_job_group_name] # name of group that should contain the generated deploy job(s)
|
229
|
+
])
|
230
|
+
db_key = get_cli_return_value(db_key_result)
|
231
|
+
rescue => exception
|
232
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
233
|
+
end
|
234
|
+
|
235
|
+
def set_remediation_with_deploy_options(options = {})
|
236
|
+
validate_cli_options_hash([:patching_job_key, :pck_prefix, :depot_group_name, :depot_job_group_name, :deploy_job_key],options)
|
237
|
+
db_key_result = execute_cli_with_param_list(self.class, "setRemediationWithDeployOptions",
|
238
|
+
[
|
239
|
+
options[:patching_job_key], # handle to the patching job
|
240
|
+
options[:pck_prefix], # prefix for naming the new batch job/deploy job/package(s)
|
241
|
+
options[:depot_group_name], # name of group that should contain the new package(s)
|
242
|
+
options[:depot_job_group_name], # name of group that should contain the generated deploy job(s)
|
243
|
+
options[:deploy_job_key] # handle to the deploy job run whose options you want to use with
|
244
|
+
# generated deploy job(s)
|
245
|
+
])
|
246
|
+
db_key = get_cli_return_value(db_key_result)
|
247
|
+
rescue => exception
|
248
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
249
|
+
end
|
250
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class Server < BsaSoapBase
|
2
|
+
def get_server_id_by_name(ession_id, options = {})
|
3
|
+
validate_cli_options_hash([:server_name], options)
|
4
|
+
integer_result = execute_cli_with_param_list(self.class, "getServerIdByName",
|
5
|
+
[
|
6
|
+
options[:server_name],
|
7
|
+
])
|
8
|
+
integer_value = get_cli_return_value(integer_result)
|
9
|
+
rescue => exception
|
10
|
+
raise "Exception executing #{self.class} function: #{exception.to_s}"
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Template < BsaSoapBase
|
2
|
+
def get_db_key_by_group_and_name(options = {})
|
3
|
+
validate_cli_options_hash([:group_name, :parent_id], options)
|
4
|
+
integer_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
|
5
|
+
[
|
6
|
+
options[:parent_group],
|
7
|
+
options[:template_name]
|
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
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
class Utility < BsaSoapBase
|
2
|
+
def export_deploy_script_run(options = {})
|
3
|
+
validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_file_name], options)
|
4
|
+
void_result = execute_cli_with_attachments(self.class, "exportDeployRun",
|
5
|
+
[
|
6
|
+
options[:job_group_name], # fully qualified job group where compliance job is stored
|
7
|
+
options[:job_name], # name of compliance job
|
8
|
+
options[:run_id], # job run id of compliance job
|
9
|
+
options[:export_file_name],
|
10
|
+
], nil)
|
11
|
+
return void_result[:attachment]
|
12
|
+
#void_value = BsaSoap.get_cli_return_value(void_result)
|
13
|
+
#return options[:export_file_name]
|
14
|
+
rescue => exception
|
15
|
+
raise "Error exporting deploy run results: #{exception.to_s}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def export_deploy_run_status_by_group(options = {})
|
19
|
+
validate_cli_options_hash([:job_group_name, :export_file_name], options)
|
20
|
+
void_result = execute_cli_with_attachments(self.class, "exportDeployRunStatusByGroup",
|
21
|
+
[
|
22
|
+
options[:job_group_name], # job run id of compliance job
|
23
|
+
options[:export_file_name],
|
24
|
+
], nil)
|
25
|
+
return void_result[:attachment]
|
26
|
+
#void_value = BsaSoap.get_cli_return_value(void_result)
|
27
|
+
#return options[:export_file_name]
|
28
|
+
rescue => exception
|
29
|
+
raise "Error exporting deploy run status results: #{exception.to_s}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def export_nsh_script_run(options = {})
|
33
|
+
validate_cli_options_hash([:run_id, :export_file_name], options)
|
34
|
+
void_result = execute_cli_with_attachments(self.class, "exportNSHScriptRun",
|
35
|
+
[
|
36
|
+
options[:run_id], # job run id of compliance job
|
37
|
+
options[:export_file_name],
|
38
|
+
], nil)
|
39
|
+
return void_result[:attachment]
|
40
|
+
#void_value = BsaSoap.get_cli_return_value(void_result)
|
41
|
+
#return options[:export_file_name]
|
42
|
+
rescue => exception
|
43
|
+
raise "Error exporting NSH script run results: #{exception.to_s}"
|
44
|
+
end
|
45
|
+
|
46
|
+
def export_compliance_run(options = {})
|
47
|
+
validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_type, :export_file_name], options)
|
48
|
+
void_result = execute_cli_with_attachments(self.class, "exportComplianceRun",
|
49
|
+
[
|
50
|
+
options[:template_group_name] || "", # fully qualified template group
|
51
|
+
options[:template_name] || "", # name of component template
|
52
|
+
options[:rule_name] || "", # fully qualified path of the rule of the compliance job or null for all results
|
53
|
+
options[:job_group_name], # fully qualified job group where compliance job is stored
|
54
|
+
options[:job_name], # name of compliance job
|
55
|
+
options[:run_id], # job run id of compliance job
|
56
|
+
options[:export_file_name],
|
57
|
+
options[:export_type]
|
58
|
+
], nil)
|
59
|
+
return void_result[:attachment]
|
60
|
+
#void_value = BsaSoap.get_cli_return_value(void_result)
|
61
|
+
#return options[:export_file_name]
|
62
|
+
rescue => exception
|
63
|
+
raise "Error exporting compliance results: #{exception.to_s}"
|
64
|
+
end
|
65
|
+
|
66
|
+
def export_patch_analysis_run(options = {})
|
67
|
+
validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_type, :export_file_name], options)
|
68
|
+
void_result = execute_cli_with_attachments(self.class, "exportPatchAnalysisRun",
|
69
|
+
[
|
70
|
+
options[:Server_name] || "", # fully qualified template group
|
71
|
+
options[:job_group_name], # fully qualified job group where compliance job is stored
|
72
|
+
options[:job_name], # name of compliance job
|
73
|
+
options[:run_id], # job run id of compliance job
|
74
|
+
options[:export_file_name],
|
75
|
+
options[:export_type]
|
76
|
+
], nil)
|
77
|
+
return void_result[:attachment]
|
78
|
+
#void_value = BsaSoap.get_cli_return_value(void_result)
|
79
|
+
#return options[:export_file_name]
|
80
|
+
rescue => exception
|
81
|
+
raise "Error exporting patch analysis run results: #{exception.to_s}"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# class LogItem
|
86
|
+
# def get_log_items_by_job_run(options = {})
|
87
|
+
# BsaSoap.validate_cli_options_hash([:job_key, :run_id], options)
|
88
|
+
# void_result = BsaSoap.execute_cli_with_attachments(self.class, "getLogItemsByJobRun",
|
89
|
+
# [
|
90
|
+
# options[:job_key], # fully qualified job group where compliance job is stored
|
91
|
+
# options[:run_id], # job run id of compliance job
|
92
|
+
# ], nil)
|
93
|
+
# return void_result[:attachment]
|
94
|
+
# #void_value = BsaSoap.get_cli_return_value(void_result)
|
95
|
+
# #return options[:export_file_name]
|
96
|
+
# rescue => exception
|
97
|
+
# raise "Error exporting deploy run results: #{exception.to_s}"
|
98
|
+
# end
|
99
|
+
# end
|