Class: Xolo::Server::Title

Inherits:
Core::BaseClasses::Title
  • Object
show all
Includes:
Helpers::JamfPro, Helpers::Log, Helpers::Notification, Helpers::TitleEditor, Mixins::Changelog, Mixins::TitleJamfAccess, Mixins::TitleTedAccess
Defined in:
lib/xolo/server/title.rb

Overview

A Title in Xolo, as used on the server

The code in this file mostly deals with the data on the Xolo server itself, and general methods for manipulating the title.

Code for interacting with the Title Editor and Jamf Pro are in the helpers and mixins.

NOTE be sure to only instantiate these using the servers 'instantiate_title' method, or else they might not have all the correct innards

Constant Summary collapse

TITLES_DIR =

On the server, xolo titles are represented by directories in this directory, named with the title name.

So a title 'foobar' would have a directory (Xolo::Server::DATA_DIR)/titles/foobar/ and in there will be a file foobar.json with the data for the Title instance itself

Also in there will be a 'versions' dir containing json files for each version of the title. See Version

Xolo::Server::DATA_DIR + 'titles'
NEW_TITLE_CURRENT_VERSION =

when creating new titles in the title editor, This is the 'currentVersion', which is required when creating. When the first version/patch is added, the title's value for this will be updated.

'0.0.0'
VERSION_SCRIPT_FILENAME =

If a title has a 'version_script' the the contents are stored in the title dir in a file with this name

'version-script'
UNINSTALL_SCRIPT_FILENAME =

If a title is uninstallable, it will have a script in Jamf, which is also saved in this file on the xolo server.

'uninstall-script'
JAMF_INSTALLED_GROUP_NAME_SUFFIX =
'installed'
JAMF_FROZEN_GROUP_NAME_SUFFIX =
'frozen'
JAMF_MANUAL_INSTALL_RELEASED_POL_SUFFIX =
'install'
JAMF_UNINSTALL_SUFFIX =
'uninstall'
JAMF_EXPIRE_SUFFIX =
'expire'
CLIENT_EXPIRE_COMMAND =

the expire policy will run this client command, appending the title We don't specify a full path so that localized installations will work as long as its in roots default path e.g. /usr/local/bin vs /usr/local/pixar/bin

'xolo expire'
SELF_SERVICE_ICON_FILENAME =

When we are given a Self Service icon for the title, we might not be ready to upload it to jamf, cuz until we have a version to pilot, there's nothing IN jamf. So we always store it locally in this file inside the title dir. The extension from the original file will be appended, e.g. '.png'

'self-service-icon'
JPAPI_PATCH_TITLE_RSRC =

The JPAPI endpoint for Patch Titles.

ruby-jss still uses the Classic API for Patch Titles, and won't by migrated to JPAPI until Jamf fully implements all aspects of patch management to JPAPI. As of this writing, that's not the case. But, the JPAPI endpoint for Patch Title Reporting returns more detailed data than the Classic API, so we use it here, and will keep using it as we move forward.

This is the top-level endpoint for all patch titles, see JPAPI_PATCH_REPORT_RSRC for the reporting endpoint below it.

TODO: Remove this and update relevant methods when ruby-jss is updated to use JPAPI for Patch Titles..

'v2/patch-software-title-configurations'
JPAPI_PATCH_REPORT_RSRC =

The JPAPI endpoint for patch reporting. The JPAPI_PATCH_TITLE_RSRC is appended with "//#JPAPI_PATCH_REPORT_RSRC" to get the URL for the patch report for a specific title.

TODO: Remove this and update relevant methods when ruby-jss is updated to use JPAPI for Patch Titles..

'patch-report'
SELF_SERVICE_INSTALL_BTN_TEXT =
'Install'

Constants included from Mixins::Changelog

Mixins::Changelog::TITLE_CHANGELOG_FILENAME

Constants included from Helpers::Notification

Helpers::Notification::ALERT_TOOL_EMAIL_PREFIX, Helpers::Notification::DFT_EMAIL_FROM

Constants included from Helpers::JamfPro

Helpers::JamfPro::PATCH_REPORT_JPAPI_PAGE_SIZE, Helpers::JamfPro::PATCH_REPORT_UNKNOWN_VERSION

Instance Attribute Summary collapse