ruby-jss 0.10.0 → 0.10.1a2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ruby-jss might be problematic. Click here for more details.

Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jss/api_object.rb +102 -0
  3. data/lib/jss/api_object/advanced_search/advanced_computer_search.rb +4 -0
  4. data/lib/jss/api_object/advanced_search/advanced_mobile_device_search.rb +5 -0
  5. data/lib/jss/api_object/advanced_search/advanced_user_search.rb +5 -0
  6. data/lib/jss/api_object/building.rb +5 -0
  7. data/lib/jss/api_object/category.rb +5 -0
  8. data/lib/jss/api_object/computer.rb +7 -2
  9. data/lib/jss/api_object/computer_invitation.rb +5 -0
  10. data/lib/jss/api_object/department.rb +26 -21
  11. data/lib/jss/api_object/distribution_point.rb +5 -0
  12. data/lib/jss/api_object/ebook.rb +5 -0
  13. data/lib/jss/api_object/extendable.rb +123 -148
  14. data/lib/jss/api_object/extension_attribute.rb +242 -301
  15. data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +5 -0
  16. data/lib/jss/api_object/extension_attribute/mobile_device_extension_attribute.rb +14 -9
  17. data/lib/jss/api_object/extension_attribute/user_extension_attribute.rb +40 -35
  18. data/lib/jss/api_object/group/computer_group.rb +11 -6
  19. data/lib/jss/api_object/group/mobile_device_group.rb +11 -6
  20. data/lib/jss/api_object/group/user_group.rb +16 -11
  21. data/lib/jss/api_object/ldap_server.rb +5 -0
  22. data/lib/jss/api_object/mac_application.rb +5 -0
  23. data/lib/jss/api_object/mobile_device.rb +5 -0
  24. data/lib/jss/api_object/mobile_device_application.rb +5 -0
  25. data/lib/jss/api_object/mobile_device_configuration_profile.rb +5 -0
  26. data/lib/jss/api_object/netboot_server.rb +11 -6
  27. data/lib/jss/api_object/network_segment.rb +5 -0
  28. data/lib/jss/api_object/osx_configuration_profile.rb +4 -0
  29. data/lib/jss/api_object/package.rb +5 -0
  30. data/lib/jss/api_object/peripheral.rb +4 -0
  31. data/lib/jss/api_object/peripheral_type.rb +11 -6
  32. data/lib/jss/api_object/policy.rb +5 -0
  33. data/lib/jss/api_object/removable_macaddr.rb +28 -23
  34. data/lib/jss/api_object/restricted_software.rb +5 -0
  35. data/lib/jss/api_object/script.rb +5 -0
  36. data/lib/jss/api_object/site.rb +29 -24
  37. data/lib/jss/api_object/software_update_server.rb +11 -6
  38. data/lib/jss/api_object/user.rb +5 -0
  39. data/lib/jss/api_object/webhook.rb +5 -0
  40. data/lib/jss/version.rb +1 -1
  41. metadata +4 -4
@@ -88,6 +88,11 @@ module JSS
88
88
  bundle_id: {rsrc_id: :bundleid, list: :all_bundle_ids}
89
89
  }.freeze
90
90
 
91
+ # the object type for this object in
92
+ # the object history table.
93
+ # See {APIObject#add_object_history_entry}
94
+ OBJECT_HISTORY_OBJECT_TYPE = 23
95
+
91
96
  # Attributes
92
97
  #####################################
93
98
 
@@ -16,6 +16,11 @@ module JSS
16
16
  ### It's also used in various error messages
17
17
  RSRC_OBJECT_KEY = :configuration_profile
18
18
 
19
+ # the object type for this object in
20
+ # the object history table.
21
+ # See {APIObject#add_object_history_entry}
22
+ OBJECT_HISTORY_OBJECT_TYPE = 22
23
+
19
24
  end
20
25
 
21
26
  end
@@ -1,26 +1,26 @@
1
1
  ### Copyright 2017 Pixar
2
2
 
3
- ###
3
+ ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
5
  ### with the following modification; you may not use this file except in
6
6
  ### compliance with the Apache License and the following modification to it:
7
7
  ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
8
+ ###
9
9
  ### 6. Trademarks. This License does not grant permission to use the trade
10
10
  ### names, trademarks, service marks, or product names of the Licensor
11
11
  ### and its affiliates, except as required to comply with Section 4(c) of
