Class: JSS::ComputerGroup

Inherits:
Group show all
Defined in:
lib/jss/api_object/group/computer_group.rb,
lib/jss.rb

Overview

A computer group in the JSS

See also the parent class JSS::Group

See Also:

Constant Summary collapse

RSRC_BASE =

The base for REST resources of this class

"computergroups"
RSRC_LIST_KEY =

the hash key used for the JSON list output of all objects in the JSS

:computer_groups
RSRC_OBJECT_KEY =

The hash key used for the JSON object output. It’s also used in various error messages

:computer_group
VALID_DATA_KEYS =

these keys, as well as :id and :name, are present in valid API JSON data for this class

[:is_smart, :computers ]
MEMBER_CLASS =

this allows the parent Group class to do things right

JSS::Computer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from JSS::Group

Instance Attribute Details

#criteriaJSS::Criteriable::Criteria Originally defined in module Criteriable

Returns the criteria for the instance into which we’re mixed.

Returns:

#need_to_updateBoolean (readonly) Originally defined in module Updatable

Returns do we have unsaved changes?.

Returns:

  • (Boolean)

    do we have unsaved changes?

Instance Method Details

#member_mac_addressesArray<String>

Return an array of the mac_addrs of members in this group

Returns:



115
116
117
# File 'lib/jss/api_object/group/computer_group.rb', line 115

def member_mac_addresses
  @members.map{|m| m[:mac_address]} + @members.map{|m| m[:alt_mac_address]}
end

#member_serial_numbersArray<String>

The serial numbers of members in this group

Returns:



106
107
108
# File 'lib/jss/api_object/group/computer_group.rb', line 106

def member_serial_numbers
  @members.map{|m| m[:serial_number]}
end