Method: Jamf::PatchSource.valid_patch_source_id
- Defined in:
- lib/jamf/api/classic/base_classes/patch_source.rb
.valid_patch_source_id(ident, refresh = false, api: nil, cnx: Jamf.cnx) ⇒ Integer?
Given a name or id for a Patch Source (internal or external) return the id if it exists, or nil if it doesn’t.
NOTE: does not indicate which kind of source it is, just that it exists and can be used as a source_id for a patch title.
271 272 273 274 275 276 277 |
# File 'lib/jamf/api/classic/base_classes/patch_source.rb', line 271 def self.valid_patch_source_id(ident, refresh = false, api: nil, cnx: Jamf.cnx) cnx = api if api id = Jamf::PatchInternalSource.valid_id ident, refresh, cnx: cnx id ||= Jamf::PatchExternalSource.valid_id ident, refresh, cnx: cnx id end |