Method: JSS::Computer.management_data
- Defined in:
- lib/jss/api_object/computer.rb
.management_data(ident, subset: nil, only: nil, api: JSS.api) ⇒ 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.
480 481 482 483 484 485 486 487 488 |
# File 'lib/jss/api_object/computer.rb', line 480 def self.management_data(ident, subset: nil, only: nil, api: JSS.api) id = valid_id ident, api: api raise "No computer matches identifier: #{ident}" unless id if subset management_data_subset id, subset: subset, only: only, api: api else full_management_data id, api: api end end |