jss-api 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.md +4 -0
- data/LICENSE.txt +174 -0
- data/README.md +368 -0
- data/THANKS.md +6 -0
- data/lib/jss-api.rb +549 -0
- data/lib/jss-api/api_connection.rb +326 -0
- data/lib/jss-api/api_object.rb +590 -0
- data/lib/jss-api/api_object/advanced_search.rb +389 -0
- data/lib/jss-api/api_object/advanced_search/advanced_computer_search.rb +95 -0
- data/lib/jss-api/api_object/advanced_search/advanced_mobile_device_search.rb +96 -0
- data/lib/jss-api/api_object/advanced_search/advanced_user_search.rb +95 -0
- data/lib/jss-api/api_object/building.rb +92 -0
- data/lib/jss-api/api_object/category.rb +147 -0
- data/lib/jss-api/api_object/computer.rb +852 -0
- data/lib/jss-api/api_object/creatable.rb +98 -0
- data/lib/jss-api/api_object/criteriable.rb +189 -0
- data/lib/jss-api/api_object/criteriable/criteria.rb +231 -0
- data/lib/jss-api/api_object/criteriable/criterion.rb +228 -0
- data/lib/jss-api/api_object/department.rb +93 -0
- data/lib/jss-api/api_object/distribution_point.rb +490 -0
- data/lib/jss-api/api_object/extendable.rb +221 -0
- data/lib/jss-api/api_object/extension_attribute.rb +457 -0
- data/lib/jss-api/api_object/extension_attribute/computer_extension_attribute.rb +362 -0
- data/lib/jss-api/api_object/extension_attribute/mobile_device_extension_attribute.rb +189 -0
- data/lib/jss-api/api_object/extension_attribute/user_extension_attribute.rb +117 -0
- data/lib/jss-api/api_object/group.rb +380 -0
- data/lib/jss-api/api_object/group/computer_group.rb +124 -0
- data/lib/jss-api/api_object/group/mobile_device_group.rb +139 -0
- data/lib/jss-api/api_object/group/user_group.rb +139 -0
- data/lib/jss-api/api_object/ldap_server.rb +535 -0
- data/lib/jss-api/api_object/locatable.rb +268 -0
- data/lib/jss-api/api_object/matchable.rb +97 -0
- data/lib/jss-api/api_object/mobile_device.rb +556 -0
- data/lib/jss-api/api_object/netboot_server.rb +148 -0
- data/lib/jss-api/api_object/network_segment.rb +414 -0
- data/lib/jss-api/api_object/package.rb +760 -0
- data/lib/jss-api/api_object/peripheral.rb +335 -0
- data/lib/jss-api/api_object/peripheral_type.rb +295 -0
- data/lib/jss-api/api_object/policy.rb +882 -0
- data/lib/jss-api/api_object/purchasable.rb +316 -0
- data/lib/jss-api/api_object/removable_macaddr.rb +98 -0
- data/lib/jss-api/api_object/scopable.rb +136 -0
- data/lib/jss-api/api_object/scopable/scope.rb +621 -0
- data/lib/jss-api/api_object/script.rb +631 -0
- data/lib/jss-api/api_object/site.rb +93 -0
- data/lib/jss-api/api_object/software_update_server.rb +109 -0
- data/lib/jss-api/api_object/updatable.rb +117 -0
- data/lib/jss-api/api_object/uploadable.rb +138 -0
- data/lib/jss-api/api_object/user.rb +272 -0
- data/lib/jss-api/client.rb +500 -0
- data/lib/jss-api/compatibility.rb +66 -0
- data/lib/jss-api/composer.rb +171 -0
- data/lib/jss-api/configuration.rb +301 -0
- data/lib/jss-api/db_connection.rb +243 -0
- data/lib/jss-api/exceptions.rb +83 -0
- data/lib/jss-api/ruby_extensions.rb +35 -0
- data/lib/jss-api/ruby_extensions/filetest.rb +43 -0
- data/lib/jss-api/ruby_extensions/hash.rb +79 -0
- data/lib/jss-api/ruby_extensions/ipaddr.rb +91 -0
- data/lib/jss-api/ruby_extensions/pathname.rb +77 -0
- data/lib/jss-api/ruby_extensions/string.rb +43 -0
- data/lib/jss-api/ruby_extensions/time.rb +63 -0
- data/lib/jss-api/server.rb +108 -0
- data/lib/jss-api/version.rb +31 -0
- metadata +219 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
############################################
|
26
|
+
### A few augmentations to IPAddr handling.
|
27
|
+
###
|
28
|
+
class IPAddr
|
29
|
+
|
30
|
+
### Convert starting and ending IPv4 IP addresses (either Strings or IPAddrs)
|
31
|
+
### into a single masked IPv4 IPAddr
|
32
|
+
###
|
33
|
+
### @param starting[Strings, IPAddr] the starting IP address
|
34
|
+
###
|
35
|
+
### @param ending[Strings, IPAddr] the ending IP address
|
36
|
+
###
|
37
|
+
### @return [IPAddr] the IP address range represented as a masked IPv4 address
|
38
|
+
###
|
39
|
+
### @example
|
40
|
+
### IPAddr.jss_masked_v4addr '10.0.0.0', '10.0.0.255' # => #<IPAddr: IPv4:10.0.0.0/255.255.255.0>
|
41
|
+
###
|
42
|
+
def self.jss_masked_v4addr(starting,ending)
|
43
|
+
IPAddr.new "#{starting}/#{self.jss_cidr_from_ends(starting,ending)}"
|
44
|
+
end #self.jss_masked_v4addr(starting,ending)
|
45
|
+
|
46
|
+
### Given starting and ending IPv4 IP addresses (either Strings or IPAddrs)
|
47
|
+
### return the CIDR notation routing prefix mask
|
48
|
+
###
|
49
|
+
### @param starting[Strings, IPAddr] the starting IP address
|
50
|
+
###
|
51
|
+
### @param ending[Strings, IPAddr] the ending IP address
|
52
|
+
###
|
53
|
+
### @return [FixNum] the CIDR notation routing prefix mask
|
54
|
+
###
|
55
|
+
### @example
|
56
|
+
### IPAddr.jss_cidr_from_ends '10.0.0.0', '10.0.0.255' # => 24
|
57
|
+
###
|
58
|
+
def self.jss_cidr_from_ends(starting,ending)
|
59
|
+
|
60
|
+
starting = IPAddr.new(starting) unless starting.kind_of? IPAddr
|
61
|
+
ending = IPAddr.new(ending) unless ending.kind_of? IPAddr
|
62
|
+
|
63
|
+
### how many possible addresses in the range?
|
64
|
+
num_addrs = ending.to_i - starting.to_i + 1
|
65
|
+
|
66
|
+
### convert the number of possible addresses to
|
67
|
+
### binary then subtract the number of bits from
|
68
|
+
### the full length of an IPv4 addr
|
69
|
+
### (32 bits) and that gives the CIDR prefix
|
70
|
+
return 32 - num_addrs.to_s(2).length + 1
|
71
|
+
|
72
|
+
end #self.get_cidr(starting,ending)
|
73
|
+
|
74
|
+
### Convert a starting address (either String or IPAddr) and a
|
75
|
+
### CIDR notation routing prefix mask into the IPv4 address
|
76
|
+
### of at the end of the range of addresses.
|
77
|
+
###
|
78
|
+
### @param starting[Strings, IPAddr] the starting IP address
|
79
|
+
###
|
80
|
+
### @param cidr[FixNum] the CIDR mask
|
81
|
+
###
|
82
|
+
### @return [IPAddr] the ending IP address of the range.
|
83
|
+
###
|
84
|
+
### @example
|
85
|
+
### IPAddr.jss_ending_address '10.0.0.0', 24 # => #<IPAddr: IPv4:10.0.0.255>
|
86
|
+
###
|
87
|
+
def self.jss_ending_address(starting, cidr)
|
88
|
+
IPAddr.new( "#{starting}/#{cidr}").to_range.max
|
89
|
+
end # ending_address
|
90
|
+
|
91
|
+
end # Class IPAddr
|
@@ -0,0 +1,77 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
############################################
|
26
|
+
### Some handy additions to the Pathname class.
|
27
|
+
### Why aren't they there already?
|
28
|
+
###
|
29
|
+
class Pathname
|
30
|
+
|
31
|
+
### Is this a real file rather than a symlink?
|
32
|
+
### @see FileTest.real_file
|
33
|
+
def jss_real_file?
|
34
|
+
FileTest.jss_real_file? self
|
35
|
+
end # real_file?
|
36
|
+
|
37
|
+
### Copy a path to a destination
|
38
|
+
### @see FileUtils.cp
|
39
|
+
def jss_cp(dest, options = {})
|
40
|
+
FileUtils.cp @path, dest.to_s, options
|
41
|
+
end # cp
|
42
|
+
|
43
|
+
### Recursively copy this path to a destination
|
44
|
+
### @see FileUtils.cp_r
|
45
|
+
def jss_cp_r(dest, options = {})
|
46
|
+
FileUtils.cp_r @path, dest.to_s, options
|
47
|
+
end # cp
|
48
|
+
|
49
|
+
### Write some string content to a file.
|
50
|
+
###
|
51
|
+
### Simpler than always using an open('w') block
|
52
|
+
### *CAUTION* this overwrites files!
|
53
|
+
###
|
54
|
+
def jss_save(content)
|
55
|
+
self.open('w'){|f| f.write content.to_s}
|
56
|
+
end
|
57
|
+
|
58
|
+
### Append some string content to a file.
|
59
|
+
###
|
60
|
+
### Simpler than always using an open('a') block
|
61
|
+
###
|
62
|
+
def jss_append(content)
|
63
|
+
self.open('a'){|f| f.write content.to_s}
|
64
|
+
end
|
65
|
+
|
66
|
+
### Touching can be good
|
67
|
+
###
|
68
|
+
### @see FileUtils.touch
|
69
|
+
def jss_touch
|
70
|
+
FileUtils.touch @path
|
71
|
+
end
|
72
|
+
|
73
|
+
### Pathname should use FileUtils.chown, not File.chown
|
74
|
+
def jss_chown(u,g)
|
75
|
+
FileUtils.chown u, g, @path
|
76
|
+
end
|
77
|
+
end # class Pathname
|
@@ -0,0 +1,43 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
###
|
26
|
+
class String
|
27
|
+
|
28
|
+
### Convert the strings "true" and "false"
|
29
|
+
### (after stripping whitespace and downcasing)
|
30
|
+
### to TrueClass and FalseClass respectively
|
31
|
+
###
|
32
|
+
### Return nil if any other string.
|
33
|
+
###
|
34
|
+
### @return [Boolean,nil] the boolean value
|
35
|
+
###
|
36
|
+
def jss_to_bool
|
37
|
+
case self.strip.downcase
|
38
|
+
when "true" then return true
|
39
|
+
when "false" then return false
|
40
|
+
else return nil
|
41
|
+
end # case
|
42
|
+
end # to bool
|
43
|
+
end # class
|
@@ -0,0 +1,63 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
############################################
|
26
|
+
### The JSS API can take incoming timestamp data in three formats:
|
27
|
+
### - plain date: YYYY-mm-dd HH:MM:SS, which is assumed to be in the local timezone
|
28
|
+
### - UTC date: YYYY-mm-ddTHH:MM:SS.mmm [+-]zzzz, the local time with milliseconds and the timezone offset
|
29
|
+
### - Unix epoch with milliseconds, nnnnnnnnnnnnn, which like all epoch times, is UTC
|
30
|
+
###
|
31
|
+
### Here we extend Time to return the three formats for use in XML data to pass
|
32
|
+
### back to the API. The API xml works with any of the formats, in appropriate elements.
|
33
|
+
###
|
34
|
+
### Generally this gem uses the epoch format for passing values back to the API, just to help avoid
|
35
|
+
### timezone weirdness, but any should work.
|
36
|
+
###
|
37
|
+
### When reading from the API, all three formats are returned in different xml elements,
|
38
|
+
### and the APIObjects in the gem will use the epoch format and the JSS.epoch_to_time method (q.v.) to store
|
39
|
+
### the data as a Ruby Time.
|
40
|
+
###
|
41
|
+
class Time
|
42
|
+
|
43
|
+
### @return [Integer] the milliseconds of the Time
|
44
|
+
def jss_msec
|
45
|
+
(self.usec/1000.0).round
|
46
|
+
end
|
47
|
+
|
48
|
+
### @return [Integer] The Time as a unix epoch with milliseconds appended
|
49
|
+
def to_jss_epoch
|
50
|
+
(self.strftime('%s') + self.jss_msec.to_s.ljust(3,'0')).to_i
|
51
|
+
end
|
52
|
+
|
53
|
+
### @return [String] the Time formatted for a plain JSS XML date element
|
54
|
+
def to_jss_date
|
55
|
+
self.strftime '%Y-%m-%d %H:%M:%S'
|
56
|
+
end
|
57
|
+
|
58
|
+
### @return [String] the Time formatted for a JSS UTC XML date element
|
59
|
+
def to_jss_utc
|
60
|
+
self.strftime("%Y-%m-%dT%H:%M:%S.#{self.jss_msec}%z")
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
###
|
26
|
+
module JSS
|
27
|
+
|
28
|
+
### A class representing a JSS Server.
|
29
|
+
###
|
30
|
+
### The {JSS::APIConnection} instance has a JSS::Server instance in its @server attribute.
|
31
|
+
### It is created fresh every time {APIConnection#connect} is called.
|
32
|
+
###
|
33
|
+
### That's the only time it should be instantiated, and all access should be through
|
34
|
+
### {JSS::API.server}
|
35
|
+
###
|
36
|
+
class Server
|
37
|
+
|
38
|
+
#####################################
|
39
|
+
### Attributes
|
40
|
+
#####################################
|
41
|
+
|
42
|
+
### @return [String] the organization to which the server is licensed
|
43
|
+
attr_reader :organization
|
44
|
+
|
45
|
+
|
46
|
+
### @return [String] the activation code for the server licence
|
47
|
+
attr_reader :activation_code
|
48
|
+
|
49
|
+
### @return [String] the type of server licence
|
50
|
+
attr_reader :license_type
|
51
|
+
|
52
|
+
### @return [String] the license product name
|
53
|
+
attr_reader :product
|
54
|
+
|
55
|
+
### @return [String] The version of the JSS. See the method JSS.parse_jss_version
|
56
|
+
attr_reader :version
|
57
|
+
|
58
|
+
### @return [Integer]
|
59
|
+
attr_reader :major_version
|
60
|
+
|
61
|
+
### @return [Integer]
|
62
|
+
attr_reader :minor_version
|
63
|
+
|
64
|
+
### @return [Integer]
|
65
|
+
attr_reader :revision_version
|
66
|
+
|
67
|
+
### @return [String]
|
68
|
+
attr_reader :raw_version
|
69
|
+
|
70
|
+
#####################################
|
71
|
+
### Instance Methods
|
72
|
+
#####################################
|
73
|
+
|
74
|
+
###
|
75
|
+
### Initialize!
|
76
|
+
###
|
77
|
+
def initialize
|
78
|
+
begin
|
79
|
+
|
80
|
+
# the jssuser resource is readable by anyone with a JSS acct
|
81
|
+
# regardless of their permissions.
|
82
|
+
# However, it's marked as 'deprecated'. Hopefully jamf will
|
83
|
+
# keep this basic level of info available for basic authentication
|
84
|
+
# and JSS version checking.
|
85
|
+
ju = JSS::API.get_rsrc('jssuser')[:user]
|
86
|
+
@license_type = ju[:license_type]
|
87
|
+
@product = ju[:product]
|
88
|
+
@raw_version = ju[:version]
|
89
|
+
parsed = JSS.parse_jss_version(@raw_version)
|
90
|
+
@major_version = parsed[:major]
|
91
|
+
@minor_version = parsed[:minor]
|
92
|
+
@revision_version = parsed[:revision]
|
93
|
+
@version = parsed[:version]
|
94
|
+
|
95
|
+
rescue RestClient::Request::Unauthorized
|
96
|
+
raise JSS::InvalidConnectionError, "Incorrect JSS username or password for '#{JSS::API.jss_user}'."
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
##### Aliases
|
103
|
+
alias institution organization
|
104
|
+
alias product_name product
|
105
|
+
|
106
|
+
end # class server
|
107
|
+
|
108
|
+
end # module
|
@@ -0,0 +1,31 @@
|
|
1
|
+
### Copyright 2014 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
###
|
26
|
+
module JSS
|
27
|
+
|
28
|
+
### The version of the JSS ruby gem
|
29
|
+
VERSION = "0.5.4"
|
30
|
+
|
31
|
+
end # module
|
metadata
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jss-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 3
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Chris Lasell
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2014-10-20 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: plist
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: ruby-mysql
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: mime-types
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rest-client
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: json
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: net-ldap
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
102
|
+
type: :runtime
|
103
|
+
version_requirements: *id006
|
104
|
+
description: " The JSS Gem is a framework for interacting with the REST API of the\n JAMF Software Server (JSS), the core of the Casper Suite from JAMF Software, LLC.\n JSS API objects are implemented as Ruby classes, and interact with each oher to\n allow simpler automation of Casper-related tasks. For details see README.md.\"\n"
|
105
|
+
email: chrisl@pixar.com
|
106
|
+
executables: []
|
107
|
+
|
108
|
+
extensions: []
|
109
|
+
|
110
|
+
extra_rdoc_files:
|
111
|
+
- README.md
|
112
|
+
- LICENSE.txt
|
113
|
+
- CHANGES.md
|
114
|
+
- THANKS.md
|
115
|
+
files:
|
116
|
+
- lib/jss-api/api_connection.rb
|
117
|
+
- lib/jss-api/api_object/advanced_search/advanced_computer_search.rb
|
118
|
+
- lib/jss-api/api_object/advanced_search/advanced_mobile_device_search.rb
|
119
|
+
- lib/jss-api/api_object/advanced_search/advanced_user_search.rb
|
120
|
+
- lib/jss-api/api_object/advanced_search.rb
|
121
|
+
- lib/jss-api/api_object/building.rb
|
122
|
+
- lib/jss-api/api_object/category.rb
|
123
|
+
- lib/jss-api/api_object/computer.rb
|
124
|
+
- lib/jss-api/api_object/creatable.rb
|
125
|
+
- lib/jss-api/api_object/criteriable/criteria.rb
|
126
|
+
- lib/jss-api/api_object/criteriable/criterion.rb
|
127
|
+
- lib/jss-api/api_object/criteriable.rb
|
128
|
+
- lib/jss-api/api_object/department.rb
|
129
|
+
- lib/jss-api/api_object/distribution_point.rb
|
130
|
+
- lib/jss-api/api_object/extendable.rb
|
131
|
+
- lib/jss-api/api_object/extension_attribute/computer_extension_attribute.rb
|
132
|
+
- lib/jss-api/api_object/extension_attribute/mobile_device_extension_attribute.rb
|
133
|
+
- lib/jss-api/api_object/extension_attribute/user_extension_attribute.rb
|
134
|
+
- lib/jss-api/api_object/extension_attribute.rb
|
135
|
+
- lib/jss-api/api_object/group/computer_group.rb
|
136
|
+
- lib/jss-api/api_object/group/mobile_device_group.rb
|
137
|
+
- lib/jss-api/api_object/group/user_group.rb
|
138
|
+
- lib/jss-api/api_object/group.rb
|
139
|
+
- lib/jss-api/api_object/ldap_server.rb
|
140
|
+
- lib/jss-api/api_object/locatable.rb
|
141
|
+
- lib/jss-api/api_object/matchable.rb
|
142
|
+
- lib/jss-api/api_object/mobile_device.rb
|
143
|
+
- lib/jss-api/api_object/netboot_server.rb
|
144
|
+
- lib/jss-api/api_object/network_segment.rb
|
145
|
+
- lib/jss-api/api_object/package.rb
|
146
|
+
- lib/jss-api/api_object/peripheral.rb
|
147
|
+
- lib/jss-api/api_object/peripheral_type.rb
|
148
|
+
- lib/jss-api/api_object/policy.rb
|
149
|
+
- lib/jss-api/api_object/purchasable.rb
|
150
|
+
- lib/jss-api/api_object/removable_macaddr.rb
|
151
|
+
- lib/jss-api/api_object/scopable/scope.rb
|
152
|
+
- lib/jss-api/api_object/scopable.rb
|
153
|
+
- lib/jss-api/api_object/script.rb
|
154
|
+
- lib/jss-api/api_object/site.rb
|
155
|
+
- lib/jss-api/api_object/software_update_server.rb
|
156
|
+
- lib/jss-api/api_object/updatable.rb
|
157
|
+
- lib/jss-api/api_object/uploadable.rb
|
158
|
+
- lib/jss-api/api_object/user.rb
|
159
|
+
- lib/jss-api/api_object.rb
|
160
|
+
- lib/jss-api/client.rb
|
161
|
+
- lib/jss-api/compatibility.rb
|
162
|
+
- lib/jss-api/composer.rb
|
163
|
+
- lib/jss-api/configuration.rb
|
164
|
+
- lib/jss-api/db_connection.rb
|
165
|
+
- lib/jss-api/exceptions.rb
|
166
|
+
- lib/jss-api/ruby_extensions/filetest.rb
|
167
|
+
- lib/jss-api/ruby_extensions/hash.rb
|
168
|
+
- lib/jss-api/ruby_extensions/ipaddr.rb
|
169
|
+
- lib/jss-api/ruby_extensions/pathname.rb
|
170
|
+
- lib/jss-api/ruby_extensions/string.rb
|
171
|
+
- lib/jss-api/ruby_extensions/time.rb
|
172
|
+
- lib/jss-api/ruby_extensions.rb
|
173
|
+
- lib/jss-api/server.rb
|
174
|
+
- lib/jss-api/version.rb
|
175
|
+
- lib/jss-api.rb
|
176
|
+
- README.md
|
177
|
+
- LICENSE.txt
|
178
|
+
- CHANGES.md
|
179
|
+
- THANKS.md
|
180
|
+
homepage: http://pixaranimationstudios.github.io/jss-api-gem/index.html
|
181
|
+
licenses:
|
182
|
+
- Modified Apache-2.0
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options:
|
185
|
+
- --title
|
186
|
+
- JSS
|
187
|
+
- --line-numbers
|
188
|
+
- --main
|
189
|
+
- README.md
|
190
|
+
require_paths:
|
191
|
+
- lib
|
192
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
hash: 3
|
198
|
+
segments:
|
199
|
+
- 0
|
200
|
+
version: "0"
|
201
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
203
|
+
requirements:
|
204
|
+
- - ">="
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
hash: 3
|
207
|
+
segments:
|
208
|
+
- 0
|
209
|
+
version: "0"
|
210
|
+
requirements: []
|
211
|
+
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 1.8.25
|
214
|
+
signing_key:
|
215
|
+
specification_version: 3
|
216
|
+
summary: A Ruby interface to the Casper Suite's JSS API
|
217
|
+
test_files: []
|
218
|
+
|
219
|
+
has_rdoc: true
|