12
12
  ### the License and to reproduce the content of the NOTICE file.
13
- ###
13
+ ###
14
14
  ### You may obtain a copy of the Apache License at
15
- ###
15
+ ###
16
16
  ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
17
+ ###
18
18
  ### Unless required by applicable law or agreed to in writing, software
19
19
  ### distributed under the Apache License with the above modification is
20
20
  ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
21
  ### KIND, either express or implied. See the Apache License for the specific
22
22
  ### language governing permissions and limitations under the Apache License.
23
- ###
23
+ ###
24
24
  ###
25
25
 
26
26
  ###
@@ -73,6 +73,11 @@ module JSS
73
73
  ### these keys, as well as :id and :name, are present in valid API JSON data for this class
74
74
  VALID_DATA_KEYS = [:protocol, :boot_args]
75
75
 
76
+ # the object type for this object in
77
+ # the object history table.
78
+ # See {APIObject#add_object_history_entry}
79
+ OBJECT_HISTORY_OBJECT_TYPE = 81
80
+
76
81
  #####################################
77
82
  ### Attributes
78
83
  #####################################
@@ -62,6 +62,11 @@ module JSS
62
62
  ### these keys, as well as :id and :name, are present in valid API JSON data for this class
63
63
  VALID_DATA_KEYS = [:distribution_point, :starting_address, :override_departments].freeze
64
64
 
65
+ # the object type for this object in
66
+ # the object history table.
67
+ # See {APIObject#add_object_history_entry}
68
+ OBJECT_HISTORY_OBJECT_TYPE = 43
69
+
65
70
  ### Class Methods
66
71
  #####################################
67
72
 
@@ -97,6 +97,10 @@ module JSS
97
97
  ### The possible values for :level
98
98
  LEVELS = ["user", "computer"]
99
99
 
100
+ # the object type for this object in
101
+ # the object history table.
102
+ # See {APIObject#add_object_history_entry}
103
+ OBJECT_HISTORY_OBJECT_TYPE = 4
100
104
 
101
105
  #####################################
102
106
  ### Attributes
@@ -92,6 +92,11 @@ module JSS
92
92
  ### The table in the database for this object
93
93
  DB_TABLE = 'packages'.freeze
94
94
 
95
+ # the object type for this object in
96
+ # the object history table.
97
+ # See {APIObject#add_object_history_entry}
98
+ OBJECT_HISTORY_OBJECT_TYPE = 90
99
+
95
100
  ### Class Variables
96
101
  #####################################
97
102
 
@@ -83,6 +83,10 @@ module JSS
83
83
  ### these keys, as well as :id and :name, are present in valid API JSON data for this class
84
84
  VALID_DATA_KEYS = [:type, :bar_code_1, :computer_id ]
85
85
 
86
+ # the object type for this object in
87
+ # the object history table.
88
+ # See {APIObject#add_object_history_entry}
89
+ OBJECT_HISTORY_OBJECT_TYPE = 8
86
90
 
87
91
  #####################################
88
92
  ### Class Variables
@@ -1,26 +1,26 @@
1
1
  ### Copyright 2017 Pixar
2
2
 
3
- ###
3
+ ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
5
  ### with the following modification; you may not use this file except in
6
6
  ### compliance with the Apache License and the following modification to it:
7
7
  ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
8
+ ###
9
9
  ### 6. Trademarks. This License does not grant permission to use the trade
10
10
  ### names, trademarks, service marks, or product names of the Licensor
11
11
  ### and its affiliates, except as required to comply with Section 4(c) of
12
12
  ### the License and to reproduce the content of the NOTICE file.
13
- ###
13
+ ###
14
14
  ### You may obtain a copy of the Apache License at
15
- ###
15
+ ###
16
16
  ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
17
+ ###
18
18
  ### Unless required by applicable law or agreed to in writing, software
19
19
  ### distributed under the Apache License with the above modification is
20
20
  ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
21
  ### KIND, either express or implied. See the Apache License for the specific
22
22
  ### language governing permissions and limitations under the Apache License.
23
- ###
23
+ ###
24
24
  ###
25
25
 
26
26
  ###
@@ -75,6 +75,11 @@ module JSS
75
75
  ### field types can be one of these, either String or Symbol
76
76
  FIELD_TYPES = [:text, :menu]
77
77
 
