ruby-jss 1.6.0 → 2.0.0a11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/CHANGES.md +85 -5
- data/README-2.0.0.md +324 -0
- data/README.md +58 -34
- data/bin/cgrouper +3 -3
- data/bin/jamfHelperBackgrounder +2 -2
- data/bin/netseg-update +3 -3
- data/data/ruby-jss.conf.example +1 -1
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/account.rb +29 -22
- data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_computer_search.rb +6 -6
- data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_mobile_device_search.rb +6 -6
- data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_user_search.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/building.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/categorizable.rb +10 -10
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/category.rb +17 -15
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/computer.rb +221 -111
- data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/computer_extension_attribute.rb +19 -19
- data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/computer_group.rb +8 -8
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/computer_invitation.rb +8 -8
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/creatable.rb +22 -24
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable/criteria.rb +24 -24
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable/criterion.rb +15 -15
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable.rb +25 -28
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/department.rb +7 -7
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding.rb +40 -40
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/active_directory.rb +47 -47
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/admitmac.rb +56 -56
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/centrify.rb +15 -15
- data/lib/{jss/api_object → jamf/api/classic/api_objects/directory_binding_type}/directory_binding_type.rb +2 -25
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/open_directory.rb +19 -19
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/powerbroker_identity_services.rb +1 -1
- data/lib/jamf/api/classic/api_objects/directory_binding_type.rb +47 -0
- data/lib/{jss/api_object/disk_encryption_configurations.rb → jamf/api/classic/api_objects/disk_encryption_configuration.rb} +14 -14
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/distribution_point.rb +41 -35
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/dock_item.rb +12 -12
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/ebook.rb +3 -3
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/extendable.rb +23 -23
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/ibeacon.rb +15 -15
- data/lib/{jss/api_object/self_servable → jamf/api/classic/api_objects}/icon.rb +8 -8
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/ldap_server.rb +45 -34
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/locatable.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/mac_application.rb +18 -18
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/audit_event.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/casper_imaging_log.rb +4 -5
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/casper_remote_log.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/computer_usage_log.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/ebook.rb +7 -7
- data/lib/{jss/api_object/management_history/hashlike.rb → jamf/api/classic/api_objects/management_history/hash_like.rb} +3 -3
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mac_app_store_app.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mdm_command.rb +9 -9
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mobile_device_app.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/policy_log.rb +5 -5
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/screen_sharing_log.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/user_location_change.rb +4 -4
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history.rb +226 -189
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/matchable.rb +9 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/mdm.rb +256 -151
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/mobile_device.rb +55 -39
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/mobile_device_application.rb +77 -35
- data/lib/{jss/api_object/configuration_profile → jamf/api/classic/api_objects}/mobile_device_configuration_profile.rb +7 -10
- data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/mobile_device_extension_attribute.rb +19 -19
- data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/mobile_device_group.rb +8 -8
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/netboot_server.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/network_segment.rb +75 -61
- data/lib/{jss/api_object/configuration_profile → jamf/api/classic/api_objects}/osx_configuration_profile.rb +7 -7
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/package.rb +83 -74
- data/lib/{jss/api_object/patch_source → jamf/api/classic/api_objects}/patch_external_source.rb +9 -9
- data/lib/{jss/api_object/patch_source → jamf/api/classic/api_objects}/patch_internal_source.rb +5 -5
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_policy.rb +70 -68
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_title/version.rb +15 -15
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_title.rb +76 -64
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/peripheral.rb +24 -24
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/peripheral_type.rb +20 -20
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/policy.rb +113 -112
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/printer.rb +52 -52
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/purchasable.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/removable_macaddr.rb +7 -7
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/restricted_software.rb +21 -22
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/scopable/scope.rb +69 -64
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/scopable.rb +11 -13
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/script.rb +22 -22
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/self_servable.rb +51 -49
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/sitable.rb +8 -8
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/site.rb +6 -6
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/software_update_server.rb +5 -5
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/updatable.rb +13 -13
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/uploadable.rb +71 -29
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/user.rb +18 -18
- data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/user_extension_attribute.rb +12 -12
- data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/user_group.rb +7 -7
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/vpp_account.rb +15 -15
- data/lib/{jss/api_object → jamf/api/classic/api_objects}/vppable.rb +5 -5
- data/lib/{jss/api_object/webhook.rb → jamf/api/classic/api_objects/web_hook.rb} +15 -15
- data/lib/{jss/api_object → jamf/api/classic/base_classes}/advanced_search.rb +36 -40
- data/lib/{jss → jamf/api/classic/base_classes}/api_object.rb +314 -274
- data/lib/{jss/api_object → jamf/api/classic/base_classes}/configuration_profile.rb +13 -16
- data/lib/{jss/api_object → jamf/api/classic/base_classes}/extension_attribute.rb +55 -59
- data/lib/{jss/api_object → jamf/api/classic/base_classes}/group.rb +45 -43
- data/lib/{jss/api_object → jamf/api/classic/base_classes}/patch_source.rb +107 -87
- data/lib/{jss → jamf/api/classic}/xml_workaround.rb +12 -12
- data/lib/jamf/api/connection/attributes.rb +177 -0
- data/lib/jamf/api/connection/cache.rb +148 -0
- data/lib/jamf/api/connection/classic_api.rb +287 -0
- data/lib/jamf/api/connection/connect.rb +491 -0
- data/lib/jamf/api/connection/constants.rb +106 -0
- data/lib/jamf/api/connection/default_connection.rb +103 -0
- data/lib/jamf/api/connection/jamf_pro_api.rb +170 -0
- data/lib/jamf/api/connection/jamf_pro_api_error.rb +109 -0
- data/lib/jamf/api/connection/token.rb +289 -99
- data/lib/jamf/api/connection.rb +186 -819
- data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +82 -0
- data/lib/jamf/api/jamf_pro/api_objects/device_enrollment.rb +358 -0
- data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +163 -0
- data/lib/jamf/api/jamf_pro/api_objects/jp_building.rb +116 -0
- data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +87 -0
- data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +608 -0
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/bulk_deletable.rb +2 -1
- data/lib/jamf/api/jamf_pro/mixins/change_log.rb +246 -0
- data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +762 -0
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/filterable.rb +21 -14
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/immutable.rb +6 -8
- data/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb +167 -0
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/lockable.rb +29 -3
- data/lib/jamf/api/jamf_pro/mixins/prestage.rb +356 -0
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/sortable.rb +7 -17
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/uncreatable.rb +2 -2
- data/lib/jamf/api/{mixins → jamf_pro/mixins}/undeletable.rb +2 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_preview_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_v2_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/account.rb +160 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +124 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v4.rb +118 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history.rb +161 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_summary.rb +132 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/admin_account.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search.rb +117 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_criteria_choices.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search.rb +117 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/android_details.rb +163 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_analytics_setting.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_dynamics_config.rb +134 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_path.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field.rb +115 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_settings.rb +105 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/apple_tv_details.rb +133 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/application_attributes.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/application_configuration.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +113 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/attributes.rb +101 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account.rb +159 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +159 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token_v1.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/authorization.rb +117 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +117 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_process_status.rb +116 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_request.rb +103 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_request.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_update.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_mappings.rb +158 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration.rb +147 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_request.rb +146 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_update.rb +132 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/branding_image_url.rb +87 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +138 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cache_settings.rb +150 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/categories_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/category.rb +104 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_details.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v1.rb +102 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v2.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_key.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_record.rb +147 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/classic_ldap_mappings.rb +169 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v2.rb +165 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v3.rb +135 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_request.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_response.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_pool_statistics.rb +175 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_status.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore.rb +104 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore_file.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_request.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_response.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_request.rb +152 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_response.rb +149 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_update.rb +149 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +103 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +128 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +373 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +121 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +132 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +144 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +121 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +176 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +231 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general_update.rb +113 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +265 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware_update.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +82 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_preferences.rb +166 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_settings.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_recovery_lock_password_response.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_response.rb +276 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_update_request.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +190 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_location.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +133 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system_update.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_overview.rb +180 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +146 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v2.rb +130 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +100 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +159 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +110 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +180 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +82 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +132 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/computers_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_profile.rb +103 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_search_results.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_candidate_request.rb +124 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_response.rb +123 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_status_response.rb +86 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_update_request.rb +110 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/country.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/country_codes.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/create_path.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/csa_token.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/current_account.rb +160 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/current_authorization.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/data_roaming_setting.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/database_password.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/day_of_week.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/delete_user_command.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/department.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/departments_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task.rb +130 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task_search_results.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_request.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_response.rb +105 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_search_results.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_update.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_request.rb +166 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_response.rb +163 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_update.rb +171 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_communication_settings.rb +129 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_compliance_information.rb +118 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +163 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_body.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +164 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage.rb +216 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +235 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/diagnostic_submission_setting.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook.rb +153 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_exclusions.rb +138 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_limitations.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_scope.rb +171 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enable_lost_mode_command.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/engage.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group.rb +123 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_preview.rb +135 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_v2.rb +133 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_branding_settings.rb +112 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependencies.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependency.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_ldap_group_access.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_ldap_auth.rb +122 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_list.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_sso_auth.rb +114 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_text.rb +113 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_v2.rb +116 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_process_text_object.rb +347 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings.rb +264 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v2.rb +274 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/export_field.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/export_parameters.rb +118 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute.rb +116 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute_v2.rb +117 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/external_recipient.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_delete.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/filter.rb +105 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/font_path.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v2.rb +105 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_ldap_auth.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_sso_auth.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_text.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +104 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_mappings.rb +139 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_request.rb +86 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_response.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results.rb +142 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/href_response.rb +169 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/icon_response.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name_v2.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ids.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/initialize.rb +134 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/initialize_v1.rb +134 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/install_package.rb +104 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/integer_wrapper.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/internal_recipient.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_information.rb +114 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_error.rb +124 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error_cause.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_success.rb +87 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column_result.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_invalid_csv_response.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record.rb +249 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +264 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_configuration.rb +130 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details.rb +256 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details_v2.rb +256 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_application_response.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_nation_credentials.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_package_response.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_server_url.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_version.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_protect_plan.rb +126 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/language_code.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_request.rb +100 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_response.rb +102 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_update.rb +100 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group_search_results.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_server.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile.rb +127 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/locale.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/location.rb +126 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +147 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +147 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_v2.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_configuration.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +113 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/markdown.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_client_type.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command.rb +110 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_request.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_state.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_type.rb +173 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_signing_certificate.rb +102 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_mappings.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_request.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_response.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/memcached_endpoints.rb +114 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device.rb +154 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application.rb +101 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v1.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v2.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details.rb +236 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_get_v2.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_v2.rb +254 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_extension_attribute_results.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_group.rb +97 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage.rb +137 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +176 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_params.rb +145 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results_v2.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_v2.rb +159 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/network.rb +172 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/network_v2.rb +180 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification.rb +97 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification_type.rb +141 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification_v1.rb +97 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history.rb +138 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +138 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +107 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/order_by.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/package_manifest.rb +149 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/parent_app.rb +131 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_ids_on_dashboard.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt.rb +103 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt_action.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log.rb +125 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_on_dashboard.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_summary.rb +147 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_version.rb +97 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/personal_hotspot_setting.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/plugin_path.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties_v1.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v2.rb +86 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependencies.rb +86 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependency.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment_v2.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +175 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +175 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response.rb +110 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +110 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_update.rb +114 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status_v2.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/process_texts_search_results.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_registration_request.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_settings_response.rb +142 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_updatable_settings_request.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/provisioning_profile.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing.rb +154 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing_v2.rb +154 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v2.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/recalculation_results.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/recipient.rb +95 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/recipients.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/reenrollment.rb +118 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_response.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_search_results.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/renew_mdm_profile_response.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/restart_device_command.rb +96 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/retry_patch_policy_params.rb +98 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/safelisted_apps.rb +85 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/script.rb +193 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/scripts_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/search_active_patch_history_params.rb +122 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/search_patch_policy_log_params.rb +122 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/security.rb +131 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/security_v2.rb +130 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_install_settings.rb +93 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_interaction_settings.rb +123 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_login_settings.rb +114 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_settings.rb +101 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/session.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_candidate_request.rb +109 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_details.rb +176 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_details_search_results.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_status.rb +99 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/set_recovery_lock_command.rb +83 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/settings_command.rb +168 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/shared_device_configuration.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/signature.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/site.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/smart_search_criterion.rb +119 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_configuration.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_patch_policy_summaries.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_update_settings.rb +89 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore.rb +129 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_cert_parse_response.rb +131 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_details.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_parse.rb +104 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response.rb +121 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response_with_details.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_with_details.rb +94 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_metadata_url.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_settings.rb +241 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/startup_status.rb +186 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/static_user_group.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_certificate_upload.rb +100 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_create.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_update.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_features.rb +106 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_request.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_response.rb +122 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/time_frame.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/time_zone.rb +108 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/tv_os_details.rb +133 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/udids.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_apple_tv.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios.rb +82 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios_v2.rb +82 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device.rb +123 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device_v2.rb +138 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_tv_os.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_attributes.rb +118 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_mappings.rb +194 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search.rb +113 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_request.rb +86 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_response.rb +92 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_ca_record.rb +148 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record_search_results.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_service_status.rb +84 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/verbose_package_deployment_response.rb +91 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/voice_roaming_setting.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content.rb +154 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location.rb +87 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_list_view.rb +172 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_patch.rb +112 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_post.rb +115 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_locations.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription.rb +87 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription_base.rb +128 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscriptions.rb +90 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_admin_account.rb +120 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_token_subscription.rb +124 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas/web_link.rb +88 -0
- data/lib/jamf/api/jamf_pro/oapi_schemas.rb +35 -0
- data/lib/{jss/ruby_extensions/string.rb → jamf/api/jamf_pro/other_classes/change_log_entry.rb} +12 -10
- data/lib/jamf/api/{attribute_classes → jamf_pro/other_classes}/ip_address.rb +2 -8
- data/lib/jamf/api/jamf_pro/other_classes/pager.rb +257 -0
- data/lib/jamf/api/{attribute_classes → jamf_pro/other_classes}/timestamp.rb +18 -14
- data/lib/jamf/{api/mixins/base_class.rb → base_class.rb} +8 -8
- data/lib/jamf/client/jamf_binary.rb +104 -98
- data/lib/jamf/client/jamf_helper.rb +263 -255
- data/lib/jamf/client/management_action.rb +71 -72
- data/lib/jamf/client.rb +15 -86
- data/lib/jamf/composer.rb +5 -5
- data/lib/jamf/configuration.rb +219 -196
- data/lib/jamf/{api/json_objects/prestage_sync_status.rb → constants.rb} +15 -32
- data/lib/{jss → jamf}/db_connection.rb +26 -34
- data/lib/{jpapi.rb → jamf/deprecations/deprecated_api_constant.rb} +3 -4
- data/lib/jamf/deprecations/deprecated_config_constant.rb +25 -0
- data/lib/jamf/exceptions.rb +14 -15
- data/lib/jamf/oapi_validate.rb +502 -0
- data/lib/jamf/ruby_extensions/array/predicates.rb +3 -1
- data/lib/jamf/ruby_extensions/array/utils.rb +2 -11
- data/lib/jamf/ruby_extensions/array.rb +1 -1
- data/lib/jamf/ruby_extensions/filetest/predicates.rb +2 -1
- data/lib/jamf/ruby_extensions/filetest.rb +1 -1
- data/lib/jamf/ruby_extensions/hash/{backports.rb → utils.rb} +53 -34
- data/lib/jamf/ruby_extensions/hash.rb +3 -3
- data/lib/jamf/ruby_extensions/ipaddr/utils.rb +7 -4
- data/lib/jamf/ruby_extensions/ipaddr.rb +2 -2
- data/lib/jamf/ruby_extensions/object/predicates.rb +3 -1
- data/lib/jamf/ruby_extensions/object.rb +1 -1
- data/lib/jamf/ruby_extensions/pathname/predicates.rb +3 -1
- data/lib/jamf/ruby_extensions/pathname/utils.rb +11 -5
- data/lib/jamf/ruby_extensions/pathname.rb +1 -1
- data/lib/jamf/ruby_extensions/string/conversions.rb +16 -1
- data/lib/jamf/ruby_extensions/string/predicates.rb +3 -1
- data/lib/jamf/ruby_extensions/string.rb +1 -3
- data/lib/{jss/ruby_extensions/time.rb → jamf/ruby_extensions/time/utils.rb} +40 -25
- data/lib/{jss/version.rb → jamf/ruby_extensions/time.rb} +7 -6
- data/lib/jamf/ruby_extensions.rb +9 -9
- data/lib/jamf/utility.rb +626 -410
- data/lib/jamf/validate.rb +86 -125
- data/lib/jamf/version.rb +3 -3
- data/lib/jamf.rb +76 -131
- data/lib/jss-api.rb +2 -2
- data/lib/jss.rb +3 -215
- data/lib/ruby-jss.rb +2 -2
- data/lib/zeitwerk_config.rb +163 -0
- data/test/README.md +27 -112
- data/test/bin/runtests +57 -130
- data/test/lib/jamf_test/APITest.rb +106 -0
- data/{lib/jss/ruby_extensions/filetest.rb → test/lib/jamf_test/advanced_search.rb} +16 -20
- data/test/lib/jamf_test/auth.rb +267 -0
- data/test/lib/jamf_test/collection_tests.rb +391 -0
- data/test/lib/jamf_test/prestage_tests.rb +135 -0
- data/test/lib/{testhelper.rb → jamf_test.rb} +15 -12
- data/{lib/jss/ruby_extensions.rb → test/tests/advanced_computer_search.rb} +11 -12
- data/test/tests/advanced_mobile_device_search.rb +36 -0
- data/test/tests/advanced_user_search.rb +36 -0
- data/test/tests/category.rb +41 -0
- data/test/tests/computer_prestage.rb +36 -0
- data/test/tests/device_enrollment.rb +101 -0
- data/test/tests/inventory_preload_record.rb +131 -0
- data/test/tests/jp_building.rb +41 -0
- data/test/tests/mobile_device_prestage.rb +37 -0
- data/test/tests/policy.rb +163 -0
- metadata +653 -204
- data/lib/jamf/api/base_classes/collection_resource.rb +0 -613
- data/lib/jamf/api/base_classes/json_object.rb +0 -1105
- data/lib/jamf/api/base_classes/prestage.rb +0 -503
- data/lib/jamf/api/base_classes/resource.rb +0 -259
- data/lib/jamf/api/base_classes/singleton_resource.rb +0 -88
- data/lib/jamf/api/connection/api_error.rb +0 -111
- data/lib/jamf/api/connection/api_error_styleguide.rb +0 -96
- data/lib/jamf/api/json_objects/change_log_entry.rb +0 -77
- data/lib/jamf/api/json_objects/country.rb +0 -51
- data/lib/jamf/api/json_objects/device_enrollment_device.rb +0 -165
- data/lib/jamf/api/json_objects/device_enrollment_device_sync_state.rb +0 -81
- data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +0 -71
- data/lib/jamf/api/json_objects/inventory_preload_extension_attribute.rb +0 -57
- data/lib/jamf/api/json_objects/locale.rb +0 -59
- data/lib/jamf/api/json_objects/md_prestage_name.rb +0 -57
- data/lib/jamf/api/json_objects/md_prestage_names.rb +0 -82
- data/lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb +0 -214
- data/lib/jamf/api/json_objects/prestage_assignment.rb +0 -76
- data/lib/jamf/api/json_objects/prestage_location.rb +0 -104
- data/lib/jamf/api/json_objects/prestage_purchasing_data.rb +0 -132
- data/lib/jamf/api/json_objects/prestage_scope.rb +0 -57
- data/lib/jamf/api/json_objects/time_zone.rb +0 -105
- data/lib/jamf/api/mixins/change_log.rb +0 -288
- data/lib/jamf/api/mixins/extendable.rb +0 -75
- data/lib/jamf/api/mixins/pageable.rb +0 -208
- data/lib/jamf/api/mixins/searchable.rb +0 -202
- data/lib/jamf/api/resources/collection_resources/building.rb +0 -121
- data/lib/jamf/api/resources/collection_resources/category.rb +0 -83
- data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +0 -89
- data/lib/jamf/api/resources/collection_resources/department.rb +0 -78
- data/lib/jamf/api/resources/collection_resources/device_enrollment.rb +0 -384
- data/lib/jamf/api/resources/collection_resources/inventory_preload_record.rb +0 -289
- data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +0 -143
- data/lib/jamf/api/resources/collection_resources/script.rb +0 -226
- data/lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb +0 -141
- data/lib/jamf/api/resources/singleton_resources/locales.rb +0 -155
- data/lib/jamf/api/resources/singleton_resources/time_zones.rb +0 -213
- data/lib/jamf/compatibility.rb +0 -88
- data/lib/jamf/ruby_extensions/dig.rb +0 -52
- data/lib/jamf/ruby_extensions/string/backports.rb +0 -66
- data/lib/jss/api_connection.rb +0 -1029
- data/lib/jss/api_object/app_store_country_codes.rb +0 -298
- data/lib/jss/api_object/computer/application_installs.rb +0 -118
- data/lib/jss/client/jamf_binary.rb +0 -132
- data/lib/jss/client/jamf_helper.rb +0 -298
- data/lib/jss/client/management_action.rb +0 -113
- data/lib/jss/client.rb +0 -301
- data/lib/jss/compatibility.rb +0 -88
- data/lib/jss/composer.rb +0 -190
- data/lib/jss/configuration.rb +0 -319
- data/lib/jss/exceptions.rb +0 -115
- data/lib/jss/ruby_extensions/array.rb +0 -52
- data/lib/jss/ruby_extensions/hash.rb +0 -140
- data/lib/jss/ruby_extensions/ipaddr.rb +0 -92
- data/lib/jss/ruby_extensions/object.rb +0 -19
- data/lib/jss/ruby_extensions/pathname.rb +0 -78
- data/lib/jss/ruby_extensions/string/backports.rb +0 -68
- data/lib/jss/ruby_extensions/string/conversions.rb +0 -69
- data/lib/jss/ruby_extensions/string/predicates.rb +0 -57
- data/lib/jss/server.rb +0 -146
- data/lib/jss/utility.rb +0 -672
- data/lib/jss/validate.rb +0 -248
- data/test/lib/testhelper/auth.rb +0 -275
- data/test/lib/testhelper/patch_mgmt.rb +0 -123
- data/test/specs/api_connection_spec.rb +0 -57
- data/test/specs/patch01_source_spec.rb +0 -54
- data/test/specs/patch02_internal_source_spec.rb +0 -88
- data/test/specs/patch03_external_source_spec.rb +0 -120
- data/test/specs/patch04_titles_spec.rb +0 -207
- data/test/specs/patch05_policies_spec.rb +0 -119
- data/test/specs/patch06_cleanup_spec.rb +0 -52
- data/test/specs/policy_spec.rb +0 -112
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2022 Pixar
|
2
2
|
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
@@ -23,7 +23,7 @@
|
|
23
23
|
#
|
24
24
|
#
|
25
25
|
|
26
|
-
module
|
26
|
+
module Jamf
|
27
27
|
|
28
28
|
# Module Constants
|
29
29
|
######################
|
@@ -55,29 +55,29 @@ module JSS
|
|
55
55
|
# - - category
|
56
56
|
# - - triggers
|
57
57
|
# - - client maintenance tasks
|
58
|
-
# - - scope, see {
|
58
|
+
# - - scope, see {Jamf::Scopable} and {Jamf::Scopable::Scope}
|
59
59
|
# - - files and processes
|
60
60
|
# - - packages, see {#add_package} and {#remove_package}
|
61
61
|
# - - scripts see {#add_script} and {#remove_script}
|
62
|
-
# - - self service, see {
|
62
|
+
# - - self service, see {Jamf::SelfServable}
|
63
63
|
# - - reboot options
|
64
64
|
#
|
65
65
|
# All other values and sections must be edited via the Web App.
|
66
66
|
#
|
67
67
|
# Policies may be deleted via this class
|
68
68
|
#
|
69
|
-
class Policy <
|
69
|
+
class Policy < Jamf::APIObject
|
70
70
|
|
71
71
|
# Mix-Ins
|
72
72
|
#####################################
|
73
73
|
|
74
|
-
include
|
75
|
-
include
|
76
|
-
include
|
77
|
-
include
|
78
|
-
include
|
79
|
-
include
|
80
|
-
include
|
74
|
+
include Jamf::Creatable
|
75
|
+
include Jamf::Updatable
|
76
|
+
include Jamf::Scopable
|
77
|
+
include Jamf::Uploadable
|
78
|
+
include Jamf::SelfServable
|
79
|
+
include Jamf::Categorizable
|
80
|
+
include Jamf::Sitable
|
81
81
|
|
82
82
|
# Class Constants
|
83
83
|
#####################################
|
@@ -314,45 +314,47 @@ module JSS
|
|
314
314
|
# either ids, names, SNs, macaddrs, or UDIDs. If omitted, flushes logs for
|
315
315
|
# all computers
|
316
316
|
#
|
317
|
-
# @param
|
317
|
+
# @param cnx [Jamf::Connection] the API connection to use.
|
318
318
|
#
|
319
319
|
# @return [void]
|
320
320
|
#
|
321
|
-
def self.flush_logs(policy, older_than: 0, period: :days, computers: [], api:
|
322
|
-
|
323
|
-
|
324
|
-
|
321
|
+
def self.flush_logs(policy, older_than: 0, period: :days, computers: [], api: nil, cnx: Jamf.cnx)
|
322
|
+
cnx = api if api
|
323
|
+
|
324
|
+
orig_timeout = cnx.timeout
|
325
|
+
pol_id = valid_id policy, cnx: cnx
|
326
|
+
raise Jamf::NoSuchItemError, "No Policy identified by '#{policy}'." unless pol_id
|
325
327
|
|
326
328
|
older_than = LOG_FLUSH_INTERVAL_INTEGERS[older_than]
|
327
|
-
raise
|
329
|
+
raise Jamf::InvalidDataError, "older_than must be one of these integers: #{LOG_FLUSH_INTERVAL_INTEGERS.keys.join ', '}" unless older_than
|
328
330
|
|
329
331
|
period = LOG_FLUSH_INTERVAL_PERIODS[period]
|
330
|
-
raise
|
332
|
+
raise Jamf::InvalidDataError, "period must be one of these symbols: :#{LOG_FLUSH_INTERVAL_PERIODS.keys.join ', :'}" unless period
|
331
333
|
|
332
334
|
computers = [computers] unless computers.is_a? Array
|
333
335
|
|
334
336
|
# log flushes can be really slow
|
335
|
-
|
337
|
+
cnx.timeout = 1800 unless orig_timeout && orig_timeout > 1800
|
336
338
|
|
337
|
-
return
|
339
|
+
return cnx.c_delete "#{LOG_FLUSH_RSRC}/policy/id/#{pol_id}/interval/#{older_than}+#{period}" if computers.empty?
|
338
340
|
|
339
|
-
flush_logs_for_specific_computers pol_id, older_than, period, computers,
|
341
|
+
flush_logs_for_specific_computers pol_id, older_than, period, computers, cnx
|
340
342
|
ensure
|
341
|
-
|
343
|
+
cnx.timeout = orig_timeout
|
342
344
|
end
|
343
345
|
|
344
346
|
# use an XML body in a DELETE request to flush logs for
|
345
347
|
# a list of computers - used by the flush_logs class method
|
346
|
-
def self.flush_logs_for_specific_computers(pol_id, older_than, period, computers,
|
348
|
+
def self.flush_logs_for_specific_computers(pol_id, older_than, period, computers, cnx)
|
347
349
|
# build the xml body for a DELETE request
|
348
|
-
xml_doc = REXML::Document.new
|
350
|
+
xml_doc = REXML::Document.new Jamf::Connection::XML_HEADER
|
349
351
|
lf = xml_doc.add_element 'logflush'
|
350
352
|
lf.add_element('log').text = 'policy'
|
351
353
|
lf.add_element('log_id').text = pol_id.to_s
|
352
354
|
lf.add_element('interval').text = "#{older_than} #{period}"
|
353
355
|
comps_elem = lf.add_element 'computers'
|
354
356
|
computers.each do |c|
|
355
|
-
id =
|
357
|
+
id = Jamf::Computer.valid_id c, cnx: cnx
|
356
358
|
next unless id
|
357
359
|
|
358
360
|
ce = comps_elem.add_element 'computer'
|
@@ -360,8 +362,8 @@ module JSS
|
|
360
362
|
end
|
361
363
|
|
362
364
|
# Do a DELETE request with a body.
|
363
|
-
|
364
|
-
req.headers[
|
365
|
+
cnx.delete(LOG_FLUSH_RSRC) do |req|
|
366
|
+
req.headers[Jamf::Connection::HTTP_CONTENT_TYPE_HEADER] = Jamf::Connection::MIME_XML
|
365
367
|
req.body = xml_doc.to_s
|
366
368
|
end
|
367
369
|
end
|
@@ -694,7 +696,7 @@ module JSS
|
|
694
696
|
|
695
697
|
# @see APIObject#initialize
|
696
698
|
#
|
697
|
-
def initialize(args
|
699
|
+
def initialize(**args)
|
698
700
|
super
|
699
701
|
|
700
702
|
if @in_jss
|
@@ -702,7 +704,7 @@ module JSS
|
|
702
704
|
@target_drive = gen[:target_drive]
|
703
705
|
@offline = gen[:offline]
|
704
706
|
@enabled = gen[:enabled]
|
705
|
-
@site =
|
707
|
+
@site = Jamf::APIObject.get_name(gen[:site][:name])
|
706
708
|
@override_default_settings = gen[:override_default_settings]
|
707
709
|
@trigger = gen[:trigger]
|
708
710
|
@trigger_events = {
|
@@ -755,7 +757,7 @@ module JSS
|
|
755
757
|
|
756
758
|
uint = @init_data[:user_interaction]
|
757
759
|
@user_may_defer = uint[:allow_users_to_defer]
|
758
|
-
@user_may_defer_until =
|
760
|
+
@user_may_defer_until = Jamf.parse_time uint[:allow_deferral_until_utc]
|
759
761
|
@user_message_start = uint[:message_start]
|
760
762
|
@user_message_finish = uint[:message_finish]
|
761
763
|
|
@@ -800,7 +802,7 @@ module JSS
|
|
800
802
|
@reboot_options[:no_user_logged_in] = 'Do not restart'
|
801
803
|
end
|
802
804
|
|
803
|
-
@scope ||=
|
805
|
+
@scope ||= Jamf::Scopable::Scope.new(:computers, all_computers: false)
|
804
806
|
end # init
|
805
807
|
|
806
808
|
###### General
|
@@ -813,7 +815,7 @@ module JSS
|
|
813
815
|
#
|
814
816
|
def enabled=(new_val)
|
815
817
|
return if @enabled == new_val
|
816
|
-
@enabled =
|
818
|
+
@enabled = Jamf::Validate.boolean new_val
|
817
819
|
@need_to_update = true
|
818
820
|
end
|
819
821
|
|
@@ -834,7 +836,7 @@ module JSS
|
|
834
836
|
# @return [void]
|
835
837
|
#
|
836
838
|
def frequency=(freq)
|
837
|
-
raise
|
839
|
+
raise Jamf::InvalidDataError, "New frequency must be one of :#{FREQUENCIES.keys.join ', :'}" unless FREQUENCIES.key?(freq) || FREQUENCIES.value?(freq)
|
838
840
|
|
839
841
|
freq = freq.is_a?(Symbol) ? FREQUENCIES[freq] : freq
|
840
842
|
return if freq == @frequency
|
@@ -859,7 +861,7 @@ module JSS
|
|
859
861
|
#
|
860
862
|
def retry_event=(evt)
|
861
863
|
validate_retry_opt
|
862
|
-
raise
|
864
|
+
raise Jamf::InvalidDataError, "Retry event must be one of :#{RETRY_EVENTS.keys.join ', :'}" unless RETRY_EVENTS.key?(evt) || RETRY_EVENTS.value?(evt)
|
863
865
|
|
864
866
|
evt = evt.is_a?(Symbol) ? RETRY_EVENTS[evt] : evt
|
865
867
|
return if evt == @retry_event
|
@@ -891,7 +893,7 @@ module JSS
|
|
891
893
|
#
|
892
894
|
def retry_attempts=(int)
|
893
895
|
validate_retry_opt
|
894
|
-
raise
|
896
|
+
raise Jamf::InvalidDataError, 'Retry attempts must be an integer from 0-10' unless int.is_a?(Integer) && (-1..10).include?(int)
|
895
897
|
|
896
898
|
# if zero or -1, turn off retries
|
897
899
|
if int <= 0
|
@@ -917,7 +919,7 @@ module JSS
|
|
917
919
|
# @return [void]
|
918
920
|
def notify_failed_retries=(bool)
|
919
921
|
validate_retry_opt
|
920
|
-
bool =
|
922
|
+
bool = Jamf::Validate.boolean bool
|
921
923
|
return if @notify_failed_retries == bool
|
922
924
|
|
923
925
|
@notify_failed_retries = bool
|
@@ -931,7 +933,7 @@ module JSS
|
|
931
933
|
# @return [void]
|
932
934
|
#
|
933
935
|
def target_drive=(path_to_drive)
|
934
|
-
raise
|
936
|
+
raise Jamf::InvalidDataError, 'Path to target drive must be absolute' unless path_to_drive.to_s.start_with? '/'
|
935
937
|
@target_drive = path_to_drive.to_s
|
936
938
|
@need_to_update = true
|
937
939
|
end
|
@@ -943,7 +945,7 @@ module JSS
|
|
943
945
|
# @return [void]
|
944
946
|
#
|
945
947
|
def offline=(new_val)
|
946
|
-
raise
|
948
|
+
raise Jamf::InvalidDataError, 'New value must be boolean true or false' unless Jamf::TRUE_FALSE.include? new_val
|
947
949
|
@offline = new_val
|
948
950
|
@need_to_update = true
|
949
951
|
end
|
@@ -957,11 +959,11 @@ module JSS
|
|
957
959
|
# @return [void]
|
958
960
|
#
|
959
961
|
def set_trigger_event(type, new_val)
|
960
|
-
raise
|
962
|
+
raise Jamf::InvalidDataError, "Trigger type must be one of #{TRIGGER_EVENTS.keys.join(', ')}" unless TRIGGER_EVENTS.key?(type)
|
961
963
|
if type == :custom
|
962
|
-
raise
|
964
|
+
raise Jamf::InvalidDataError, 'Custom triggers must be Strings' unless new_val.is_a? String
|
963
965
|
else
|
964
|
-
raise
|
966
|
+
raise Jamf::InvalidDataError, 'Non-custom triggers must be true or false' unless Jamf::TRUE_FALSE.include? new_val
|
965
967
|
end
|
966
968
|
@trigger_events[TRIGGER_EVENTS[type]] = new_val
|
967
969
|
@need_to_update = true
|
@@ -974,7 +976,7 @@ module JSS
|
|
974
976
|
# @return [void]
|
975
977
|
#
|
976
978
|
def server_side_activation=(activation)
|
977
|
-
raise
|
979
|
+
raise Jamf::InvalidDataError, 'Activation must be a Time' unless activation.is_a? Time
|
978
980
|
@server_side_limitations[:activation] = activation
|
979
981
|
@need_to_update = true
|
980
982
|
end
|
@@ -986,7 +988,7 @@ module JSS
|
|
986
988
|
# @return [void]
|
987
989
|
#
|
988
990
|
def server_side_expiration=(expiration)
|
989
|
-
raise
|
991
|
+
raise Jamf::InvalidDataError, 'Expiration must be a Time' unless expiration.is_a? Time
|
990
992
|
@server_side_limitations[:expiration] = expiration
|
991
993
|
@need_to_update = true
|
992
994
|
end
|
@@ -997,7 +999,7 @@ module JSS
|
|
997
999
|
#
|
998
1000
|
def verify_startup_disk=(bool)
|
999
1001
|
return if @verify_startup_disk == bool
|
1000
|
-
@verify_startup_disk =
|
1002
|
+
@verify_startup_disk = Jamf::Validate.boolean bool
|
1001
1003
|
@need_to_update = true
|
1002
1004
|
end
|
1003
1005
|
|
@@ -1005,7 +1007,7 @@ module JSS
|
|
1005
1007
|
#
|
1006
1008
|
def permissions_repair=(bool)
|
1007
1009
|
return if @permissions_repair == bool
|
1008
|
-
@permissions_repair =
|
1010
|
+
@permissions_repair = Jamf::Validate.boolean bool
|
1009
1011
|
@need_to_update = true
|
1010
1012
|
end
|
1011
1013
|
|
@@ -1013,7 +1015,7 @@ module JSS
|
|
1013
1015
|
#
|
1014
1016
|
def recon=(bool)
|
1015
1017
|
return if @recon == bool
|
1016
|
-
@recon =
|
1018
|
+
@recon = Jamf::Validate.boolean bool
|
1017
1019
|
@need_to_update = true
|
1018
1020
|
end
|
1019
1021
|
alias update_inventory= recon=
|
@@ -1022,7 +1024,7 @@ module JSS
|
|
1022
1024
|
#
|
1023
1025
|
def fix_byhost=(bool)
|
1024
1026
|
return if @fix_byhost == bool
|
1025
|
-
@fix_byhost =
|
1027
|
+
@fix_byhost = Jamf::Validate.boolean bool
|
1026
1028
|
@need_to_update = true
|
1027
1029
|
end
|
1028
1030
|
|
@@ -1030,7 +1032,7 @@ module JSS
|
|
1030
1032
|
#
|
1031
1033
|
def reset_name=(bool)
|
1032
1034
|
return if @reset_name == bool
|
1033
|
-
@reset_name =
|
1035
|
+
@reset_name = Jamf::Validate.boolean bool
|
1034
1036
|
@need_to_update = true
|
1035
1037
|
end
|
1036
1038
|
|
@@ -1038,7 +1040,7 @@ module JSS
|
|
1038
1040
|
#
|
1039
1041
|
def flush_system_cache=(bool)
|
1040
1042
|
return if @flush_system_cache == bool
|
1041
|
-
@flush_system_cache =
|
1043
|
+
@flush_system_cache = Jamf::Validate.boolean bool
|
1042
1044
|
@need_to_update = true
|
1043
1045
|
end # see attr_reader :recon
|
1044
1046
|
|
@@ -1046,7 +1048,7 @@ module JSS
|
|
1046
1048
|
#
|
1047
1049
|
def install_cached_pkgs=(bool)
|
1048
1050
|
return if @install_cached_pkgs == bool
|
1049
|
-
@install_cached_pkgs =
|
1051
|
+
@install_cached_pkgs = Jamf::Validate.boolean bool
|
1050
1052
|
@need_to_update = true
|
1051
1053
|
end
|
1052
1054
|
|
@@ -1054,7 +1056,7 @@ module JSS
|
|
1054
1056
|
#
|
1055
1057
|
def flush_user_cache=(bool)
|
1056
1058
|
return if @flush_user_cache == bool
|
1057
|
-
@flush_user_cache =
|
1059
|
+
@flush_user_cache = Jamf::Validate.boolean bool
|
1058
1060
|
@need_to_update = true
|
1059
1061
|
end
|
1060
1062
|
|
@@ -1068,7 +1070,7 @@ module JSS
|
|
1068
1070
|
# @return [void]
|
1069
1071
|
#
|
1070
1072
|
def no_user_logged_in=(no_user_option)
|
1071
|
-
raise
|
1073
|
+
raise Jamf::InvalidDataError, "no_user_logged_in options: #{NO_USER_LOGGED_IN.join(', ')}" unless NO_USER_LOGGED_IN.include? no_user_option
|
1072
1074
|
@reboot_options[:no_user_logged_in] = no_user_option
|
1073
1075
|
@need_to_update = true
|
1074
1076
|
end
|
@@ -1080,7 +1082,7 @@ module JSS
|
|
1080
1082
|
# @return [void]
|
1081
1083
|
#
|
1082
1084
|
def user_logged_in=(logged_in_option)
|
1083
|
-
raise
|
1085
|
+
raise Jamf::InvalidDataError, "user_logged_in options: #{USER_LOGGED_IN.join(', ')}" unless USER_LOGGED_IN.include? logged_in_option
|
1084
1086
|
@reboot_options[:user_logged_in] = logged_in_option
|
1085
1087
|
@need_to_update = true
|
1086
1088
|
end
|
@@ -1092,7 +1094,7 @@ module JSS
|
|
1092
1094
|
# @return [void] description of returned object
|
1093
1095
|
#
|
1094
1096
|
def reboot_message=(message)
|
1095
|
-
raise
|
1097
|
+
raise Jamf::InvalidDataError, 'Reboot message must be a String' unless message.is_a? String
|
1096
1098
|
@reboot_options[:message] = message
|
1097
1099
|
@need_to_update = true
|
1098
1100
|
end
|
@@ -1104,7 +1106,7 @@ module JSS
|
|
1104
1106
|
#
|
1105
1107
|
# @return [void] description of returned object
|
1106
1108
|
def user_message_start=(message)
|
1107
|
-
raise
|
1109
|
+
raise Jamf::InvalidDataError, 'User message must be a String' unless message.is_a? String
|
1108
1110
|
@user_message_start = message
|
1109
1111
|
@need_to_update = true
|
1110
1112
|
end
|
@@ -1115,7 +1117,7 @@ module JSS
|
|
1115
1117
|
#
|
1116
1118
|
# @return [void] description of returned object
|
1117
1119
|
def user_message_end=(message)
|
1118
|
-
raise
|
1120
|
+
raise Jamf::InvalidDataError, 'User message must be a String' unless message.is_a? String
|
1119
1121
|
@user_message_finish = message
|
1120
1122
|
@need_to_update = true
|
1121
1123
|
end
|
@@ -1130,7 +1132,7 @@ module JSS
|
|
1130
1132
|
# @return [void]
|
1131
1133
|
#
|
1132
1134
|
def startup_disk=(startup_disk_option)
|
1133
|
-
raise
|
1135
|
+
raise Jamf::InvalidDataError, "#{startup_disk_option} is not a valid Startup Disk" unless startup_disk_option.is_a? String
|
1134
1136
|
@reboot_options[:startup_disk] = 'Specify Local Startup Disk'
|
1135
1137
|
self.specify_startup = startup_disk_option
|
1136
1138
|
@need_to_update = true
|
@@ -1144,7 +1146,7 @@ module JSS
|
|
1144
1146
|
# @return [void]
|
1145
1147
|
#
|
1146
1148
|
def specify_startup=(startup_volume)
|
1147
|
-
raise
|
1149
|
+
raise Jamf::InvalidDataError, "#{startup_volume} is not a valid Startup Disk" unless startup_volume.is_a? String
|
1148
1150
|
@reboot_options[:specify_startup] = startup_volume
|
1149
1151
|
@need_to_update = true
|
1150
1152
|
end
|
@@ -1169,7 +1171,7 @@ module JSS
|
|
1169
1171
|
# @return [void]
|
1170
1172
|
#
|
1171
1173
|
def minutes_until_reboot=(minutes)
|
1172
|
-
raise
|
1174
|
+
raise Jamf::InvalidDataError, 'Minutes until reboot must be an Integer' unless minutes.is_a? Integer
|
1173
1175
|
@reboot_options[:minutes_until_reboot] = minutes
|
1174
1176
|
@need_to_update = true
|
1175
1177
|
end
|
@@ -1182,7 +1184,7 @@ module JSS
|
|
1182
1184
|
# @return [void]
|
1183
1185
|
#
|
1184
1186
|
def file_vault_2_reboot=(fv_bool)
|
1185
|
-
raise
|
1187
|
+
raise Jamf::InvalidDataError, 'FileVault 2 Reboot must be a Boolean' unless fv_bool.jss_boolean?
|
1186
1188
|
@reboot_options[:file_vault_2_reboot] = fv_bool
|
1187
1189
|
@need_to_update = true
|
1188
1190
|
end
|
@@ -1203,7 +1205,7 @@ module JSS
|
|
1203
1205
|
# @return [void]
|
1204
1206
|
#
|
1205
1207
|
def run_command=(command)
|
1206
|
-
raise
|
1208
|
+
raise Jamf::InvalidDataError, 'Command to run must be a String' unless command.is_a? String
|
1207
1209
|
@files_processes[:run_command] = command
|
1208
1210
|
@need_to_update = true
|
1209
1211
|
end
|
@@ -1222,7 +1224,7 @@ module JSS
|
|
1222
1224
|
# @return [void]
|
1223
1225
|
#
|
1224
1226
|
def update_locate_database=(bool)
|
1225
|
-
@files_processes[:update_locate_database] =
|
1227
|
+
@files_processes[:update_locate_database] = Jamf::Validate.boolean bool
|
1226
1228
|
@need_to_update = true
|
1227
1229
|
end
|
1228
1230
|
|
@@ -1286,7 +1288,7 @@ module JSS
|
|
1286
1288
|
# @return [void]
|
1287
1289
|
#
|
1288
1290
|
def set_search_by_path(path, delete = false)
|
1289
|
-
raise
|
1291
|
+
raise Jamf::InvalidDataError, 'Path to search for must be a String or a Pathname' unless path.is_a?(String) || path.is_a?(Pathname)
|
1290
1292
|
@files_processes[:search_by_path] = path.to_s
|
1291
1293
|
@files_processes[:delete_file] = delete ? true : false
|
1292
1294
|
@need_to_update = true
|
@@ -1305,7 +1307,7 @@ module JSS
|
|
1305
1307
|
# @return [void]
|
1306
1308
|
#
|
1307
1309
|
def spotlight_search=(term)
|
1308
|
-
raise
|
1310
|
+
raise Jamf::InvalidDataError, 'Spotlight search term must be a String' unless term.is_a? String
|
1309
1311
|
@files_processes[:spotlight_search] = term
|
1310
1312
|
@need_to_update = true
|
1311
1313
|
end
|
@@ -1323,7 +1325,7 @@ module JSS
|
|
1323
1325
|
# @return [void]
|
1324
1326
|
#
|
1325
1327
|
def locate_file=(term)
|
1326
|
-
raise
|
1328
|
+
raise Jamf::InvalidDataError, 'Term to locate must be a String' unless term.is_a? String
|
1327
1329
|
@files_processes[:locate_file] = term
|
1328
1330
|
@need_to_update = true
|
1329
1331
|
end
|
@@ -1369,7 +1371,7 @@ module JSS
|
|
1369
1371
|
|
1370
1372
|
return nil if @packages.map { |p| p[:id] }.include? id
|
1371
1373
|
|
1372
|
-
name =
|
1374
|
+
name = Jamf::Package.map_all_ids_to(:name, cnx: @cnx)[id]
|
1373
1375
|
|
1374
1376
|
pkg_data = {
|
1375
1377
|
id: id,
|
@@ -1454,7 +1456,7 @@ module JSS
|
|
1454
1456
|
|
1455
1457
|
return nil if @scripts.map { |s| s[:id] }.include? id
|
1456
1458
|
|
1457
|
-
name =
|
1459
|
+
name = Jamf::Script.map_all_ids_to(:name, cnx: @cnx)[id]
|
1458
1460
|
|
1459
1461
|
script_data = {
|
1460
1462
|
id: id,
|
@@ -1521,11 +1523,11 @@ module JSS
|
|
1521
1523
|
# @return [Array] the scripts array
|
1522
1524
|
#
|
1523
1525
|
def set_script_parameters(identifier, **opts)
|
1524
|
-
id =
|
1525
|
-
raise
|
1526
|
+
id = Jamf::Script.valid_id identifier, cnx: @cnx
|
1527
|
+
raise Jamf::NoSuchItemError, "No script matches '#{identifier}'" unless id
|
1526
1528
|
|
1527
1529
|
script_data = @scripts.select { |s| s[:id] == id }[0]
|
1528
|
-
raise
|
1530
|
+
raise Jamf::InvalidDataError, "Script #{id} is not configured. Use add_script method." unless script_data
|
1529
1531
|
|
1530
1532
|
opts.each do |parameter, value|
|
1531
1533
|
script_data[parameter] = value if SCRIPT_PARAMETERS_AVAILABLE.include? parameter
|
@@ -1564,7 +1566,7 @@ module JSS
|
|
1564
1566
|
|
1565
1567
|
return nil if @directory_bindings.map { |s| s[:id] }.include? id
|
1566
1568
|
|
1567
|
-
name =
|
1569
|
+
name = Jamf::DirectoryBinding.map_all_ids_to(:name, cnx: @cnx)[id]
|
1568
1570
|
|
1569
1571
|
directory_binding_data = {
|
1570
1572
|
id: id,
|
@@ -1626,7 +1628,7 @@ module JSS
|
|
1626
1628
|
|
1627
1629
|
return nil if @printers.map { |p| p[:id] }.include? id
|
1628
1630
|
|
1629
|
-
name =
|
1631
|
+
name = Jamf::Printer.map_all_ids_to(:name, cnx: @cnx)[id]
|
1630
1632
|
|
1631
1633
|
printer_data = {
|
1632
1634
|
id: id,
|
@@ -1658,15 +1660,15 @@ module JSS
|
|
1658
1660
|
|
1659
1661
|
# Add a dock item to the policy
|
1660
1662
|
def add_dock_item(identifier, action)
|
1661
|
-
id =
|
1663
|
+
id = Jamf::DockItem.valid_id identifier, cnx: @cnx
|
1662
1664
|
|
1663
|
-
raise
|
1665
|
+
raise Jamf::NoSuchItemError, "No Dock Item matches '#{identifier}'" unless id
|
1664
1666
|
|
1665
|
-
raise
|
1667
|
+
raise Jamf::InvalidDataError, "Action must be one of: :#{DOCK_ITEM_ACTIONS.keys.join ', :'}" unless DOCK_ITEM_ACTIONS.include? action
|
1666
1668
|
|
1667
1669
|
return nil if @dock_items.map { |d| d[:id] }.include? id
|
1668
1670
|
|
1669
|
-
name =
|
1671
|
+
name = Jamf::DockItem.map_all_ids_to(:name, cnx: @cnx)[id]
|
1670
1672
|
|
1671
1673
|
@dock_items << {id: id, name: name, action: DOCK_ITEM_ACTIONS[action]}
|
1672
1674
|
|
@@ -1676,7 +1678,7 @@ module JSS
|
|
1676
1678
|
|
1677
1679
|
# Remove a dock item from the policy
|
1678
1680
|
def remove_dock_item(identifier)
|
1679
|
-
# TODO: Add validation against
|
1681
|
+
# TODO: Add validation against Jamf::DockItem
|
1680
1682
|
removed = @dock_items.delete_if { |d| d[:id] == identifier || d[:name] == identifier }
|
1681
1683
|
@need_to_update = true if removed
|
1682
1684
|
removed
|
@@ -1737,7 +1739,7 @@ module JSS
|
|
1737
1739
|
#
|
1738
1740
|
def apply_encryption_configuration(identifier)
|
1739
1741
|
|
1740
|
-
id =
|
1742
|
+
id = Jamf::DiskEncryptionConfiguration.valid_id identifier
|
1741
1743
|
|
1742
1744
|
return if id.nil?
|
1743
1745
|
|
@@ -1777,20 +1779,20 @@ module JSS
|
|
1777
1779
|
#
|
1778
1780
|
def set_management_account(action, **opts)
|
1779
1781
|
# TODO: Add proper error handling
|
1780
|
-
raise
|
1782
|
+
raise Jamf::InvalidDataError, "Action must be one of: :#{MGMT_ACCOUNT_ACTIONS.keys.join ', :'}" unless MGMT_ACCOUNT_ACTIONS.include? action
|
1781
1783
|
|
1782
1784
|
management_data = {}
|
1783
1785
|
|
1784
1786
|
if action == :change_pw || action == :reset_pw
|
1785
|
-
raise
|
1787
|
+
raise Jamf::MissingDataError, ":password must be provided when changing management account password" if opts[:password].nil?
|
1786
1788
|
|
1787
1789
|
management_data = {
|
1788
1790
|
action: MGMT_ACCOUNT_ACTIONS[action],
|
1789
1791
|
managed_password: opts[:password]
|
1790
1792
|
}
|
1791
1793
|
elsif action == :reset_random || action == :generate_pw
|
1792
|
-
raise
|
1793
|
-
raise
|
1794
|
+
raise Jamf::MissingDataError, ":password_length must be provided when setting a random password" if opts[:password_length].nil?
|
1795
|
+
raise Jamf::InvalidDataError, ":password_length must be an Integer" unless opts[:password_length].is_a? Integer
|
1794
1796
|
|
1795
1797
|
management_data = {
|
1796
1798
|
action: MGMT_ACCOUNT_ACTIONS[action],
|
@@ -1817,9 +1819,9 @@ module JSS
|
|
1817
1819
|
# @return [Boolean] The result of the comparison of the management password and provided text.
|
1818
1820
|
#
|
1819
1821
|
def verify_management_password(password)
|
1820
|
-
raise
|
1822
|
+
raise Jamf::InvalidDataError, "Management password must be a string." unless password.is_a? String
|
1821
1823
|
|
1822
|
-
raise
|
1824
|
+
raise Jamf::UnsupportedError, "'#{@management_account[:action].to_s}' does not support management passwords." unless @management_account[:action] == MGMT_ACCOUNT_ACTIONS[:change_pw] || @management_account[:action] == MGMT_ACCOUNT_ACTIONS[:reset_pw]
|
1823
1825
|
|
1824
1826
|
return Digest::SHA256.hexdigest(password).to_s == @management_account[:managed_password_sha256].to_s
|
1825
1827
|
end
|
@@ -1836,7 +1838,7 @@ module JSS
|
|
1836
1838
|
#
|
1837
1839
|
def run(show_output = false)
|
1838
1840
|
return nil unless enabled?
|
1839
|
-
output =
|
1841
|
+
output = Jamf::Client.run_jamf('policy', "-id #{id}", show_output)
|
1840
1842
|
return nil if output.include? 'No policies were found for the ID'
|
1841
1843
|
$CHILD_STATUS.exitstatus.zero? ? true : false
|
1842
1844
|
end
|
@@ -1864,14 +1866,13 @@ module JSS
|
|
1864
1866
|
# @return [void]
|
1865
1867
|
#
|
1866
1868
|
def flush_logs(older_than: 0, period: :days, computers: [])
|
1867
|
-
raise
|
1869
|
+
raise Jamf::NoSuchItemError, "Policy doesn't exist in the JSS. Use #create first." unless @in_jss
|
1868
1870
|
|
1869
|
-
|
1871
|
+
Jamf::Policy.flush_logs(
|
1870
1872
|
@id,
|
1871
1873
|
older_than: older_than,
|
1872
1874
|
period: period,
|
1873
|
-
computers: computers,
|
1874
|
-
api: @api
|
1875
|
+
computers: computers, cnx: @cnx
|
1875
1876
|
)
|
1876
1877
|
end
|
1877
1878
|
|
@@ -1888,7 +1889,7 @@ module JSS
|
|
1888
1889
|
def validate_retry_opt
|
1889
1890
|
return if FREQUENCIES[:once_per_computer] == @frequency
|
1890
1891
|
|
1891
|
-
raise
|
1892
|
+
raise Jamf::UnsupportedError, 'Policy retry is only available when frequency is set to :once_per_computer'
|
1892
1893
|
end
|
1893
1894
|
|
1894
1895
|
# raise an error if a package being added isn't valid
|
@@ -1908,22 +1909,22 @@ module JSS
|
|
1908
1909
|
case opts[:position]
|
1909
1910
|
when :start then 0
|
1910
1911
|
when :end then -1
|
1911
|
-
else
|
1912
|
+
else Jamf::Validate.integer(opts[:position])
|
1912
1913
|
end
|
1913
1914
|
|
1914
1915
|
# if the given position is past the end, set it to -1 (the end)
|
1915
1916
|
opts[:position] = -1 if opts[:position] > @packages.size
|
1916
1917
|
|
1917
|
-
id =
|
1918
|
+
id = Jamf::Package.valid_id identifier, cnx: @cnx
|
1918
1919
|
|
1919
|
-
raise
|
1920
|
+
raise Jamf::NoSuchItemError, "No package matches '#{identifier}'" unless id
|
1920
1921
|
|
1921
|
-
raise
|
1922
|
+
raise Jamf::InvalidDataError, "action must be one of: :#{PACKAGE_ACTIONS.keys.join ', :'}" unless \
|
1922
1923
|
PACKAGE_ACTIONS.include? opts[:action]
|
1923
1924
|
|
1924
|
-
opts[:feu] =
|
1925
|
-
opts[:fut] =
|
1926
|
-
opts[:update_autorun] =
|
1925
|
+
opts[:feu] = Jamf::Validate.boolean opts[:feu]
|
1926
|
+
opts[:fut] = Jamf::Validate.boolean opts[:fut]
|
1927
|
+
opts[:update_autorun] = Jamf::Validate.boolean opts[:update_autorun]
|
1927
1928
|
id
|
1928
1929
|
end
|
1929
1930
|
|
@@ -1937,21 +1938,21 @@ module JSS
|
|
1937
1938
|
opts[:position] ||= -1
|
1938
1939
|
opts[:priority] ||= :after
|
1939
1940
|
|
1940
|
-
raise
|
1941
|
+
raise Jamf::InvalidDataError, "priority must be one of: :#{SCRIPT_PRIORITIES.keys.join ', :'}" unless \
|
1941
1942
|
SCRIPT_PRIORITIES.include? opts[:priority]
|
1942
1943
|
|
1943
1944
|
opts[:position] =
|
1944
1945
|
case opts[:position]
|
1945
1946
|
when :start then 0
|
1946
1947
|
when :end then -1
|
1947
|
-
else
|
1948
|
+
else Jamf::Validate.integer(opts[:position])
|
1948
1949
|
end
|
1949
1950
|
|
1950
1951
|
# if the given position is past the end, set it to -1 (the end)
|
1951
1952
|
opts[:position] = -1 if opts[:position] > @packages.size
|
1952
1953
|
|
1953
|
-
id =
|
1954
|
-
raise
|
1954
|
+
id = Jamf::Script.valid_id identifier, cnx: @cnx
|
1955
|
+
raise Jamf::NoSuchItemError, "No script matches '#{identifier}'" unless id
|
1955
1956
|
id
|
1956
1957
|
end
|
1957
1958
|
|
@@ -1968,14 +1969,14 @@ module JSS
|
|
1968
1969
|
case opts[:position]
|
1969
1970
|
when :start then 0
|
1970
1971
|
when :end then -1
|
1971
|
-
else
|
1972
|
+
else Jamf::Validate.integer(opts[:position])
|
1972
1973
|
end
|
1973
1974
|
|
1974
1975
|
# if the given position is past the end, set it to -1 (the end)
|
1975
1976
|
opts[:position] = -1 if opts[:position] > @directory_bindings.size
|
1976
1977
|
|
1977
|
-
id =
|
1978
|
-
raise
|
1978
|
+
id = Jamf::DirectoryBinding.valid_id identifier, cnx: @cnx
|
1979
|
+
raise Jamf::NoSuchItemError, "No directory binding matches '#{identifier}'" unless id
|
1979
1980
|
id
|
1980
1981
|
end
|
1981
1982
|
|
@@ -1992,29 +1993,29 @@ module JSS
|
|
1992
1993
|
case opts[:position]
|
1993
1994
|
when :start then 0
|
1994
1995
|
when :end then -1
|
1995
|
-
else
|
1996
|
+
else Jamf::Validate.integer(opts[:position])
|
1996
1997
|
end
|
1997
1998
|
|
1998
1999
|
# If the given position is past the end, set it to -1 (the end)
|
1999
2000
|
opts[:position] = -1 if opts[:position] > @printers.size
|
2000
2001
|
|
2001
2002
|
# Checks if action to be done with the printer object is provided and valid.
|
2002
|
-
raise
|
2003
|
-
raise
|
2003
|
+
raise Jamf::MissingDataError, "action must be provided, must be one of :#{PRINTER_ACTIONS.keys.join(':,')}." if opts[:action].nil?
|
2004
|
+
raise Jamf::InvalidDataError, "action must be one of :#{PRINTER_ACTIONS.keys.join(',:')}." unless PRINTER_ACTIONS.keys.include? opts[:action]
|
2004
2005
|
|
2005
2006
|
|
2006
2007
|
# Checks if the make_default option is valid, and sets the default if needed.
|
2007
|
-
raise
|
2008
|
+
raise Jamf::InvalidDataError, "make_default must be either true or false." unless opts[:make_default].is_a?(TrueClass) || opts[:make_default].is_a?(FalseClass) || opts[:make_default].nil?
|
2008
2009
|
|
2009
2010
|
opts[:make_default] = false if opts[:make_default].nil?
|
2010
2011
|
|
2011
|
-
id =
|
2012
|
-
raise
|
2012
|
+
id = Jamf::Printer.valid_id identifier, cnx: @cnx
|
2013
|
+
raise Jamf::NoSuchItemError, "No printer matches '#{identifier}'" unless id
|
2013
2014
|
id
|
2014
2015
|
end
|
2015
2016
|
|
2016
2017
|
def rest_xml
|
2017
|
-
doc = REXML::Document.new
|
2018
|
+
doc = REXML::Document.new Jamf::Connection::XML_HEADER
|
2018
2019
|
obj = doc.add_element RSRC_OBJECT_KEY.to_s
|
2019
2020
|
|
2020
2021
|
general = obj.add_element 'general'
|