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,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
         | 
    
        data/lib/bl_soap/job.rb
    ADDED
    
    | @@ -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 | 
            +
             | 
| @@ -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
         |