78
+ # the object type for this object in
79
+ # the object history table.
80
+ # See {APIObject#add_object_history_entry}
81
+ OBJECT_HISTORY_OBJECT_TYPE = 11
82
+
78
83
  #####################################
79
84
  ### Attributes
80
85
  #####################################
@@ -244,6 +244,11 @@ module JSS
244
244
  years: 'Year'
245
245
  }.freeze
246
246
 
247
+ # the object type for this object in
248
+ # the object history table.
249
+ # See {APIObject#add_object_history_entry}
250
+ OBJECT_HISTORY_OBJECT_TYPE = 3
251
+
247
252
  ######################
248
253
  ### Attributes
249
254
  ######################
@@ -1,31 +1,31 @@
1
1
  ### Copyright 2017 Pixar
2
2
 
3
- ###
3
+ ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
5
  ### with the following modification; you may not use this file except in
6
6
  ### compliance with the Apache License and the following modification to it:
7
7
  ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
8
+ ###
9
9
  ### 6. Trademarks. This License does not grant permission to use the trade
10
10
  ### names, trademarks, service marks, or product names of the Licensor
11
11
  ### and its affiliates, except as required to comply with Section 4(c) of
12
12
  ### the License and to reproduce the content of the NOTICE file.
13
- ###
13
+ ###
14
14
  ### You may obtain a copy of the Apache License at
15
- ###
15
+ ###
16
16
  ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
17
+ ###
18
18
  ### Unless required by applicable law or agreed to in writing, software
19
19
  ### distributed under the Apache License with the above modification is
20
20
  ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
21
  ### KIND, either express or implied. See the Apache License for the specific
22
22
  ### language governing permissions and limitations under the Apache License.
23
- ###
23
+ ###
24
24
  ###
25
25
 
26
26
  ###
27
27
  module JSS
28
-
28
+
29
29
  #####################################
30
30
  ### Module Variables
31
31
  #####################################
@@ -33,12 +33,12 @@ module JSS
33
33
  #####################################
34
34
  ### Module Methods
35
35
  #####################################
36
-
36
+
37
37
  #####################################
38
38
  ### Classes
39
39
  #####################################
40
40
 
41
- ###
41
+ ###
42
42
  ### A removable_macaddr in the JSS
43
43
  ###
44
44
  ### These are simple, in that they only have an ID and a name
@@ -46,43 +46,48 @@ module JSS
46
46
  ### @see JSS::APIObject
47
47
  ###
48
48
  class RemovableMacAddress < JSS::APIObject
49
-
49
+
50
50
  #####################################
51
51
  ### Mix-Ins
52
52
  #####################################
53
53
  include JSS::Creatable
54
54
  include JSS::Updatable
55
-
55
+
56
56
  #####################################
57
57
  ### Class Methods
58
58
  #####################################
59
59
 
60
-
60
+
61
61
  #####################################
62
62
  ### Class Constants
63
63
  #####################################
64
-
64
+
65
65
  ### The base for REST resources of this class
66
66
  RSRC_BASE = "removablemacaddresses"
67
-
67
+
68
68
  ### the hash key used for the JSON list output of all objects in the JSS
69
69
  RSRC_LIST_KEY = :removable_mac_addresses
70
-
70
+
71
71
  ### The hash key used for the JSON object output.
72
72
  ### It's also used in various error messages
73
73
  RSRC_OBJECT_KEY = :removable_mac_address
74
-
74
+
75
75
  ### these keys, as well as :id and :name, are present in valid API JSON data for this class
76
76
  VALID_DATA_KEYS = []
77
-
77
+
78
+ # the object type for this object in
79
+ # the object history table.
80
+ # See {APIObject#add_object_history_entry}
81
+ OBJECT_HISTORY_OBJECT_TYPE = 77
82
+
78
83
  #####################################
79
84
  ### Attributes
80
85
  #####################################
81
-
86
+
82
87
  #####################################
83
- ### Constructor
88
+ ### Constructor
84
89
  #####################################
85
-
90
+
86
91
  ###
87
92
  ### See JSS::APIObject#initialize
88
93
  ###
@@ -90,10 +95,10 @@ module JSS
90
95
  #####################################
91
96
  ### Public Instance Methods
92
97
  #####################################
93
-
98
+
94
99
  alias macaddress name
95
100
  alias mac_address name
96
-
101
+
97
102
  end # class removable_macaddr
98
-
103
+
99
104
  end # module
