ruby-jss 0.10.2 → 0.11.0a5
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 +49 -2
- data/README.md +14 -7
- data/lib/jss/api_connection.rb +48 -24
- data/lib/jss/api_object/advanced_search.rb +5 -1
- data/lib/jss/api_object/computer.rb +204 -402
- data/lib/jss/api_object/computer_invitation.rb +5 -3
- data/lib/jss/api_object/ebook.rb +5 -0
- data/lib/jss/api_object/extendable.rb +13 -0
- data/lib/jss/api_object/group/computer_group.rb +4 -0
- data/lib/jss/api_object/group/mobile_device_group.rb +4 -1
- data/lib/jss/api_object/group.rb +6 -1
- data/lib/jss/api_object/mac_application.rb +5 -0
- data/lib/jss/api_object/management_history/audit_event.rb +45 -0
- data/lib/jss/api_object/management_history/casper_imaging_log.rb +37 -0
- data/lib/jss/api_object/management_history/casper_remote_log.rb +37 -0
- data/lib/jss/api_object/management_history/computer_usage_log.rb +43 -0
- data/lib/jss/api_object/management_history/ebook.rb +70 -0
- data/lib/jss/api_object/management_history/mac_app_store_app.rb +69 -0
- data/lib/jss/api_object/management_history/mdm_command.rb +96 -0
- data/lib/jss/api_object/management_history/mobile_device_app.rb +99 -0
- data/lib/jss/api_object/management_history/policy_log.rb +60 -0
- data/lib/jss/api_object/management_history/screen_sharing_log.rb +41 -0
- data/lib/jss/api_object/management_history/user_location_change.rb +66 -0
- data/lib/jss/api_object/management_history.rb +865 -0
- data/lib/jss/api_object/mdm.rb +1298 -0
- data/lib/jss/api_object/mobile_device.rb +241 -644
- data/lib/jss/api_object/mobile_device_application.rb +6 -0
- data/lib/jss/api_object/mobile_device_configuration_profile.rb +36 -0
- data/lib/jss/api_object/osx_configuration_profile.rb +115 -151
- data/lib/jss/api_object/patch.rb +38 -0
- data/lib/jss/api_object/patch_policy.rb +38 -0
- data/lib/jss/api_object/peripheral.rb +5 -7
- data/lib/jss/api_object/policy.rb +5 -0
- data/lib/jss/api_object/restricted_software.rb +5 -0
- data/lib/jss/api_object/scopable/scope.rb +367 -411
- data/lib/jss/api_object/self_servable.rb +15 -4
- data/lib/jss/api_object/sitable.rb +197 -0
- data/lib/jss/api_object/site.rb +45 -76
- data/lib/jss/api_object/user.rb +7 -3
- data/lib/jss/api_object.rb +75 -4
- data/lib/jss/utility.rb +21 -0
- data/lib/jss/version.rb +1 -1
- data/lib/jss.rb +6 -0
- metadata +42 -6
@@ -0,0 +1,60 @@
|
|
1
|
+
#
|
2
|
+
module JSS
|
3
|
+
|
4
|
+
#
|
5
|
+
module ManagementHistory
|
6
|
+
|
7
|
+
# PolicyLog - A Computer policy log history entry
|
8
|
+
#
|
9
|
+
# This should only be instantiated by the ManagementHistory.policy_logs method
|
10
|
+
# when mixed in to Computers.
|
11
|
+
#
|
12
|
+
# That method will return an array of these objects.
|
13
|
+
#
|
14
|
+
class PolicyLog < ImmutableStruct.new(
|
15
|
+
|
16
|
+
:policy_id,
|
17
|
+
:policy_name,
|
18
|
+
:username,
|
19
|
+
:date_completed_epoch,
|
20
|
+
:status
|
21
|
+
)
|
22
|
+
|
23
|
+
def initialize(args = {})
|
24
|
+
# we want the status as a Symbol
|
25
|
+
args[:status] &&= args[:status].downcase.to_sym
|
26
|
+
super
|
27
|
+
end
|
28
|
+
|
29
|
+
# @!attribute [r] policy_id
|
30
|
+
# @return [Integer] the jss id of the poolicy
|
31
|
+
|
32
|
+
alias id policy_id
|
33
|
+
|
34
|
+
# @!attribute [r] policy_name
|
35
|
+
# @return [String] the name of the policy.
|
36
|
+
|
37
|
+
alias name policy_name
|
38
|
+
|
39
|
+
# @!attribute [r] username
|
40
|
+
# @return [String] The username active for the policy
|
41
|
+
|
42
|
+
# @!attribute [r] date_completed_epoch
|
43
|
+
# @return [Integer] When the policy completed, as
|
44
|
+
# a unix epoch timestamp with milliseconds
|
45
|
+
|
46
|
+
# @!attribute [r] status
|
47
|
+
# @return [Symbol] :completed or :failed
|
48
|
+
|
49
|
+
# @return [Time] When the policy completed, as a ruby
|
50
|
+
# Time object
|
51
|
+
def date_completed
|
52
|
+
JSS.epoch_to_time(@date_completed_epoch) if @date_completed_epoch
|
53
|
+
end
|
54
|
+
alias completed date_completed
|
55
|
+
|
56
|
+
end # PolicyLog
|
57
|
+
|
58
|
+
end # module ManagementHistory
|
59
|
+
|
60
|
+
end # module JSS
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#
|
2
|
+
module JSS
|
3
|
+
|
4
|
+
#
|
5
|
+
module ManagementHistory
|
6
|
+
|
7
|
+
# ScreenSharingLog - an casper screen sharing event in a Jamf Compter's Management History
|
8
|
+
#
|
9
|
+
# This should only be instantiated by the ManagementHistory.screen_sharing_logs method
|
10
|
+
# when mixed in to Computers devices.
|
11
|
+
#
|
12
|
+
# That method will return an array of these objects.
|
13
|
+
#
|
14
|
+
class ScreenSharingLog < ImmutableStruct.new(
|
15
|
+
|
16
|
+
:status,
|
17
|
+
:date_time_epoch,
|
18
|
+
:details
|
19
|
+
)
|
20
|
+
|
21
|
+
# @!attribute [r] status
|
22
|
+
# @return [String] The status of the event.
|
23
|
+
|
24
|
+
# @!attribute [r] details
|
25
|
+
# @return [String] The details of the event.
|
26
|
+
|
27
|
+
# @!attribute [r] date_time_epoch
|
28
|
+
# @return [Integer] When the event occured on the server, as
|
29
|
+
# a unix epoch timestamp with milliseconds
|
30
|
+
|
31
|
+
# @return [Time] When the event occured on the server, as a ruby Time object
|
32
|
+
#
|
33
|
+
def date_time
|
34
|
+
JSS.epoch_to_time @date_time_epoch if @date_time_epoch
|
35
|
+
end
|
36
|
+
|
37
|
+
end # CasperRemoteEvent
|
38
|
+
|
39
|
+
end # module ManagementHistory
|
40
|
+
|
41
|
+
end # module JSS
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#
|
2
|
+
module JSS
|
3
|
+
|
4
|
+
#
|
5
|
+
module ManagementHistory
|
6
|
+
|
7
|
+
# UserLocationChange - a change in a device's assigned user or location
|
8
|
+
#
|
9
|
+
# This should only be instantiated by the ManagementHistory.user_location_history method
|
10
|
+
# when mixed in to Computers or Mobile devices.
|
11
|
+
#
|
12
|
+
# That method will return an array of these objects.
|
13
|
+
#
|
14
|
+
class UserLocationChange < ImmutableStruct.new(
|
15
|
+
|
16
|
+
:date_time_epoch,
|
17
|
+
:username,
|
18
|
+
:full_name,
|
19
|
+
:email_address,
|
20
|
+
:phone_number,
|
21
|
+
:department,
|
22
|
+
:building,
|
23
|
+
:room,
|
24
|
+
:position
|
25
|
+
)
|
26
|
+
|
27
|
+
# @!attribute [r] date_time_epoch
|
28
|
+
# @return [Integer] When the change occurred
|
29
|
+
|
30
|
+
# @!attribute [r] username
|
31
|
+
# @return [String] The username for this change
|
32
|
+
|
33
|
+
# @!attribute [r] full_name
|
34
|
+
# @return [String] The user's full name for this change
|
35
|
+
|
36
|
+
# @!attribute [r] email_address
|
37
|
+
# @return [String] The email_address for this change
|
38
|
+
|
39
|
+
# @!attribute [r] phone_number
|
40
|
+
# @return [String] The phone_number for this change
|
41
|
+
|
42
|
+
# @!attribute [r] department
|
43
|
+
# @return [String] The department for this change
|
44
|
+
|
45
|
+
alias dept department
|
46
|
+
|
47
|
+
# @!attribute [r] building
|
48
|
+
# @return [String] The building for this change
|
49
|
+
|
50
|
+
# @!attribute [r] room
|
51
|
+
# @return [String] The room for this change
|
52
|
+
|
53
|
+
# @!attribute [r] position
|
54
|
+
# @return [String] The position for this change
|
55
|
+
|
56
|
+
# @return [Time] When the change occurred, as a ruby Time object
|
57
|
+
#
|
58
|
+
def date_time
|
59
|
+
JSS.epoch_to_time @date_time_epoch if @date_time_epoch
|
60
|
+
end
|
61
|
+
|
62
|
+
end # UserLocationChange
|
63
|
+
|
64
|
+
end # module ManagementHistory
|
65
|
+
|
66
|
+
end # module JSS
|