Method: Jamf::Computer.management_data
- Defined in:
- lib/jamf/api/classic/api_objects/computer.rb
.management_data(ident, subset: nil, only: nil, api: nil, cnx: Jamf.cnx) ⇒ Hash, Array
The ‘computer management’ data for a given computer by id, looked up on the fly.
Without specifying a subset:, the entire dataset is returned as a hash of arrays, one per subset
If a subset is given then only that array is returned, and it contains hashes with data about each item (usually :name and :id)
If the only: param is provided with a subset, it is used as a hash-key to map the array to just those values, so subset: :smart_groups, only: :name will return an array of names of smartgroups that contain the computer.
559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/jamf/api/classic/api_objects/computer.rb', line 559 def self.management_data(ident, subset: nil, only: nil, api: nil, cnx: Jamf.cnx) cnx = api if api id = valid_id ident, cnx: cnx raise "No computer matches identifier: #{ident}" unless id if subset management_data_subset id, subset: subset, only: only, cnx: cnx else full_management_data id, cnx: cnx end end |