Class: ComplianceJob
- Inherits:
-
BsaSoapBase
- Object
- BsaSoapBase
- ComplianceJob
- Defined in:
- lib/bl_soap/compliance_job.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
- #add_component_to_job_by_job_db_key(options = {}) ⇒ Object
- #add_named_server_to_job_by_job_db_key(options = {}) ⇒ Object
- #create_component_based_compliance_job(options = {}) ⇒ Object
- #create_remediation_job_from_compliance_result_by_rule(options = {}) ⇒ Object
- #create_remediation_job_from_compliance_result_by_server(options = {}) ⇒ Object
- #create_template_fltered_compliance_job(options = {}) ⇒ Object
- #execute_job_and_wait(options = {}) ⇒ Object
- #get_dbkey_by_group_and_name(options = {}) ⇒ Object
- #set_auto_remediation(options = {}) ⇒ Object
- #set_description(options = {}) ⇒ Object
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
#add_component_to_job_by_job_db_key(options = {}) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/bl_soap/compliance_job.rb', line 2 def add_component_to_job_by_job_db_key( = {}) ([:compliance_key, :component_key], ) db_key_result = execute_cli_with_param_list(self.class, "addComponentToJobByJobDBKey", [ [:compliance_key], # Handle to compliance Job [:component_key] # Handle to component to be added ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#add_named_server_to_job_by_job_db_key(options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/bl_soap/compliance_job.rb', line 14 def add_named_server_to_job_by_job_db_key( = {}) ([:db_key, :server_name], ) db_key_result = execute_cli_with_param_list(self.class, "addNamedServerToJobByJobDBKey", [ [:db_key], # Handle to the Compliance Job [:server_name] # Name of the server to be added ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#create_component_based_compliance_job(options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bl_soap/compliance_job.rb', line 26 def create_component_based_compliance_job( = {}) ([:job_name, :group_id, :template_key, :server_name], ) db_key_result = execute_cli_with_param_list(self.class, "createComponentBasedComplianceJob", [ [:job_name], # Name of the job to be created [:group_id], # Id of the parent job group for the compliance job [:template_key], # Handle to template describing the assets to be included in compliance [:server_name], # Target server for compliance job [:component_index] || 0 # Index of component on target server (typically 0) ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#create_remediation_job_from_compliance_result_by_rule(options = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/bl_soap/compliance_job.rb', line 41 def create_remediation_job_from_compliance_result_by_rule( = {}) ( [:remediation_name, :job_group_name, :depot_group_name, :comp_job_key, :comp_job_run_id, :template_group_name, :template_name, :rule_grp_name, :rule_name, :target_component], ) db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobFromComplianceResultByRule", [ [:remediation_name], # Name of the package [:job_group_name], # Name of a group that should contain the new remediation job(s) [:depot_group_name], # Name of a group that should contain the new package(s) [:comp_job_key], # Handle to compliance job whose job run result you want to package [:comp_job_run_id], # ID of the compliance job run whose result you want to package [:template_group_name], # Group name of the template used in the compliance job run [:template_name], # Name of the template used in the compliance job run [:rule_grp_name], # Name of the template rule group used in the compliance job run [:rule_name], # Name of the template rule used in the compliance job run [:target_component], # Name of the target component [:use_component_device_for_targets] || true, # Use the device of a component as the target of the remediation (defualt = true) devices are targets [:keep_unique_package_props] || true # Indicates if the package should uniquely save each local property for the compliance rule packages that are used ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#create_remediation_job_from_compliance_result_by_server(options = {}) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bl_soap/compliance_job.rb', line 65 def create_remediation_job_from_compliance_result_by_server( = {}) ( [:remediation_name, :job_group_name, :depot_group_name, :comp_job_key, :comp_job_run_id, :target_server, :template_group_name, :template_name, :target_component, :rule_grp_name, :rule_name], ) db_key_result = execute_cli_with_param_list(self.class, "createRemediationJobFromComplianceResultByServer", [ [:remediation_name], # Name of the package [:job_group_name], # Name of a group that should contain the new remediation job(s) [:depot_group_name], # Name of a group that should contain the new package(s) [:comp_job_key], # Handle to compliance job whose job run result you want to package [:comp_job_run_id], # ID of the compliance job run whose result you want to package [:target_server], # Name of the target server [:template_group_name], # Group name of the template used in the compliance job run [:template_name], # Name of the template used in the compliance job run [:target_component], # Name of the target component [:rule_grp_name], # Name of the template rule group used in the compliance job run [:rule_name], # Name of the template rule used in the compliance job run [:use_component_device_for_targets] || true, # Use the device of a component as the target of the remediation (defualt = true) devices are targets [:keep_unique_package_props] || true # Indicates if the package should uniquely save each local property for the compliance rule packages that are used ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#create_template_fltered_compliance_job(options = {}) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/bl_soap/compliance_job.rb', line 90 def create_template_fltered_compliance_job( = {}) ([:job_name, :group_id, :template_key, :server_name], ) db_key_result = execute_cli_with_param_list(self.class, "createTemplateFilteredComplianceJob", [ [:job_name], # Name of the job to be created [:group_id], # Id of the parent job group for the compliance job [:template_key], # Handle to the template describing the assets to be including in the compliance job [:server_name] # Target server for the compliance job ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#execute_job_and_wait(options = {}) ⇒ Object
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/bl_soap/compliance_job.rb', line 104 def execute_job_and_wait( = {}) ([:job_key], ) job_key_result = execute_cli_with_param_list(self.class, "executeJobAndWait", [ [:job_key] # Handle to the compliance job to be executed ]) job_key = get_cli_return_value(job_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#get_dbkey_by_group_and_name(options = {}) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/bl_soap/compliance_job.rb', line 115 def get_dbkey_by_group_and_name( = {}) ([:group_name, :job_name], ) db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName", [ [:group_name], # Fully qualified path to the job group containing the job [:job_name] # Name of the job ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#set_auto_remediation(options = {}) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/bl_soap/compliance_job.rb', line 127 def set_auto_remediation( = {}) ([:job_key, :job_name, :depot_group, :job_group], ) db_key_result = execute_cli_with_param_list(self.class, "setAutoRemediation", [ [:job_key], # Handle to compliance job [:job_name], # Name for auto-remediation job [:depot_group], # Name of the depot group to store files in [:job_group], # Name of the job group to store the remediation job in [:is_auto_remediate] || true, # Auto-remediation state for the job - true = set [:use_component_device_for_targets] || true, # Use the device of a component as the target of the remediation (defualt = true) devices are targets [:keep_unique_package_props] || true # Indicates if the package should uniquely save each local property for the compliance rule packages that are used ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |
#set_description(options = {}) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/bl_soap/compliance_job.rb', line 144 def set_description( = {}) ([:job_key, :desc], ) db_key_result = execute_cli_with_param_list(self.class, "setDescription", [ [:job_key], # handle to compliance job [:desc] # description of job ]) db_key = get_cli_return_value(db_key_result) rescue => exception raise "Exception executing #{self.class} function: #{exception.to_s}" end |