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

Instance Method Details

#all_vpp_device_assignableHash{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

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 76

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