Module: Xolo::Admin::JamfPro
- Defined in:
- lib/xolo/admin/jamf_pro.rb
Overview
Stuff that works with data from the Jamf Pro server via the Xolo Server
Constant Summary collapse
- JAMF_ROUTE_BASE =
Constants
'/jamf'- PACKAGE_NAME_ROUTE =
Xolo server route to the list of package names
"#{JAMF_ROUTE_BASE}/package-names"- COMPUTER_GROUP_NAME_ROUTE =
Xolo server route to the list of computer group names
"#{JAMF_ROUTE_BASE}/computer-group-names"- CATEGORY_NAME_ROUTE =
Xolo server route to the list available categories
"#{JAMF_ROUTE_BASE}/category-names"- AVAILABLE_TITLES_ROUTE =
Xolo server route to the list of available titles for subscription
"#{JAMF_ROUTE_BASE}/available-titles-for-subscription"
Class Method Summary collapse
-
.extended(extender) ⇒ Object
when this module is extended.
-
.included(includer) ⇒ Object
when this module is included.
Instance Method Summary collapse
-
#jamf_available_titles ⇒ Array<String>
Data about all titles available for subscription in Jamf Pro.
-
#jamf_category_names ⇒ Array<String>
The names of all Categories in Jamf Pro.
-
#jamf_computer_group_names ⇒ Array<String>
The names of all ComputerGroup objects in Jamf Pro.
-
#jamf_package_names ⇒ Array<String>
The names of all Package objects in Jamf Pro.
-
#jamf_patch_sources_with_available_titles ⇒ Array<String>
All Patch Sources with any available titles in Jamf Pro.
Class Method Details
.extended(extender) ⇒ Object
when this module is extended
48 49 50 |
# File 'lib/xolo/admin/jamf_pro.rb', line 48 def self.extended(extender) Xolo.verbose_extend extender, self end |
.included(includer) ⇒ Object
when this module is included
43 44 45 |
# File 'lib/xolo/admin/jamf_pro.rb', line 43 def self.included(includer) Xolo.verbose_include includer, self end |
Instance Method Details
#jamf_available_titles ⇒ Array<String>
Returns data about all titles available for subscription in Jamf Pro.
76 77 78 |
# File 'lib/xolo/admin/jamf_pro.rb', line 76 def jamf_available_titles @jamf_available_titles ||= server_cnx.get(AVAILABLE_TITLES_ROUTE).body end |
#jamf_category_names ⇒ Array<String>
Returns the names of all Categories in Jamf Pro.
70 71 72 |
# File 'lib/xolo/admin/jamf_pro.rb', line 70 def jamf_category_names @jamf_category_names ||= server_cnx.get(CATEGORY_NAME_ROUTE).body end |
#jamf_computer_group_names ⇒ Array<String>
Returns the names of all ComputerGroup objects in Jamf Pro.
64 65 66 |
# File 'lib/xolo/admin/jamf_pro.rb', line 64 def jamf_computer_group_names @jamf_computer_group_names ||= server_cnx.get(COMPUTER_GROUP_NAME_ROUTE).body end |
#jamf_package_names ⇒ Array<String>
Returns the names of all Package objects in Jamf Pro.
58 59 60 |
# File 'lib/xolo/admin/jamf_pro.rb', line 58 def jamf_package_names @jamf_package_names ||= server_cnx.get(PACKAGE_NAME_ROUTE).body end |
#jamf_patch_sources_with_available_titles ⇒ Array<String>
Returns All Patch Sources with any available titles in Jamf Pro.
81 82 83 |
# File 'lib/xolo/admin/jamf_pro.rb', line 81 def jamf_patch_sources_with_available_titles @jamf_patch_sources_with_available_titles ||= jamf_available_titles.map { |t| t[:source_name] }.sort.uniq end |