Module: Jamf::VPPable::ClassMethods
- Defined in:
- lib/jamf/api/classic/api_objects/vppable.rb
Overview
Methods in here will become class methods of the classes that include VPPable
Instance Method Summary collapse
-
#all_vpp_device_assignable ⇒ Hash{String=>Hash}
The names and assignment data for all class members that have VPP licenses that can be assigned by device.
Instance Method Details
#all_vpp_device_assignable ⇒ Hash{String=>Hash}
The names and assignment data for all class members that have VPP licenses that can be assigned by device. The assignment data is a hash of three keys pointing to integers:
{
total: int,
used: int,
remaining: int
}
WARNING: This must instantiate all objects, so is slow
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 58 def all_vpp_device_assignable data = {} all_ids.each do |id| obj = fetch id: id next unless obj.vpp_device_based? data[obj.name] = { total: obj.vpp_licenses_total, used: obj.vpp_licenses_used, remaining: obj.vpp_licenses_remaining } end data end |