Class: Utility

Inherits:
BsaSoapBase show all
Defined in:
lib/bl_soap/utility.rb

Constant Summary

Constants inherited from BsaSoapBase

BsaSoapBase::CLI_SERVICE, BsaSoapBase::CLI_WSDL, BsaSoapBase::DEFAULT_AUTH_TYPE, BsaSoapBase::HTTP_READ_TIMEOUT, BsaSoapBase::LOGIN_SERVICE, BsaSoapBase::LOGIN_WSDL, BsaSoapBase::ROLE_SERVICE, BsaSoapBase::ROLE_WSDL

Instance Method Summary collapse

Methods inherited from BsaSoapBase

#execute_cli_with_attachments, #execute_cli_with_param_list, #get_all_servers, #get_cli_return_value, #initialize, #validate_cli_option_hash_string_values, #validate_cli_options_hash, #validate_cli_result, #validate_servers

Constructor Details

This class inherits a constructor from BsaSoapBase

Instance Method Details

#export_compliance_run(options = {}) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/bl_soap/utility.rb', line 46

def export_compliance_run(options = {})
  validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_type, :export_file_name], options)
  void_result = execute_cli_with_attachments(self.class, "exportComplianceRun",
    [
      options[:template_group_name] || "",   # fully qualified template group

      options[:template_name] || "",     # name of component template

      options[:rule_name] || "",     # fully qualified path of the rule of the compliance job or null for all results

      options[:job_group_name],      # fully qualified job group where compliance job is stored

      options[:job_name],          # name of compliance job

      options[:run_id],          # job run id of compliance job

      options[:export_file_name],
      options[:export_type]
    ], nil)
  return void_result[:attachment]
  #void_value = BsaSoap.get_cli_return_value(void_result)

  #return options[:export_file_name]

rescue => exception
  raise "Error exporting compliance results: #{exception.to_s}"
end

#export_deploy_run(options = {}) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bl_soap/utility.rb', line 2

def export_deploy_run(options = {})
  validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_file_name], options)
  void_result = execute_cli_with_attachments(self.class, "exportDeployRun",
    [
        options[:job_group_name],     # fully qualified job group where compliance job is stored

        options[:job_name],         # name of compliance job

        options[:run_id],         # job run id of compliance job

        options[:export_file_name],
    ], nil)
  return void_result[:attachment]
    #void_value = BsaSoap.get_cli_return_value(void_result)

    #return options[:export_file_name]

rescue => exception
  raise "Error exporting deploy run results: #{exception.to_s}"
end

#export_deploy_run_status_by_group(options = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/bl_soap/utility.rb', line 18

def export_deploy_run_status_by_group(options = {})
  validate_cli_options_hash([:job_group_name, :export_file_name], options)
  void_result = execute_cli_with_attachments(self.class, "exportDeployRunStatusByGroup",
    [
      options[:job_group_name],          # job run id of compliance job

      options[:export_file_name],
    ], nil)
  return void_result[:attachment]
  #void_value = BsaSoap.get_cli_return_value(void_result)

  #return options[:export_file_name]

rescue => exception
  raise "Error exporting deploy run status results: #{exception.to_s}"
end

#export_nsh_script_run(options = {}) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/bl_soap/utility.rb', line 32

def export_nsh_script_run(options = {})
  validate_cli_options_hash([:run_id, :export_file_name], options)
  void_result = execute_cli_with_attachments(self.class, "exportNSHScriptRun",
    [
      options[:run_id],          # job run id of compliance job

      options[:export_file_name],
    ], nil)
  return void_result[:attachment]
  #void_value = BsaSoap.get_cli_return_value(void_result)

  #return options[:export_file_name]

rescue => exception
  raise "Error exporting NSH script run results: #{exception.to_s}"
end

#export_patch_analysis_run(options = {}) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/bl_soap/utility.rb', line 66

def export_patch_analysis_run(options = {})
  validate_cli_options_hash([:job_group_name, :job_name, :run_id, :export_type, :export_file_name], options)
  void_result = execute_cli_with_attachments(self.class, "exportPatchAnalysisRun",
    [
      options[:Server_name] || "",   # fully qualified template group

      options[:job_group_name],      # fully qualified job group where compliance job is stored

      options[:job_name],          # name of compliance job

      options[:run_id],          # job run id of compliance job

      options[:export_file_name],
      options[:export_type]
    ], nil)
  return void_result[:attachment]
  #void_value = BsaSoap.get_cli_return_value(void_result)

  #return options[:export_file_name]

rescue => exception
  raise "Error exporting patch analysis run results: #{exception.to_s}"
end