ruby-jss 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-jss might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +26 -0
- data/lib/jamf.rb +8 -13
- data/lib/jamf/api/{abstract_classes → base_classes}/collection_resource.rb +6 -5
- data/lib/jamf/api/{abstract_classes → base_classes}/json_object.rb +4 -20
- data/lib/jamf/api/{abstract_classes → base_classes}/prestage.rb +1 -1
- data/lib/jamf/api/{abstract_classes → base_classes}/resource.rb +6 -2
- data/lib/jamf/api/{abstract_classes → base_classes}/singleton_resource.rb +3 -2
- data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_name.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_names.rb +2 -2
- data/lib/jamf/api/json_objects/prestage_assignment.rb +2 -2
- data/lib/jamf/api/mixins/{abstract.rb → base_class.rb} +34 -16
- data/lib/jamf/api/resources/collection_resources/building.rb +0 -4
- data/lib/jamf/api/resources/collection_resources/category.rb +0 -1
- data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/department.rb +0 -2
- data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +1 -1
- data/lib/jamf/version.rb +1 -1
- data/lib/jss/api_connection.rb +1 -36
- data/lib/jss/api_object/computer.rb +13 -0
- data/lib/jss/api_object/configuration_profile.rb +28 -3
- data/lib/jss/api_object/policy.rb +105 -25
- data/lib/jss/api_object/scopable/scope.rb +31 -30
- data/lib/jss/utility.rb +142 -37
- data/lib/jss/version.rb +1 -1
- metadata +8 -41
- data/lib/jamf/api/abstract_classes/advanced_search.rb +0 -86
- data/lib/jamf/api/abstract_classes/generic_reference.rb +0 -153
- data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +0 -147
- data/lib/jamf/api/json_objects/account_prefs.rb +0 -79
- data/lib/jamf/api/json_objects/android_details.rb +0 -139
- data/lib/jamf/api/json_objects/appletv_details.rb +0 -110
- data/lib/jamf/api/json_objects/attachment.rb +0 -68
- data/lib/jamf/api/json_objects/cellular_network.rb +0 -151
- data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +0 -80
- data/lib/jamf/api/json_objects/criterion.rb +0 -152
- data/lib/jamf/api/json_objects/extension_attribute_value.rb +0 -128
- data/lib/jamf/api/json_objects/installed_application.rb +0 -59
- data/lib/jamf/api/json_objects/installed_certificate.rb +0 -53
- data/lib/jamf/api/json_objects/installed_configuration_profile.rb +0 -67
- data/lib/jamf/api/json_objects/installed_ebook.rb +0 -58
- data/lib/jamf/api/json_objects/installed_provisioning_profile.rb +0 -59
- data/lib/jamf/api/json_objects/ios_details.rb +0 -244
- data/lib/jamf/api/json_objects/location.rb +0 -95
- data/lib/jamf/api/json_objects/mobile_device_details.rb +0 -219
- data/lib/jamf/api/json_objects/mobile_device_security.rb +0 -101
- data/lib/jamf/api/json_objects/purchasing_data.rb +0 -125
- data/lib/jamf/api/mixins/locatable.rb +0 -124
- data/lib/jamf/api/mixins/referable.rb +0 -92
- data/lib/jamf/api/resources/collection_resources/account.rb +0 -163
- data/lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb +0 -52
- data/lib/jamf/api/resources/collection_resources/advanced_user_search.rb +0 -52
- data/lib/jamf/api/resources/collection_resources/computer.rb +0 -49
- data/lib/jamf/api/resources/collection_resources/extension_attribute.rb +0 -45
- data/lib/jamf/api/resources/collection_resources/mobile_device.rb +0 -315
- data/lib/jamf/api/resources/collection_resources/site.rb +0 -77
- data/lib/jamf/api/resources/singleton_resources/authorization.rb +0 -88
- data/lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb +0 -139
- data/lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb +0 -95
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 609ac9ae5ba3ddf1c4c8392acda8d1f1f0bba99e119da2781bd1e8d841a294f5
|
4
|
+
data.tar.gz: 28be9609494e02d11e863e5a64d80c82d866650efd599967400e434d157633ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57b6c5c4b127688a6b9fd190a7927e1d1c6332061d1126b23d03b2d39566898fd5a0876ac73e801f6f9824cb45e149d13d6a4e97154b5c08f199ac593e74cdc
|
7
|
+
data.tar.gz: 1086564724dd9398f1bf540df6a092c90045d9226a78ff1eeade1fc6af4442b566fca2fea896f3e0a25aa62a60d568cc43331c5adb89c5929d53a3bcdf063419
|
data/CHANGES.md
CHANGED
@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## \[1.5.2] - 2020-12-21
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- JSS::Policy#flush_logs can now be called as a class method JSS::Policy.flush_logs, passing in the policy names or ids, without instantiating the policy
|
12
|
+
|
13
|
+
- Both the class and instance 'flush_logs' methods for JSS::Policy take a named parameter 'computers:' which is an array of the computer identifiers for which the policy should be flushed.
|
14
|
+
|
15
|
+
- JSS::Computer instances now have a 'flush_policy_logs' method which is a wrapper for calling JSS::Policy.flush_logs for just that computer
|
16
|
+
|
17
|
+
- JSS::ConfigurationProfile: #update/#save now takes boolean param redeploy_to_all: which defaults to false. The default means redeploy only to newly assigned machines in scope. Setting this to true will push the profile out to all machines in scope, even if they already have the profile.
|
18
|
+
|
19
|
+
### Changed
|
20
|
+
|
21
|
+
- JSS.expand_min_os, used to expand strings like '>=10.14.5' into comma-separated versions to be used in Package and Script os_limitations, has been updated to handle Big Sur being both 10.16 and 11.0, and for future OSes to be 12.x, 13.x etc.
|
22
|
+
NOTE: If you've used this feature in the past, you might want to look at your package and script seetings and update them, since they will refer to OSes 10.17 and higher.
|
23
|
+
|
24
|
+
- JSS::APIConnection: initialize @object_list_cache as an empty hash. This provides more useful error messages when forgetting to pass non-default connection objects, and the default one is unused.
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
- JSS::Scopable::Scope#remove_target and #remove_limitation didn't always remove the item.
|
29
|
+
|
30
|
+
- JSS::Scopable::Scope: when calling the API for any reason, we now pass in the .api connection of the container. Not doing so when using a non-default connection object would cause problems.
|
31
|
+
|
32
|
+
|
7
33
|
## \[1.5.1] - 2020-11-16
|
8
34
|
|
9
35
|
IMPORTANT: New minimum require ruby version is 2.3.0
|
data/lib/jamf.rb
CHANGED
@@ -86,19 +86,14 @@ module Jamf
|
|
86
86
|
# AUTOLOADING
|
87
87
|
##################################
|
88
88
|
|
89
|
-
# Top-level API
|
90
|
-
autoload :JSONObject, 'jamf/api/
|
91
|
-
autoload :Resource, 'jamf/api/
|
92
|
-
autoload :SingletonResource, 'jamf/api/
|
93
|
-
autoload :CollectionResource, 'jamf/api/
|
89
|
+
# Top-level API Base Classes
|
90
|
+
autoload :JSONObject, 'jamf/api/base_classes/json_object'
|
91
|
+
autoload :Resource, 'jamf/api/base_classes/resource'
|
92
|
+
autoload :SingletonResource, 'jamf/api/base_classes/singleton_resource'
|
93
|
+
autoload :CollectionResource, 'jamf/api/base_classes/collection_resource'
|
94
94
|
|
95
|
-
#
|
96
|
-
autoload :
|
97
|
-
autoload :Prestage, 'jamf/api/abstract_classes/prestage'
|
98
|
-
autoload :PrestageSkipSetupItems, 'jamf/api/abstract_classes/prestage_skip_setup_items'
|
99
|
-
|
100
|
-
# Abstract Classes not used for JSONObject subclasses
|
101
|
-
autoload :GenericReference, 'jamf/api/abstract_classes/generic_reference'
|
95
|
+
# Base Classes used for JSONObject subclasses
|
96
|
+
autoload :Prestage, 'jamf/api/base_classes/prestage'
|
102
97
|
|
103
98
|
# MixIn Modules
|
104
99
|
autoload :ChangeLog, 'jamf/api/mixins/change_log'
|
@@ -110,7 +105,7 @@ module Jamf
|
|
110
105
|
autoload :UnCreatable, 'jamf/api/mixins/uncreatable'
|
111
106
|
autoload :Immutable, 'jamf/api/mixins/immutable'
|
112
107
|
autoload :UnDeletable, 'jamf/api/mixins/undeletable'
|
113
|
-
autoload :
|
108
|
+
autoload :BaseClass, 'jamf/api/mixins/base_class'
|
114
109
|
autoload :Pageable, 'jamf/api/mixins/pageable'
|
115
110
|
autoload :Filterable, 'jamf/api/mixins/filterable'
|
116
111
|
autoload :Sortable, 'jamf/api/mixins/sortable'
|
@@ -63,7 +63,7 @@ module Jamf
|
|
63
63
|
#
|
64
64
|
class CollectionResource < Jamf::Resource
|
65
65
|
|
66
|
-
extend Jamf::
|
66
|
+
extend Jamf::BaseClass
|
67
67
|
extend Jamf::Pageable
|
68
68
|
extend Jamf::Sortable
|
69
69
|
extend Jamf::Filterable
|
@@ -214,7 +214,7 @@ module Jamf
|
|
214
214
|
# @return [Array<Hash, Jamf::CollectionResource>] The objects in the collection
|
215
215
|
#
|
216
216
|
def self.all(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, instantiate: false, cnx: Jamf.cnx)
|
217
|
-
|
217
|
+
stop_if_base_class
|
218
218
|
|
219
219
|
# use the cache if not paging, filtering or sorting
|
220
220
|
return cached_all(refresh, instantiate, cnx) if !paged && !sort && !filter
|
@@ -351,7 +351,7 @@ module Jamf
|
|
351
351
|
# or nil if it doesn't exist
|
352
352
|
#
|
353
353
|
def self.raw_data(value = nil, cnx: Jamf.cnx, **ident_and_val)
|
354
|
-
|
354
|
+
stop_if_base_class
|
355
355
|
|
356
356
|
# given a value with no ident key
|
357
357
|
return raw_data_by_value_only(value, cnx: Jamf.cnx) if value
|
@@ -460,7 +460,8 @@ module Jamf
|
|
460
460
|
|
461
461
|
# Make a new thing to be added to the API
|
462
462
|
def self.create(**params)
|
463
|
-
|
463
|
+
stop_if_base_class
|
464
|
+
|
464
465
|
raise Jamf::UnsupportedError, "#{self}'s are not currently creatable via the API" unless creatable?
|
465
466
|
|
466
467
|
# Which connection to use
|
@@ -498,7 +499,7 @@ module Jamf
|
|
498
499
|
# @return [CollectionResource] The ruby-instance of a Jamf object
|
499
500
|
#
|
500
501
|
def self.fetch(random = nil, cnx: Jamf.cnx, **ident_and_val)
|
501
|
-
|
502
|
+
stop_if_base_class
|
502
503
|
ident, value = ident_and_val.first
|
503
504
|
data =
|
504
505
|
if random
|
@@ -40,7 +40,7 @@ module Jamf
|
|
40
40
|
# objects (Hashes) used anywhere in the Jamf Pro API have a matching Class in
|
41
41
|
# ruby-jss which is a subclass of Jamf::JSONObject
|
42
42
|
#
|
43
|
-
# The Jamf::JSONObject class is
|
43
|
+
# The Jamf::JSONObject class is a base class, and cannot be instantiated or used
|
44
44
|
# directly. It merely provides the common functionality needed for dealing
|
45
45
|
# with all JSON objects in the API.
|
46
46
|
#
|
@@ -51,7 +51,7 @@ module Jamf
|
|
51
51
|
# you will make a subclass of either Jamf::JSONObject, Jamf::SingletonResource
|
52
52
|
# or Jamf::CollectionResource.
|
53
53
|
#
|
54
|
-
# Here's the relationship between these
|
54
|
+
# Here's the relationship between these base classes:
|
55
55
|
#
|
56
56
|
# Jamf::JSONObject
|
57
57
|
# (abstract)
|
@@ -506,7 +506,7 @@ module Jamf
|
|
506
506
|
#
|
507
507
|
class JSONObject
|
508
508
|
|
509
|
-
extend Jamf::
|
509
|
+
extend Jamf::BaseClass
|
510
510
|
|
511
511
|
# Constants
|
512
512
|
#####################################
|
@@ -553,7 +553,7 @@ module Jamf
|
|
553
553
|
# @return [Symbol, nil] The real object model key for the alias
|
554
554
|
#
|
555
555
|
def self.attr_key_for_alias(als)
|
556
|
-
|
556
|
+
stop_if_base_class
|
557
557
|
self::OBJECT_MODEL.each { |k, deets| return k if k == als || deets[:aliases].to_a.include?(als) }
|
558
558
|
nil
|
559
559
|
end
|
@@ -771,15 +771,6 @@ module Jamf
|
|
771
771
|
end # create_insert_setters
|
772
772
|
private_class_method :create_delete_if_setters
|
773
773
|
|
774
|
-
# Raise an exception if this is an abstract class
|
775
|
-
# Used in class methods that are defined in abstract classes.
|
776
|
-
# Instantiation is already prevented by the Abstract mixin
|
777
|
-
##############################
|
778
|
-
def self.validate_not_abstract
|
779
|
-
raise Jamf::UnsupportedError, "Unsupported: #{self} is an abstract class, ." if Jamf::Abstract.abstract_classes.include? self
|
780
|
-
end
|
781
|
-
private_class_method :validate_not_abstract
|
782
|
-
|
783
774
|
# Used by auto-generated setters and .create to validate new values.
|
784
775
|
#
|
785
776
|
# returns a valid value or raises an exception
|
@@ -848,13 +839,6 @@ module Jamf
|
|
848
839
|
end
|
849
840
|
private_class_method :validate_attr_value
|
850
841
|
|
851
|
-
# Attributes
|
852
|
-
#####################################
|
853
|
-
|
854
|
-
# @return [Jamf::Connection] the API connection thru which we deal with
|
855
|
-
# this objcet.
|
856
|
-
attr_reader :cnx
|
857
|
-
|
858
842
|
# Constructor
|
859
843
|
#####################################
|
860
844
|
|
@@ -180,7 +180,7 @@ module Jamf
|
|
180
180
|
#
|
181
181
|
class Resource < Jamf::JSONObject
|
182
182
|
|
183
|
-
extend Jamf::
|
183
|
+
extend Jamf::BaseClass
|
184
184
|
|
185
185
|
# Constants
|
186
186
|
#####################################
|
@@ -208,15 +208,19 @@ module Jamf
|
|
208
208
|
# Require use of .fetch or .create, or 'all'
|
209
209
|
#
|
210
210
|
def self.new(data, cnx: Jamf.cnx)
|
211
|
+
stop_if_base_class
|
211
212
|
calling_method = caller_locations(1..1).first.label
|
212
213
|
raise Jamf::UnsupportedError, "Use .fetch, .create, or .all(instantiate:true) to instantiate Jamf::Resources" unless NEW_CALLERS.include? calling_method
|
213
|
-
|
214
214
|
super
|
215
215
|
end
|
216
216
|
|
217
217
|
# Attributes
|
218
218
|
#####################################
|
219
219
|
|
220
|
+
# @return [Jamf::Connection] the API connection thru which we deal with
|
221
|
+
# this resource.
|
222
|
+
attr_reader :cnx
|
223
|
+
|
220
224
|
# @return [String] the resouce path for this object
|
221
225
|
attr_reader :rsrc_path
|
222
226
|
|
@@ -37,7 +37,7 @@ module Jamf
|
|
37
37
|
#
|
38
38
|
class SingletonResource < Jamf::Resource
|
39
39
|
|
40
|
-
extend Jamf::
|
40
|
+
extend Jamf::BaseClass
|
41
41
|
|
42
42
|
# Public Class Methods
|
43
43
|
#####################################
|
@@ -56,6 +56,7 @@ module Jamf
|
|
56
56
|
# @return [Jamf::SingletonResource] The ruby-instance of a Jamf resource
|
57
57
|
#
|
58
58
|
def self.fetch(reload = false, cnx: Jamf.cnx)
|
59
|
+
stop_if_base_class
|
59
60
|
cnx.singleton_cache[self] = nil if reload
|
60
61
|
cached = cnx.singleton_cache[self]
|
61
62
|
return cached if cached
|
@@ -65,7 +66,7 @@ module Jamf
|
|
65
66
|
end # fetch
|
66
67
|
|
67
68
|
def self.flushcache(cnx: Jamf.cnx)
|
68
|
-
|
69
|
+
stop_if_base_class
|
69
70
|
cnx.singleton_cache[self] = nil
|
70
71
|
end
|
71
72
|
|
@@ -64,13 +64,13 @@ module Jamf
|
|
64
64
|
|
65
65
|
# @!attribute isManageNames
|
66
66
|
# @return [Boolean]
|
67
|
-
|
67
|
+
manageNames: {
|
68
68
|
class: :boolean
|
69
69
|
},
|
70
70
|
|
71
71
|
# @!attribute isDeviceNamingConfigured
|
72
72
|
# @return [Boolean]
|
73
|
-
|
73
|
+
deviceNamingConfigured: {
|
74
74
|
class: :boolean
|
75
75
|
}
|
76
76
|
}.freeze
|
@@ -24,35 +24,53 @@
|
|
24
24
|
|
25
25
|
module Jamf
|
26
26
|
|
27
|
-
# This mixin should be extended in
|
28
|
-
# it will raise an error if those classes are instantiated
|
27
|
+
# This mixin should be extended in base class definitions
|
28
|
+
# it will raise an error if those classes are instantiated or allocated
|
29
29
|
# It also maintains an array of classes that extend themselves this way
|
30
|
-
#
|
31
|
-
module
|
30
|
+
#
|
31
|
+
module BaseClass
|
32
|
+
|
33
|
+
DEFAULT_ACTION = 'access the API'.freeze
|
34
|
+
ALLOCATION_ACTION = 'be allocated'.freeze
|
35
|
+
INSTANTIATION_ACTION = 'be instantiated'.freeze
|
32
36
|
|
33
37
|
# when a class is extended by this module, it
|
34
|
-
# gets added to the array of known
|
38
|
+
# gets added to the array of known base classes
|
35
39
|
def self.extended(by_class)
|
36
|
-
|
40
|
+
base_classes << by_class
|
37
41
|
end
|
38
42
|
|
39
|
-
# Classes will be added to this array as they are exteded by
|
40
|
-
def self.
|
41
|
-
@
|
43
|
+
# Classes will be added to this array as they are exteded by BaseClass
|
44
|
+
def self.base_classes
|
45
|
+
@base_classes ||= []
|
42
46
|
end
|
43
47
|
|
44
|
-
|
45
|
-
|
48
|
+
# raise an exception if a given class is a base class
|
49
|
+
def self.stop_if_base_class(klass, action = DEFAULT_ACTION)
|
50
|
+
raise Jamf::UnsupportedError, "#{klass} is a base class and cannot #{action}." if base_classes.include? klass
|
46
51
|
end
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
raise Jamf::UnsupportedError, "Unsupported: #{self} is an abstract class, cannot be instantiated." if Jamf::Abstract.abstract_classes.include? self
|
53
|
+
def base_class?
|
54
|
+
Jamf::BaseClass.base_classes.include? self
|
55
|
+
end
|
52
56
|
|
57
|
+
# Can't allocate if base class
|
58
|
+
def allocate(*args, &block)
|
59
|
+
stop_if_base_class ALLOCATION_ACTION
|
53
60
|
super
|
54
61
|
end
|
55
62
|
|
56
|
-
|
63
|
+
# Can't instantiate if base_class
|
64
|
+
def new(*args, &block)
|
65
|
+
stop_if_base_class INSTANTIATION_ACTION
|
66
|
+
super
|
67
|
+
end
|
68
|
+
|
69
|
+
# raise an exception if this class is a base class
|
70
|
+
def stop_if_base_class(action = DEFAULT_ACTION)
|
71
|
+
Jamf::BaseClass.stop_if_base_class self, action
|
72
|
+
end
|
73
|
+
|
74
|
+
end # module BaseClass
|
57
75
|
|
58
76
|
end # Jamf
|
@@ -37,10 +37,6 @@ module Jamf
|
|
37
37
|
|
38
38
|
extend Jamf::BulkDeletable
|
39
39
|
include Jamf::ChangeLog
|
40
|
-
# TODO: this prob isn't needed anymore
|
41
|
-
# or should be updated - according to the specs, all
|
42
|
-
# references are just ids - integers-in-strings.
|
43
|
-
include Jamf::Referable
|
44
40
|
|
45
41
|
# Constants
|
46
42
|
#####################################
|
@@ -36,7 +36,6 @@ module Jamf
|
|
36
36
|
#####################################
|
37
37
|
|
38
38
|
include Jamf::ChangeLog
|
39
|
-
include Jamf::Referable
|
40
39
|
|
41
40
|
# Constants
|
42
41
|
#####################################
|
@@ -74,7 +73,6 @@ module Jamf
|
|
74
73
|
|
75
74
|
parse_object_model
|
76
75
|
|
77
|
-
|
78
76
|
end # class
|
79
77
|
|
80
78
|
end # module
|
data/lib/jamf/version.rb
CHANGED
data/lib/jss/api_connection.rb
CHANGED
@@ -215,42 +215,6 @@ module JSS
|
|
215
215
|
# # the variable 'prod2_victim_md' now contains a JSS::MobileDevice queried
|
216
216
|
# # through the connection 'production_api2'.
|
217
217
|
#
|
218
|
-
# == Using the APIConnection itself to make API calls.
|
219
|
-
#
|
220
|
-
# Rather than passing an APIConnection into another method, you can call
|
221
|
-
# similar methods on the connection itself. For example, these two calls
|
222
|
-
# have the same result as the two examples above:
|
223
|
-
#
|
224
|
-
# prod2_computer_sns = production_api2.all :Computer, only: :serial_numbers
|
225
|
-
# prod2_victim_md = production_api2.fetch :MobileDevice, id: 832
|
226
|
-
#
|
227
|
-
# Here are the API calls you can make directly from an APIConnection object.
|
228
|
-
# They behave practically identically to the same methods in the APIObject
|
229
|
-
# subclasses, since they just call those methods, passing themselves in as the
|
230
|
-
# APIConnection to use.
|
231
|
-
#
|
232
|
-
# - {#all} The 'list' methods of the various APIObject classes. Use the 'only:'
|
233
|
-
# parameter to specify one of the sub-list-methods, like #all_ids or
|
234
|
-
# #all_laptops, e.g. `my_connection.all :computers, only: :id`
|
235
|
-
# - {#map_all_ids} the equivalent of #map_all_ids_to in the APIObject classes
|
236
|
-
# - {#valid_id} given a class and an identifier (like macaddress or udid)
|
237
|
-
# return a valid id or nil
|
238
|
-
# - {#exist?} given a class and an identifier (like macaddress or udid) does
|
239
|
-
# the identifier exist for the class in the JSS
|
240
|
-
# - {#match} list items in the JSS matching a query
|
241
|
-
# (if the object is {Matchable})
|
242
|
-
# - {#fetch} retrieve an object from the JSS
|
243
|
-
# - {#make} instantiate an object to be created in the JSS
|
244
|
-
# - {#computer_checkin_settings} same as {Computer.checkin_settings}
|
245
|
-
# - {#computer_inventory_collection_settings} same as {Computer.inventory_collection_settings}
|
246
|
-
# - {#computer_application_usage} same as {Computer.application_usage}
|
247
|
-
# - {#computer_management_data} same as {Computer.management_data}
|
248
|
-
# - {#master_distribution_point} same as {DistributionPoint.master_distribution_point}
|
249
|
-
# - {#my_distribution_point} same as {DistributionPoint.my_distribution_point}
|
250
|
-
# - {#network_ranges} same as {NetworkSegment.network_ranges}
|
251
|
-
# - {#network_segments_for_ip} same as {NetworkSegment.segments_for_ip}
|
252
|
-
# - {#my_network_segments} same as {NetworkSegment.my_network_segments}
|
253
|
-
#
|
254
218
|
# == Low-level use of APIConnection instances.
|
255
219
|
#
|
256
220
|
# For most cases, using APIConnection instances as mentioned above
|
@@ -422,6 +386,7 @@ module JSS
|
|
422
386
|
@name = args.delete :name
|
423
387
|
@name ||= :unknown
|
424
388
|
@connected = false
|
389
|
+
@object_list_cache = {}
|
425
390
|
connect args unless args.empty?
|
426
391
|
end # init
|
427
392
|
|