@@ -31,6 +31,11 @@ module JSS
31
31
  # Our scopes deal with computers
32
32
  SCOPE_TARGET_KEY = :computers
33
33
 
34
+ # the object type for this object in
35
+ # the object history table.
36
+ # See {APIObject#add_object_history_entry}
37
+ OBJECT_HISTORY_OBJECT_TYPE = 5
38
+
34
39
  # Attributes
35
40
  #####################################
36
41
 
@@ -94,6 +94,11 @@ module JSS
94
94
  ### The keys used in the @parameters Hash
95
95
  PARAMETER_KEYS = [:parameter4, :parameter5, :parameter6, :parameter7, :parameter8, :parameter9, :parameter10, :parameter11].freeze
96
96
 
97
+ # the object type for this object in
98
+ # the object history table.
99
+ # See {APIObject#add_object_history_entry}
100
+ OBJECT_HISTORY_OBJECT_TYPE = 91
101
+
97
102
  ### Attributes
98
103
  #####################################
99
104
 
@@ -1,31 +1,31 @@
1
1
  ### Copyright 2017 Pixar
2
2
 
3
- ###
3
+ ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
5
  ### with the following modification; you may not use this file except in
6
6
  ### compliance with the Apache License and the following modification to it:
7
7
  ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
8
+ ###
9
9
  ### 6. Trademarks. This License does not grant permission to use the trade
10
10
  ### names, trademarks, service marks, or product names of the Licensor
11
11
  ### and its affiliates, except as required to comply with Section 4(c) of
12
12
  ### the License and to reproduce the content of the NOTICE file.
13
- ###
13
+ ###
14
14
  ### You may obtain a copy of the Apache License at
15
- ###
15
+ ###
16
16
  ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
17
+ ###
18
18
  ### Unless required by applicable law or agreed to in writing, software
19
19
  ### distributed under the Apache License with the above modification is
20
20
  ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
21
  ### KIND, either express or implied. See the Apache License for the specific
22
22
  ### language governing permissions and limitations under the Apache License.
23
- ###
23
+ ###
24
24
  ###
25
25
 
26
26
  ###
27
27
  module JSS
28
-
28
+
29
29
  #####################################
30
30
  ### Module Variables
31
31
  #####################################
@@ -34,61 +34,66 @@ module JSS
34
34
  ### Module Methods
35
35
  #####################################
36
36
 
37
-
37
+
38
38
  #####################################
39
39
  ### Classes
40
40
  #####################################
41
41
 
42
- ###
42
+ ###
43
43
  ### A Site in the JSS.
44
44
  ###
45
45
  ### These are simple, in that they only have an ID and a name.
46
46
  ###
47
47
  ### @see JSS::APIObject
48
- ###
48
+ ###
49
49
  class Site < JSS::APIObject
50
-
50
+
51
51
  #####################################
52
52
  ### Mix-Ins
53
53
  #####################################
54
54
  include JSS::Creatable
55
55
  include JSS::Updatable
56
-
56
+
57
57
  #####################################
58
58
  ### Class Methods
59
59
  #####################################
60
-
60
+
61
61
  #####################################
62
62
  ### Class Constants
63
63
  #####################################
64
-
64
+
65
65
  ### The base for REST resources of this class
66
66
  RSRC_BASE = "sites"
67
-
67
+
68
68
  ### the hash key used for the JSON list output of all objects in the JSS
69
69
  RSRC_LIST_KEY = :sites
70
-
70
+
71
71
  ### The hash key used for the JSON object output.
72
72
  ### It's also used in various error messages
73
73
  RSRC_OBJECT_KEY = :site
74
-
74
+
75
75
  ### these keys, as well as :id and :name, are present in valid API JSON data for this class
76
76
  VALID_DATA_KEYS = []
77
-
77
+
78
+ # the object type for this object in
79
+ # the object history table.
80
+ # See {APIObject#add_object_history_entry}
81
+ OBJECT_HISTORY_OBJECT_TYPE = 44
82
+
78
83
  #####################################
79
84
  ### Attributes
80
85
  #####################################
81
-
86
+
82
87
  #####################################
83
- ### Constructor
88
+ ### Constructor
84
89
  #####################################
85
-
90
+
86
91
 
87
92
  #####################################
88
93
  ### Public Instance Methods
89
94
  #####################################
90
-
91
-
95
+
96
+
92
97
  end # class site
93
-
98
+
94
99
  end # module