ruby-jss 2.0.0a10 → 2.0.0b3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README-2.0.0.md +53 -32
- data/lib/jamf/api/classic/api_objects/computer.rb +18 -15
- data/lib/jamf/api/classic/api_objects/computer_group.rb +1 -0
- data/lib/jamf/api/classic/api_objects/criteriable.rb +1 -1
- data/lib/jamf/api/classic/api_objects/mdm.rb +40 -24
- data/lib/jamf/api/classic/api_objects/mobile_device.rb +8 -12
- data/lib/jamf/api/classic/api_objects/mobile_device_application.rb +35 -6
- data/lib/jamf/api/classic/api_objects/policy.rb +8 -17
- data/lib/jamf/api/classic/api_objects/script.rb +1 -1
- data/lib/jamf/api/classic/base_classes/advanced_search.rb +5 -5
- data/lib/jamf/api/classic/base_classes/api_object.rb +26 -26
- data/lib/jamf/api/classic/base_classes/extension_attribute.rb +2 -2
- data/lib/jamf/api/classic/base_classes/group.rb +57 -40
- data/lib/jamf/api/connection/attributes.rb +51 -4
- data/lib/jamf/api/connection/classic_api.rb +2 -1
- data/lib/jamf/api/connection/connect.rb +49 -2
- data/lib/jamf/api/connection/constants.rb +6 -0
- data/lib/jamf/api/connection/jamf_pro_api.rb +6 -2
- data/lib/jamf/api/connection/token.rb +10 -3
- data/lib/jamf/api/connection.rb +1 -1
- data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +9 -1
- data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +21 -9
- data/lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb +178 -0
- data/lib/jamf/api/jamf_pro/mixins/prestage.rb +17 -7
- data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_preview_search_results.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_v2_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/account.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/{access_groups_search_results.rb → account_driven_user_enrollment_session_token_settings.rb} +14 -14
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v4.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_summary.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/admin_account.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_criteria_choices.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/android_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_analytics_setting.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_dynamics_config.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_path.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/apple_tv_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/application_attributes.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/application_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/attributes.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/authorization.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/{deprecated_configuration_search_results.rb → available_updates.rb} +12 -20
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_process_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_mappings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/branding_image_url.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cache_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/categories_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/category.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_details.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_key.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_record.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/classic_ldap_mappings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v3.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_pool_statistics.rb +1 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore.rb +1 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore_file.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_request.rb +1 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_response.rb +1 -9
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +26 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/{mdm_signing_certificate.rb → computer_group.rb} +18 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/{computer_inventory_response.rb → computer_inventory.rb} +4 -5
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_preferences.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_recovery_lock_password_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_search_results.rb +4 -5
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_update_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_location.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_overview.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/computers_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_profile.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_candidate_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_status_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_update_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/country.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/country_codes.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/create_path.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/csa_token.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/current_account.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/current_authorization.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/data_roaming_setting.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/database_password.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/day_of_week.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/delete_user_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/department.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/departments_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_communication_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_compliance_information.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_body.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/diagnostic_submission_setting.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_exclusions.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_limitations.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_scope.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enable_lost_mode_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/engage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_preview.rb +12 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_branding_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependencies.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependency.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_ldap_group_access.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_ldap_auth.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_list.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_sso_auth.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_text.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_v2.rb +3 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_process_text_object.rb +5 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/export_field.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/export_parameters.rb +5 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/external_recipient.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_delete.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/filter.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/font_path.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_ldap_auth.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_sso_auth.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_text.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_mappings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +2 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_request.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_response.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results.rb +1 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/href_response.rb +3 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/icon_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ids.rb +5 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/initialize.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/initialize_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/install_package.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/integer_wrapper.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/internal_recipient.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_information.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_error.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error_cause.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_success.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column_result.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_invalid_csv_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_application_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_nation_credentials.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_package_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/{enrollment_access_group.rb → jamf_pro_information_v2.rb} +35 -34
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_server_url.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_version.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_protect_plan.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/language_code.rb +5 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_server.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/locale.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/location.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +28 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/markdown.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_client_type.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_state.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_type.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_mappings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_request.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_response.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/memcached_endpoints.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v2.rb +61 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_get_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_v2.rb +7 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_extension_attribute_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_group.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_params.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/network.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/network_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification_type.rb +3 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/notification_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history.rb +1 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +1 -6
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/order_by.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/package_manifest.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/parent_app.rb +5 -5
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_ids_on_dashboard.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt_action.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_on_dashboard.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_summary.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/patch_version.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/personal_hotspot_setting.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/plugin_path.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties_v1.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependencies.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependency.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/process_texts_search_results.rb +3 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_registration_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_settings_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/protect_updatable_settings_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/provisioning_profile.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/recalculation_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/recipient.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/recipients.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/reenrollment.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/renew_mdm_profile_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/restart_device_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/retry_patch_policy_params.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/{safelisted_apps.rb → safelisted_app.rb} +15 -11
- data/lib/jamf/api/jamf_pro/oapi_schemas/script.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/scripts_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/search_active_patch_history_params.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/search_patch_policy_log_params.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/security.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/security_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_install_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_interaction_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_login_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/session.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_candidate_request.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_details_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/session_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/set_recovery_lock_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/settings_command.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/shared_device_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/signature.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/site.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/smart_search_criterion.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_configuration.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_patch_policy_summaries.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/software_update_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_cert_parse_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_parse.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response_with_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_with_details.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_metadata_url.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/sso_settings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/startup_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/static_user_group.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_certificate_upload.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_create.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_update.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_features.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_request.rb +5 -5
- data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_response.rb +5 -5
- data/lib/jamf/api/jamf_pro/oapi_schemas/time_frame.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/time_zone.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/tv_os_details.rb +9 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/udids.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_apple_tv.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device_v2.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/update_tv_os.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_attributes.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_mappings.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_request.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_response.rb +1 -4
- data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +3 -3
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_ca_record.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record_search_results.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_service_status.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/verbose_package_deployment_response.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/voice_roaming_setting.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_list_view.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_patch.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_post.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_locations.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription_base.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscriptions.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_admin_account.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_token_subscription.rb +1 -2
- data/lib/jamf/api/jamf_pro/oapi_schemas/web_link.rb +1 -2
- data/lib/jamf/client/jamf_binary.rb +76 -77
- data/lib/jamf/client/jamf_helper.rb +245 -235
- data/lib/jamf/client/management_action.rb +63 -53
- data/lib/jamf/client.rb +3 -3
- data/lib/jamf/constants.rb +1 -1
- data/lib/jamf/deprecations/deprecated_api_connection_class.rb +29 -0
- data/lib/jamf/deprecations/deprecated_api_constant.rb +3 -1
- data/lib/jamf/deprecations/deprecated_config_constant.rb +3 -1
- data/lib/jamf/version.rb +1 -1
- data/lib/zeitwerk_config.rb +23 -17
- data/test/{README.md → README-TEST.md} +3 -0
- data/test/bin/runtests +42 -2
- data/test/lib/jamf_test/APITest.rb +33 -7
- data/test/lib/jamf_test/advanced_search.rb +40 -0
- data/test/lib/jamf_test/collection_tests.rb +8 -13
- data/test/lib/jamf_test/prestage_tests.rb +135 -0
- data/test/lib/jamf_test.rb +7 -1
- data/test/tests/advanced_computer_search.rb +36 -0
- data/test/tests/advanced_mobile_device_search.rb +36 -0
- data/test/tests/advanced_user_search.rb +36 -0
- data/test/tests/building.rb +41 -0
- data/test/tests/computer.rb +41 -0
- data/test/tests/computer_group.rb +132 -0
- data/test/tests/computer_prestage.rb +36 -0
- data/test/tests/department.rb +41 -0
- data/test/tests/inventory_preload_record.rb +2 -2
- data/test/tests/mobile_device.rb +41 -0
- data/test/tests/mobile_device_prestage.rb +37 -0
- data/test/tests/policy.rb +39 -50
- metadata +41 -53
- data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v1.rb +0 -102
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_request.rb +0 -92
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_response.rb +0 -105
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_update.rb +0 -92
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_request.rb +0 -166
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_response.rb +0 -163
- data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_update.rb +0 -171
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings.rb +0 -264
@@ -31,7 +31,7 @@ module Jamf
|
|
31
31
|
|
32
32
|
# Module for working with the Management Action.app, which is an interface
|
33
33
|
# to the Notification Center
|
34
|
-
# This should be
|
34
|
+
# This should be included into Jamf::Client
|
35
35
|
#####################################
|
36
36
|
module ManagementAction
|
37
37
|
|
@@ -43,67 +43,77 @@ module Jamf
|
|
43
43
|
# MGMT_ACTION_BUNDLE_ID = 'com.jamfsoftware.Management-Action'.freeze
|
44
44
|
# HUP_NOTIF_CTR_CMD = '/usr/bin/killall sighup usernoted NotificationCenter'.freeze
|
45
45
|
|
46
|
+
# when this module is included, also extend our Class Methods
|
47
|
+
def self.included(includer)
|
48
|
+
Jamf.load_msg "--> #{includer} is including Jamf::Client::ManagementAction"
|
49
|
+
includer.extend(ClassMethods)
|
50
|
+
end
|
51
|
+
|
46
52
|
# class Methods
|
47
53
|
#####################################
|
48
54
|
|
49
|
-
|
50
|
-
raise Jamf::InvalidDataError, 'delay: must be a non-negative integer.' unless delay.is_a?(Integer) && delay > -1
|
55
|
+
module ClassMethods
|
51
56
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
57
|
+
def management_action(msg, title: nil, subtitle: nil, delay: 0)
|
58
|
+
raise Jamf::InvalidDataError, 'delay: must be a non-negative integer.' unless delay.is_a?(Integer) && delay > -1
|
59
|
+
|
60
|
+
cmd = Shellwords.escape MGMT_ACTION.to_s
|
61
|
+
cmd << " -message #{Shellwords.escape msg.to_s}"
|
62
|
+
cmd << " -title #{Shellwords.escape title.to_s}" if title
|
63
|
+
cmd << " -subtitle #{Shellwords.escape subtitle.to_s}" if subtitle
|
64
|
+
cmd << " -deliverydelay #{Shellwords.escape delay}" if delay > 0
|
65
|
+
`#{cmd} 2>&1`
|
66
|
+
end
|
67
|
+
alias nc_notify management_action
|
68
|
+
|
69
|
+
# Skipping all the force-alerts stuff until we figure out cleaner
|
70
|
+
# ways to do it in 10.13+
|
71
|
+
# The plan is to be able to make the NotificationCenter notification be an
|
72
|
+
# 'alert' (which stays visible til the user clicks) or a
|
73
|
+
# 'banner' (which vanishes in a few seconds), regardless of the user's
|
74
|
+
# setting in the NC prefs.
|
75
|
+
|
76
|
+
def force_alerts
|
77
|
+
orig_flags = {}
|
78
|
+
console_users.each do |user|
|
79
|
+
orig_flags[user] = set_mgmt_action_ncprefs_flags user, NC_ALERT_STYLE_FLAGS, hup: false
|
80
|
+
end
|
81
|
+
system HUP_NOTIF_CTR_CMD unless orig_flags.empty?
|
82
|
+
sleep 1
|
83
|
+
orig_flags
|
72
84
|
end
|
73
|
-
system HUP_NOTIF_CTR_CMD unless orig_flags.empty?
|
74
|
-
sleep 1
|
75
|
-
orig_flags
|
76
|
-
end
|
77
85
|
|
78
|
-
|
79
|
-
|
80
|
-
|
86
|
+
def restore_alerts(orig_flags)
|
87
|
+
orig_flags.each do |user, flags|
|
88
|
+
set_mgmt_action_ncprefs_flags user, flags, hup: false
|
89
|
+
end
|
90
|
+
system HUP_NOTIF_CTR_CMD unless orig_flags.empty?
|
81
91
|
end
|
82
|
-
system HUP_NOTIF_CTR_CMD unless orig_flags.empty?
|
83
|
-
end
|
84
92
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
93
|
+
# set the NotificationCenter option flags for a user
|
94
|
+
# flags = an integer.
|
95
|
+
#
|
96
|
+
# Doesn't seem to work in 10.13, so ignore this for now.
|
97
|
+
#
|
98
|
+
# @return [Integer] the original flags, or given flags if no originals.
|
99
|
+
#
|
100
|
+
def set_mgmt_action_ncprefs_flags(user, flags, hup: true)
|
101
|
+
plist = Pathname.new "/Users/#{user}/Library/Preferences/#{NCPREFS_DOMAIN}.plist"
|
102
|
+
prefs = JSS.parse_plist plist
|
103
|
+
mgmt_action_setting = prefs['apps'].select { |a| a['bundle-id'] == MGMT_ACTION_BUNDLE_ID }.first
|
104
|
+
if mgmt_action_setting
|
105
|
+
orig_flags = mgmt_action_setting['flags']
|
106
|
+
mgmt_action_setting['flags'] = flags
|
107
|
+
else
|
108
|
+
orig_flags = flags
|
109
|
+
prefs['apps'] << { 'bundle-id' => MGMT_ACTION_BUNDLE_ID, 'flags' => flags }
|
110
|
+
end
|
111
|
+
plist.open('w') { |f| f.write JSS.xml_plist_from(prefs) }
|
112
|
+
system HUP_NOTIF_CTR_CMD if hup
|
113
|
+
orig_flags
|
102
114
|
end
|
103
|
-
|
104
|
-
|
105
|
-
orig_flags
|
106
|
-
end
|
115
|
+
|
116
|
+
end # ClassMethods
|
107
117
|
|
108
118
|
end # moculde
|
109
119
|
|
data/lib/jamf/client.rb
CHANGED
@@ -64,9 +64,9 @@ module Jamf
|
|
64
64
|
# the path to a users byhost folder from home
|
65
65
|
USER_PREFS_BYHOST_FOLDER = 'Library/Preferences/ByHost/'.freeze
|
66
66
|
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
include Jamf::Client::JamfBinary
|
68
|
+
include Jamf::Client::JamfHelper
|
69
|
+
include Jamf::Client::ManagementAction
|
70
70
|
|
71
71
|
# Class Methods
|
72
72
|
#####################################
|
data/lib/jamf/constants.rb
CHANGED
@@ -30,7 +30,7 @@ module Jamf
|
|
30
30
|
module Constants
|
31
31
|
|
32
32
|
# The minimum Ruby version needed for ruby-jss
|
33
|
-
MINIMUM_RUBY_VERSION = '2.
|
33
|
+
MINIMUM_RUBY_VERSION = '2.6.3'.freeze
|
34
34
|
|
35
35
|
# These are handy for testing values without making new arrays, strings, etc every time.
|
36
36
|
TRUE_FALSE = [true, false].freeze
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright 2022 Pixar
|
2
|
+
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
5
|
+
# with the following modification; you may not use this file except in
|
6
|
+
# compliance with the Apache License and the following modification to it:
|
7
|
+
# Section 6. Trademarks. is deleted and replaced with:
|
8
|
+
#
|
9
|
+
# 6. Trademarks. This License does not grant permission to use the trade
|
10
|
+
# names, trademarks, service marks, or product names of the Licensor
|
11
|
+
# and its affiliates, except as required to comply with Section 4(c) of
|
12
|
+
# the License and to reproduce the content of the NOTICE file.
|
13
|
+
#
|
14
|
+
# You may obtain a copy of the Apache License at
|
15
|
+
#
|
16
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
#
|
18
|
+
# Unless required by applicable law or agreed to in writing, software
|
19
|
+
# distributed under the Apache License with the above modification is
|
20
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
+
# KIND, either express or implied. See the Apache License for the specific
|
22
|
+
# language governing permissions and limitations under the Apache License.
|
23
|
+
|
24
|
+
# @deprecated Use class Jamf::Connection
|
25
|
+
module Jamf
|
26
|
+
|
27
|
+
APIConnection = Connection
|
28
|
+
|
29
|
+
end
|
data/lib/jamf/version.rb
CHANGED
data/lib/zeitwerk_config.rb
CHANGED
@@ -29,7 +29,7 @@ def setup_zeitwerk_loader(loader)
|
|
29
29
|
loader.ignore __FILE__
|
30
30
|
|
31
31
|
# these paths all define classes & modules directly below 'Jamf'
|
32
|
-
# If we didn't
|
32
|
+
# If we didn't collapse them, then e.g.
|
33
33
|
# /jamf/api/base_classes/classic/group.rb
|
34
34
|
# would be expected to define
|
35
35
|
# Jamf::Api::BaseClasses::Classic::Group
|
@@ -51,7 +51,8 @@ def setup_zeitwerk_loader(loader)
|
|
51
51
|
|
52
52
|
loader.collapse("#{__dir__}/jamf/deprecations")
|
53
53
|
|
54
|
-
# filenames => Constants, which don't adhere to zeitwerk's parsing standards
|
54
|
+
# filenames => Constants, which don't adhere to zeitwerk's parsing standards.
|
55
|
+
#
|
55
56
|
# Mostly because the a filename like 'oapi_object' would be
|
56
57
|
# loaded by zeitwerk expecting it to define 'OapiObject', but it really
|
57
58
|
# defines 'OAPIObject'
|
@@ -86,16 +87,18 @@ def setup_zeitwerk_loader(loader)
|
|
86
87
|
loader.inflector.inflect 'md_prestage_name' => 'MobileDevicePrestageName'
|
87
88
|
loader.inflector.inflect 'md_prestage_names' => 'MobileDevicePrestageNames'
|
88
89
|
loader.inflector.inflect 'md_prestage_skip_setup_items' => 'MobileDevicePrestageSkipSetupItems'
|
90
|
+
loader.inflector.inflect 'macos_managed_updates' => 'MacOSManagedUpdates'
|
89
91
|
|
90
|
-
# deprecations, separated so they load only when used
|
91
|
-
|
92
|
-
|
92
|
+
# deprecations, separated so they load only when used.
|
93
|
+
# When its time to get rid of them, delete the files from the
|
94
|
+
# 'deprecations' directory, and the matching line here.
|
95
|
+
loader.inflector.inflect('deprecated_api_constant' => 'API')
|
96
|
+
loader.inflector.inflect('deprecated_config_constant' => 'CONFIG')
|
97
|
+
loader.inflector.inflect('deprecated_api_connection_class' => 'APIConnection')
|
93
98
|
|
94
99
|
# These should be ignored, some will be required directly
|
95
100
|
#####################################
|
96
101
|
|
97
|
-
loader.ignore "#{__dir__}/jamf/api/jamf_pro/pre_oapi"
|
98
|
-
|
99
102
|
loader.ignore "#{__dir__}/jamf/db_connection.rb"
|
100
103
|
loader.ignore "#{__dir__}/jamf/ruby_extensions.rb"
|
101
104
|
loader.ignore "#{__dir__}/jamf/ruby_extensions"
|
@@ -105,16 +108,18 @@ def setup_zeitwerk_loader(loader)
|
|
105
108
|
loader.ignore "#{__dir__}/ruby-jss.rb"
|
106
109
|
|
107
110
|
# callback for when a specific file/constant loads
|
111
|
+
# duplicate and uncomment this if desired to react to
|
112
|
+
# specific things loading
|
108
113
|
#####################################
|
109
|
-
loader.on_load('Jamf::SomeClass') do |klass, abspath|
|
110
|
-
|
111
|
-
end
|
114
|
+
# loader.on_load('Jamf::SomeClass') do |klass, abspath|
|
115
|
+
# Jamf.load_msg "I just loaded #{klass} from #{abspath}"
|
116
|
+
# end
|
112
117
|
|
113
118
|
# callback for when anything loads
|
114
119
|
# - const_path is like "Jamf::SomeClass" or "Jamf::SomeClass::SOME_CONST_ARRY"
|
115
120
|
# - value is the value that constant contains after loading,
|
116
|
-
# e.g.
|
117
|
-
#
|
121
|
+
# e.g. the class Jamf::SomeClass for 'Jamf::SomeClass' or
|
122
|
+
# an Array for the constant "Jamf::SomeClass::SOME_CONST_ARRY"
|
118
123
|
# - abspath is the full path to the file where the constant was loaded from.
|
119
124
|
#####################################
|
120
125
|
loader.on_load do |const_path, value, abspath|
|
@@ -122,13 +127,14 @@ def setup_zeitwerk_loader(loader)
|
|
122
127
|
|
123
128
|
# Parse OAPI_PROPERTIES into getters and setters for subclasses of
|
124
129
|
# OAPIObject in the JPAPI.
|
130
|
+
#
|
125
131
|
# The class we just loaded must have this method and constant
|
126
|
-
# and the
|
132
|
+
# and the method must not have run already for the class or any superclass.
|
127
133
|
# This prevents running parse_oapi_properties again in subclasses that
|
128
134
|
# don't need to do that
|
129
|
-
if value.respond_to?(:
|
135
|
+
if value.respond_to?(:oapi_properties_parsed?) && \
|
130
136
|
defined?(value::OAPI_PROPERTIES) && \
|
131
|
-
|
137
|
+
!value.oapi_properties_parsed?
|
132
138
|
|
133
139
|
parsed = value.parse_oapi_properties
|
134
140
|
Jamf.load_msg "Parsed OAPI_PROPERTIES for #{value}" if parsed
|
@@ -157,6 +163,6 @@ def eager_load_for_testing
|
|
157
163
|
|
158
164
|
@loader.eager_load(force: true)
|
159
165
|
warn :loaded
|
160
|
-
# rescue Zeitwerk::NameError => e
|
161
|
-
# warn e.message
|
166
|
+
# rescue Zeitwerk::NameError => e
|
167
|
+
# warn e.message
|
162
168
|
end
|
@@ -47,6 +47,9 @@ Want to test with a different version of ruby? Change the #! line of the `runtes
|
|
47
47
|
|
48
48
|
- The individual tests are methods in classes defined in files in the 'tests' directory adjacent to this file.
|
49
49
|
- In general, each class test a matching ruby-jss class, usually an APIObject (classic) or JPAPIResource (jamf pro).
|
50
|
+
- Shared code is in modules defined in the 'jamf_test' directory. See those files for more info. E.g.
|
51
|
+
- 'collection_tests.rb' defines common tests for all collection-resources
|
52
|
+
- 'prestage_tests.rb' defines common tests for 'computer_prestage' and 'mobile_device_prestage'
|
50
53
|
|
51
54
|
**WARNING**: **DANGER DANGER** Be very careful about running these tests on your production Jamf Pro server!!!
|
52
55
|
|
data/test/bin/runtests
CHANGED
@@ -29,6 +29,40 @@ require 'pathname'
|
|
29
29
|
require 'getoptlong'
|
30
30
|
require 'ruby-jss'
|
31
31
|
|
32
|
+
# Debug Trace support, Ideas from
|
33
|
+
# https://gist.github.com/bendilley/1453a555e981ed533f68
|
34
|
+
# and the other gist and stack overflow mentioned there.
|
35
|
+
####################################
|
36
|
+
|
37
|
+
# Enable tracing to help debug stack level too deep errors
|
38
|
+
$do_tracing = false
|
39
|
+
|
40
|
+
# set this to true to save the call traces to a file
|
41
|
+
$save_trace = false
|
42
|
+
|
43
|
+
# the file to hold the traces
|
44
|
+
$trace_out = open('/tmp/ruby-jss-tests-trace.txt', 'w')
|
45
|
+
|
46
|
+
# the max call-stack depth - adjust this to help catch and
|
47
|
+
# debug SystemStackError exceptions
|
48
|
+
$trace_max_call_stack_depth = 1000
|
49
|
+
|
50
|
+
# the tracing proc
|
51
|
+
set_trace_func proc { |event, file, line, id, _binding, classname|
|
52
|
+
if $do_tracing
|
53
|
+
begin
|
54
|
+
if event == 'call'
|
55
|
+
$trace_out.puts "#{file}:#{line} #{classname}##{id}" if $save_trace
|
56
|
+
raise 'MaxCallStackReached' if caller_locations.length > $trace_max_call_stack_depth
|
57
|
+
end
|
58
|
+
rescue => e
|
59
|
+
warn "ERROR: #{e.class}: #{e}"
|
60
|
+
e.backtrace.each { |l| warn "..#{l}" }
|
61
|
+
exit 1
|
62
|
+
end
|
63
|
+
end # if
|
64
|
+
}
|
65
|
+
|
32
66
|
# app
|
33
67
|
class App
|
34
68
|
|
@@ -62,8 +96,8 @@ class App
|
|
62
96
|
@testsdir = @appdir + 'tests'
|
63
97
|
|
64
98
|
@tests_to_run = ARGV.dup
|
65
|
-
@tests_to_run = @testsdir.children.map { |c| c.basename.to_s }.sort if @tests_to_run
|
66
|
-
@tests_to_run.delete_if { |t| t.start_with? '.'}
|
99
|
+
@tests_to_run = @testsdir.children.map { |c| c.basename.to_s }.sort if @tests_to_run.empty?
|
100
|
+
@tests_to_run.delete_if { |t| t.start_with? '.' }
|
67
101
|
|
68
102
|
@minitest_opts = ['--verbose']
|
69
103
|
|
@@ -126,6 +160,7 @@ class App
|
|
126
160
|
|
127
161
|
###################################
|
128
162
|
def run_tests
|
163
|
+
puts
|
129
164
|
JamfTest.say "Starting tests of ruby-jss v#{Jamf::VERSION}, using ruby version #{RUBY_VERSION}"
|
130
165
|
JamfTest.say "API Connection: #{Jamf.cnx}; Server running Jamf Pro #{Jamf.cnx.jamf_version}"
|
131
166
|
|
@@ -158,6 +193,7 @@ class App
|
|
158
193
|
###################################
|
159
194
|
def show_help
|
160
195
|
return false unless @show_help
|
196
|
+
|
161
197
|
puts <<-USAGEBLURB
|
162
198
|
Usage: #{File.basename __FILE__} [options] [spec [spec ...]]
|
163
199
|
|
@@ -209,6 +245,10 @@ if $PROGRAM_NAME == __FILE__
|
|
209
245
|
app = App.new
|
210
246
|
app.run
|
211
247
|
exit 0
|
248
|
+
rescue SystemStackError
|
249
|
+
puts $!
|
250
|
+
puts caller[0..100]
|
251
|
+
exit 1
|
212
252
|
rescue => e
|
213
253
|
puts "ERROR #{e.class}: #{e}"
|
214
254
|
puts e.backtrace
|
@@ -41,25 +41,51 @@ module JamfTest
|
|
41
41
|
end
|
42
42
|
|
43
43
|
#####
|
44
|
-
def validate_hash(hash, has_key: nil, val_class: nil)
|
44
|
+
def validate_hash(hash, has_key: nil, class_for_has_key: nil, key_class: nil, val_class: nil)
|
45
45
|
raise 'Value is not a Hash' unless hash.is_a? Hash
|
46
|
-
return unless has_key
|
47
46
|
|
48
|
-
|
49
|
-
|
47
|
+
if hash.empty?
|
48
|
+
say 'WARNING: Hash is empty! This may be OK depending on your environment'
|
49
|
+
return
|
50
|
+
end
|
51
|
+
|
52
|
+
if has_key
|
53
|
+
raise "Hash does not have required key #{has_key}" unless hash.key?(has_key)
|
54
|
+
|
55
|
+
say "Hash has key '#{has_key}'"
|
56
|
+
if class_for_has_key
|
57
|
+
val = hash[has_key]
|
58
|
+
raise "Value '#{val}' for key '#{has_key}' is a #{val.class} not #{class_for_has_key}" unless val.is_a?(class_for_has_key)
|
59
|
+
|
60
|
+
say "Value '#{val}' for key '#{has_key}' is a #{class_for_has_key}"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
if key_class
|
65
|
+
key = hash.keys.sample
|
50
66
|
|
51
|
-
|
67
|
+
raise "Hash key'#{key}' is a #{key.class} not #{key_class}" unless key.is_a?(key_class)
|
68
|
+
|
69
|
+
say "Hash keys are class: #{key_class}"
|
70
|
+
end
|
71
|
+
|
72
|
+
if val_class
|
73
|
+
val = hash.values.sample
|
74
|
+
raise "Hash value '#{val}' is a #{val.class} not #{val_class}" unless val.is_a?(val_class)
|
75
|
+
|
76
|
+
say "Hash value are class: #{val_class}"
|
77
|
+
end
|
52
78
|
end
|
53
79
|
|
54
80
|
#####
|
55
81
|
def validate_array(ary, item_class: nil)
|
56
82
|
raise 'Value is not an Array' unless ary.is_a? Array
|
57
|
-
return unless item_class
|
58
83
|
|
59
84
|
if ary.empty?
|
60
|
-
|
85
|
+
say 'WARNING: Array is empty! This may be OK depending on your environment'
|
61
86
|
return
|
62
87
|
end
|
88
|
+
return unless item_class
|
63
89
|
|
64
90
|
raise "Randomly chosen item from Array is not a #{item_class}" unless ary.sample.is_a? item_class
|
65
91
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### Copyright 2022 Pixar
|
2
|
+
|
3
|
+
###
|
4
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
5
|
+
### with the following modification; you may not use this file except in
|
6
|
+
### compliance with the Apache License and the following modification to it:
|
7
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
8
|
+
###
|
9
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
10
|
+
### names, trademarks, service marks, or product names of the Licensor
|
11
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
12
|
+
### the License and to reproduce the content of the NOTICE file.
|
13
|
+
###
|
14
|
+
### You may obtain a copy of the Apache License at
|
15
|
+
###
|
16
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
###
|
18
|
+
### Unless required by applicable law or agreed to in writing, software
|
19
|
+
### distributed under the Apache License with the above modification is
|
20
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
+
### KIND, either express or implied. See the Apache License for the specific
|
22
|
+
### language governing permissions and limitations under the Apache License.
|
23
|
+
###
|
24
|
+
###
|
25
|
+
|
26
|
+
module JamfTest
|
27
|
+
|
28
|
+
module AdvancedSearchTests
|
29
|
+
|
30
|
+
include JamfTest::CollectionTests
|
31
|
+
|
32
|
+
# run the tests
|
33
|
+
def run_class_tests
|
34
|
+
run_collection_tests do_object_tests: false
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end # module
|
39
|
+
|
40
|
+
end # module JamfTest
|
@@ -93,11 +93,12 @@ module JamfTest
|
|
93
93
|
fetch_random
|
94
94
|
return unless do_object_tests
|
95
95
|
|
96
|
-
#
|
96
|
+
# The methods below are very basic and assume a simple object
|
97
97
|
# that can be created with only a 'name'.
|
98
98
|
#
|
99
99
|
# For anything more complex, they should be overridden in the classes that
|
100
100
|
# mixin this module, since the details will be very different
|
101
|
+
# See inventory_preload_record.rb for an example
|
101
102
|
|
102
103
|
create_new
|
103
104
|
add_data_to_new
|
@@ -128,8 +129,7 @@ module JamfTest
|
|
128
129
|
|
129
130
|
one_of_all = @cached_all.sample
|
130
131
|
|
131
|
-
validate_hash one_of_all, has_key: :id,
|
132
|
-
|
132
|
+
validate_hash one_of_all, has_key: :id, class_for_has_key: id_class
|
133
133
|
end
|
134
134
|
|
135
135
|
#################
|
@@ -140,8 +140,6 @@ module JamfTest
|
|
140
140
|
say "There are no #{collection_class} objects on the server, not testing sorted_all"
|
141
141
|
return
|
142
142
|
end
|
143
|
-
|
144
|
-
|
145
143
|
sorted_desc = collection_class.all sort: 'id:desc'
|
146
144
|
raise "#{collection_class}.all sort: 'id:desc' ; didn't work as expected" unless sorted_desc.first[:id].to_i >= sorted_desc.last[:id].to_i
|
147
145
|
|
@@ -178,11 +176,11 @@ module JamfTest
|
|
178
176
|
say "Ran #{collection_class}.all_ids"
|
179
177
|
validate_array ids, item_class: id_class
|
180
178
|
|
181
|
-
|
182
179
|
identifiers.each do |ident|
|
183
180
|
next if ident == :id
|
184
181
|
|
185
|
-
mth = ident.end_with?('s') ? "all_#{ident}es" : "all_#{ident}s"
|
182
|
+
mth = ident.to_s.end_with?('s') ? "all_#{ident}es" : "all_#{ident}s"
|
183
|
+
say "Testing #{collection_class}.#{mth}"
|
186
184
|
collection_class.send mth
|
187
185
|
say "Ran #{collection_class}.#{mth}"
|
188
186
|
end
|
@@ -198,7 +196,6 @@ module JamfTest
|
|
198
196
|
cached_ids = collection_class.all_ids cached_list: @cached_all
|
199
197
|
say "Ran #{collection_class}.all_ids cached_list: @cached_all"
|
200
198
|
validate_array cached_ids, item_class: id_class
|
201
|
-
|
202
199
|
end
|
203
200
|
|
204
201
|
#################
|
@@ -225,7 +222,6 @@ module JamfTest
|
|
225
222
|
|
226
223
|
validate_hash ids_to_other
|
227
224
|
validate_array ids_to_other.keys, item_class: id_class
|
228
|
-
|
229
225
|
end
|
230
226
|
|
231
227
|
################
|
@@ -252,7 +248,6 @@ module JamfTest
|
|
252
248
|
|
253
249
|
validate_hash ids_to_other
|
254
250
|
validate_array ids_to_other.keys, item_class: id_class
|
255
|
-
|
256
251
|
end
|
257
252
|
|
258
253
|
################
|
@@ -267,7 +262,9 @@ module JamfTest
|
|
267
262
|
id, other = ids_to_other_ident.to_a.sample
|
268
263
|
|
269
264
|
valid_id = collection_class.valid_id other
|
270
|
-
|
265
|
+
unless id.to_s == valid_id.to_s
|
266
|
+
raise "#{collection_class} id #{id}, has #{other_ident} '#{other}', but calling .valid_id('#{other}') returned id: #{valid_id}"
|
267
|
+
end
|
271
268
|
|
272
269
|
say "#{collection_class}.valid_id for #{other_ident} '#{other}' returned the correct id"
|
273
270
|
end
|
@@ -286,13 +283,11 @@ module JamfTest
|
|
286
283
|
########### Object Tests
|
287
284
|
####################################
|
288
285
|
|
289
|
-
|
290
286
|
# override this if the class requires more than 'name' with .create
|
291
287
|
################
|
292
288
|
def create_new
|
293
289
|
@unsaved_new_object = collection_class.create name: test_object_name
|
294
290
|
say "Created new #{collection_class}, to be saved in Jamf."
|
295
|
-
|
296
291
|
end
|
297
292
|
|
298
293
|
# override this if your class can take more than 'name'
|