ruby-jss 1.6.4 → 2.0.0a10
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 +40 -4
- data/README-2.0.0.md +316 -0
- data/README.md +48 -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 +210 -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 -21
- 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 +49 -47
- 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 +602 -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 +346 -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 +23 -31
- 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 +162 -0
- data/test/README.md +27 -112
- data/test/bin/runtests +57 -130
- data/test/lib/jamf_test/APITest.rb +80 -0
- data/test/lib/jamf_test/auth.rb +267 -0
- data/test/lib/jamf_test/collection_tests.rb +393 -0
- data/test/lib/{testhelper.rb → jamf_test.rb} +8 -11
- data/{lib/jss/ruby_extensions/filetest.rb → test/tests/category.rb} +17 -20
- data/test/tests/device_enrollment.rb +101 -0
- data/test/tests/inventory_preload_record.rb +131 -0
- data/{lib/jss/ruby_extensions.rb → test/tests/jp_building.rb} +16 -12
- data/test/tests/policy.rb +163 -0
- metadata +646 -204
- data/lib/jamf/api/base_classes/collection_resource.rb +0 -612
- data/lib/jamf/api/base_classes/json_object.rb +0 -1103
- 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
data/test/bin/runtests
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
### Copyright
|
3
|
+
### Copyright 2022 Pixar
|
4
4
|
|
5
5
|
###
|
6
6
|
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
@@ -25,36 +25,18 @@
|
|
25
25
|
###
|
26
26
|
###
|
27
27
|
|
28
|
-
# Uses the MiniTest::Spec infrastructure to run one or tests of ruby-jss
|
29
|
-
#
|
30
|
-
# We do not use minitest/autorun, so that we have more control over which tests
|
31
|
-
# are run and how. But the individual spec files are standard MiniTest::Spec
|
32
|
-
# 'describe' blocks
|
33
|
-
#
|
34
|
-
# Those blocks become classes when the tests are run, and for each test,
|
35
|
-
# an instance of the class is created.
|
36
|
-
# As such, the interior of the blocks can be treated like class definitions,
|
37
|
-
# defining constants, class methods, instance methods and so on.
|
38
|
-
#
|
39
|
-
# As well as that class-based infratructure, this tool includes a JSSTestHelper
|
40
|
-
# module which defines usefule constants and helper methods, accessible from
|
41
|
-
# anywhere via the module name.
|
42
|
-
#
|
43
|
-
|
44
28
|
require 'pathname'
|
45
29
|
require 'getoptlong'
|
46
|
-
require '
|
47
|
-
require 'minitest/spec'
|
48
|
-
# require 'minitest/autorun' # DO NOT REQUIRE AUTORUN - we manually run each file below.
|
30
|
+
require 'ruby-jss'
|
49
31
|
|
50
32
|
# app
|
51
33
|
class App
|
52
34
|
|
53
|
-
|
35
|
+
TEST_MODULE_FILE_SUFFIX = '.rb'
|
54
36
|
|
55
37
|
# Server and port come from CLI opts or ruby-jss.conf
|
56
38
|
#
|
57
|
-
# User comes from
|
39
|
+
# User comes from keychain, or prompt when saving credentials for host
|
58
40
|
#
|
59
41
|
# pw come from keychain, or is prompted and stored
|
60
42
|
# in keychain with user.
|
@@ -62,85 +44,58 @@ class App
|
|
62
44
|
# TODO: support for other APIConnection options
|
63
45
|
#
|
64
46
|
OPTS = GetoptLong.new(
|
65
|
-
['--
|
47
|
+
['--host', '-h', GetoptLong::REQUIRED_ARGUMENT],
|
66
48
|
['--port', '-p', GetoptLong::REQUIRED_ARGUMENT],
|
67
|
-
['--
|
68
|
-
['--
|
69
|
-
['--db-port', '-P', GetoptLong::REQUIRED_ARGUMENT],
|
70
|
-
['--db-user', '-U', GetoptLong::REQUIRED_ARGUMENT],
|
71
|
-
['--gem-dir', '-g', '-i', GetoptLong::REQUIRED_ARGUMENT],
|
72
|
-
['--saved-data', '-d', GetoptLong::NO_ARGUMENT],
|
73
|
-
['--help', '-h', '-H', GetoptLong::NO_ARGUMENT]
|
49
|
+
['--re-save', '-r', GetoptLong::REQUIRED_ARGUMENT],
|
50
|
+
['--help', '-H', GetoptLong::NO_ARGUMENT]
|
74
51
|
)
|
75
52
|
|
76
53
|
# Setup
|
77
54
|
def initialize
|
78
|
-
|
55
|
+
raise "These tests only work in ruby-jss 2.0 and up. You are running #{JSS::VERSION}" unless JSS::VERSION[0].to_i > 1
|
56
|
+
|
79
57
|
parse_opts
|
80
58
|
|
81
59
|
@bindir = Pathname.new File.dirname(__FILE__)
|
82
60
|
@appdir = @bindir.parent
|
83
61
|
@libdir = @appdir + 'lib'
|
84
|
-
@
|
62
|
+
@testsdir = @appdir + 'tests'
|
85
63
|
|
86
64
|
@tests_to_run = ARGV.dup
|
87
|
-
@tests_to_run = @
|
65
|
+
@tests_to_run = @testsdir.children.map { |c| c.basename.to_s }.sort if @tests_to_run .empty?
|
66
|
+
@tests_to_run.delete_if { |t| t.start_with? '.'}
|
88
67
|
|
89
68
|
@minitest_opts = ['--verbose']
|
90
69
|
|
91
|
-
helper_module = @libdir + '
|
70
|
+
helper_module = @libdir + 'jamf_test.rb'
|
92
71
|
load helper_module.to_s
|
93
72
|
end # init
|
94
73
|
|
95
|
-
# Load the gem
|
96
|
-
def load_ruby_jss
|
97
|
-
if @custom_gem_dir
|
98
|
-
ENV['GEM_HOME'] = @custom_gem_dir
|
99
|
-
ENV['GEM_PATH'] = "#{@custom_gem_dir}:#{ENV['GEM_PATH']}"
|
100
|
-
Gem.paths = ENV
|
101
|
-
end
|
102
|
-
require 'ruby-jss'
|
103
|
-
end
|
104
|
-
|
105
74
|
# Parse ARGV
|
106
75
|
def parse_opts
|
107
76
|
OPTS.each do |opt, arg|
|
108
77
|
case opt
|
109
|
-
when '--
|
78
|
+
when '--host'
|
110
79
|
@api_server = arg
|
111
|
-
when '--user'
|
112
|
-
@api_user = arg
|
113
80
|
when '--port'
|
114
81
|
@api_port = arg
|
115
|
-
when '--
|
116
|
-
@
|
117
|
-
when '--db-user'
|
118
|
-
@db_user = arg
|
119
|
-
when '--db-port'
|
120
|
-
@db_port = arg
|
82
|
+
when '--re-save'
|
83
|
+
@re_save_creds = true
|
121
84
|
when '--gem-dir'
|
122
85
|
@custom_gem_dir = arg
|
123
|
-
when '--saved-data'
|
124
|
-
@show_saved_data = true
|
125
86
|
when '--help'
|
126
87
|
@show_help = true
|
127
88
|
end # case
|
128
89
|
end # opts.each
|
129
90
|
end
|
130
91
|
|
131
|
-
|
132
|
-
def apply_defaults
|
133
|
-
@api_server ||= JSS::CONFIG.api_server_name
|
134
|
-
@api_port ||= JSS::CONFIG.api_server_port
|
135
|
-
@db_server ||= JSS::CONFIG.db_server_name
|
136
|
-
@db_port ||= JSS::CONFIG.db_server_port
|
137
|
-
end
|
138
|
-
|
92
|
+
#######################
|
139
93
|
def run
|
140
94
|
return if show_help
|
141
|
-
|
142
|
-
connect_to_servers
|
95
|
+
raise ArgumentError, 'A server hostname must be provided with --host' unless @api_server
|
143
96
|
return unless prod_server_confirmed_if_needed?
|
97
|
+
|
98
|
+
connect
|
144
99
|
run_tests
|
145
100
|
end
|
146
101
|
|
@@ -155,74 +110,52 @@ class App
|
|
155
110
|
prod_server_line = conf.readlines.select { |l| l.start_with? 'api_server_name' }.first
|
156
111
|
return true unless prod_server_line
|
157
112
|
|
158
|
-
prod_server = prod_server_line.chomp.split(': ').last
|
113
|
+
prod_server = prod_server_line.chomp.split(': ').last.strip
|
159
114
|
return true unless prod_server == @api_server
|
160
115
|
|
161
116
|
print "Really run the tests on the production server '#{prod_server}'? (y/n): "
|
162
|
-
doit = gets.chomp
|
117
|
+
doit = $stdin.gets.chomp
|
163
118
|
doit == 'y'
|
164
119
|
end
|
165
120
|
|
166
|
-
|
167
|
-
|
168
|
-
if
|
169
|
-
|
170
|
-
@api_port ||= jss_keychain_creds[:port]
|
171
|
-
@api_user ||= jss_keychain_creds[:user]
|
172
|
-
pw = jss_keychain_creds[:pw]
|
173
|
-
else
|
174
|
-
apply_defaults
|
175
|
-
raise 'Please specify a server with --server' unless @api_server
|
176
|
-
raise 'Please specify a user with --user' unless @api_user
|
177
|
-
pw = 'nopw'
|
178
|
-
end
|
179
|
-
|
180
|
-
JSSTestHelper::Auth.connect_to_api(server: @api_server, port: @api_port, user: @api_user, pw: pw )
|
121
|
+
###################################
|
122
|
+
def connect
|
123
|
+
JamfTest::Auth.delete_api_creds(@api_server) if @re_save_creds
|
124
|
+
JamfTest::Auth.connect_to_api host: @api_server, port: @api_port
|
181
125
|
end
|
182
126
|
|
127
|
+
###################################
|
183
128
|
def run_tests
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
base_runnables = MiniTest::Runnable.runnables.dup
|
129
|
+
JamfTest.say "Starting tests of ruby-jss v#{Jamf::VERSION}, using ruby version #{RUBY_VERSION}"
|
130
|
+
JamfTest.say "API Connection: #{Jamf.cnx}; Server running Jamf Pro #{Jamf.cnx.jamf_version}"
|
188
131
|
|
189
132
|
@tests_to_run.each do |t|
|
190
|
-
t
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
JSSTestHelper.say "Running test #{specfile.basename}: "
|
197
|
-
load specfile.to_s
|
198
|
-
|
199
|
-
MiniTest.run @minitest_opts.dup
|
133
|
+
t = t.chomp TEST_MODULE_FILE_SUFFIX
|
134
|
+
testfile = @testsdir + "#{t}#{TEST_MODULE_FILE_SUFFIX}"
|
135
|
+
unless testfile.file?
|
136
|
+
JamfTest.say "Skipping unknown test #{testfile.basename}"
|
137
|
+
next
|
138
|
+
end
|
200
139
|
|
201
|
-
|
202
|
-
|
203
|
-
puts
|
204
|
-
else
|
205
|
-
JSSTestHelper.say "Skipping unknown test #{specfile.basename}"
|
206
|
-
end # if
|
140
|
+
load testfile.to_s
|
141
|
+
test_class = JamfTest.const_get(camelize_snake(t))
|
207
142
|
|
143
|
+
puts
|
144
|
+
JamfTest.say "Running test #{testfile.basename}: "
|
145
|
+
test_class.new.run_tests
|
146
|
+
rescue => e
|
147
|
+
puts "ERROR in '#{testfile.basename}': #{e.class}: #{e}"
|
148
|
+
puts e.backtrace
|
208
149
|
end # each
|
209
150
|
end # run tests
|
210
151
|
|
211
|
-
|
212
|
-
def
|
213
|
-
|
214
|
-
jss_keychain_creds = JSSTestHelper::Auth.rw_credentials_from_keychain(:jss)
|
215
|
-
msg =
|
216
|
-
if jss_keychain_creds
|
217
|
-
"JSS API Tests will run as user '#{jss_keychain_creds[:user]}' on server '#{jss_keychain_creds[:server]}', port #{jss_keychain_creds[:port]}"
|
218
|
-
else
|
219
|
-
'No JSS API credentials saved, please use --server, --user and --port (if needed)'
|
220
|
-
end
|
221
|
-
puts msg
|
222
|
-
true
|
152
|
+
###################################
|
153
|
+
def camelize_snake(str)
|
154
|
+
str.to_s.split('_').map(&:capitalize).join
|
223
155
|
end
|
224
156
|
|
225
157
|
# display help if asked
|
158
|
+
###################################
|
226
159
|
def show_help
|
227
160
|
return false unless @show_help
|
228
161
|
puts <<-USAGEBLURB
|
@@ -258,18 +191,12 @@ If a different user is later specified for that server, you'll be prompted again
|
|
258
191
|
for a password, and the keychain will be updated.
|
259
192
|
|
260
193
|
Options
|
261
|
-
--
|
262
|
-
--port, -p <port>
|
263
|
-
--
|
264
|
-
|
265
|
-
--
|
266
|
-
--
|
267
|
-
--db-user, -U <user> the API username for the connection
|
268
|
-
--gem-dir, -g, -i <path> the path from which to require ruby-jss
|
269
|
-
(sets GEM_HOME to this path before requiring)
|
270
|
-
--saved-data, -d show the connection data saved in the keychain,
|
271
|
-
if any. (no tests run, password not shown)
|
272
|
-
--help, -h, -H show this help
|
194
|
+
--host, -h <host> The hostname for the JSS API connection
|
195
|
+
--port, -p <port> The port for the API connection
|
196
|
+
--re-save, -r Prompt for user and passwd for this host, even if
|
197
|
+
already saved in the keychain
|
198
|
+
--gem-dir, -g, <path> The path from which to require ruby-jss
|
199
|
+
--help, -h, -H Show this help
|
273
200
|
USAGEBLURB
|
274
201
|
true
|
275
202
|
end # show_help
|
@@ -282,9 +209,9 @@ if $PROGRAM_NAME == __FILE__
|
|
282
209
|
app = App.new
|
283
210
|
app.run
|
284
211
|
exit 0
|
285
|
-
rescue =>
|
286
|
-
|
287
|
-
|
212
|
+
rescue => e
|
213
|
+
puts "ERROR #{e.class}: #{e}"
|
214
|
+
puts e.backtrace
|
288
215
|
exit 1
|
289
216
|
end # begin
|
290
217
|
end # if $0 == __FILE__
|
@@ -0,0 +1,80 @@
|
|
1
|
+
### Copyright 2022 Pixar
|
2
|
+
###
|
3
|
+
### Licensed under the Apache License, Version 2.0 (the "Apache License")
|
4
|
+
### with the following modification; you may not use this file except in
|
5
|
+
### compliance with the Apache License and the following modification to it:
|
6
|
+
### Section 6. Trademarks. is deleted and replaced with:
|
7
|
+
###
|
8
|
+
### 6. Trademarks. This License does not grant permission to use the trade
|
9
|
+
### names, trademarks, service marks, or product names of the Licensor
|
10
|
+
### and its affiliates, except as required to comply with Section 4(c) of
|
11
|
+
### the License and to reproduce the content of the NOTICE file.
|
12
|
+
###
|
13
|
+
### You may obtain a copy of the Apache License at
|
14
|
+
###
|
15
|
+
### http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
###
|
17
|
+
### Unless required by applicable law or agreed to in writing, software
|
18
|
+
### distributed under the Apache License with the above modification is
|
19
|
+
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
20
|
+
### KIND, either express or implied. See the Apache License for the specific
|
21
|
+
### language governing permissions and limitations under the Apache License.
|
22
|
+
###
|
23
|
+
###
|
24
|
+
|
25
|
+
module JamfTest
|
26
|
+
|
27
|
+
class APITest
|
28
|
+
|
29
|
+
#####
|
30
|
+
def say(msg)
|
31
|
+
JamfTest.say msg, from: self.class.to_s
|
32
|
+
end
|
33
|
+
|
34
|
+
# The main test method
|
35
|
+
# each subclass MUST define a run_class_tests method
|
36
|
+
#####
|
37
|
+
def run_tests
|
38
|
+
run_class_tests
|
39
|
+
|
40
|
+
say "Done! Congrats, #{self.class} looks good!"
|
41
|
+
end
|
42
|
+
|
43
|
+
#####
|
44
|
+
def validate_hash(hash, has_key: nil, val_class: nil)
|
45
|
+
raise 'Value is not a Hash' unless hash.is_a? Hash
|
46
|
+
return unless has_key
|
47
|
+
|
48
|
+
raise "Hash does not have required key #{has_key}" unless hash.key? has_key
|
49
|
+
return unless val_class
|
50
|
+
|
51
|
+
raise "Value for Hash key #{has_key} is not a #{val_class}" unless hash[has_key].is_a? val_class
|
52
|
+
end
|
53
|
+
|
54
|
+
#####
|
55
|
+
def validate_array(ary, item_class: nil)
|
56
|
+
raise 'Value is not an Array' unless ary.is_a? Array
|
57
|
+
return unless item_class
|
58
|
+
|
59
|
+
if ary.empty?
|
60
|
+
puts 'WARNING: Array is empty! This may be OK depending on your environment'
|
61
|
+
return
|
62
|
+
end
|
63
|
+
|
64
|
+
raise "Randomly chosen item from Array is not a #{item_class}" unless ary.sample.is_a? item_class
|
65
|
+
end
|
66
|
+
|
67
|
+
# Ruby 3's default behavior when raising exceptions will include the output
|
68
|
+
# of #inspect, recursively for all data in an object.
|
69
|
+
# For many OAPIObjects, esp JPAPI Resources, this includes the embedded
|
70
|
+
# Connection object and all the caches is might hold, which might be
|
71
|
+
# thousands of lines.
|
72
|
+
# we override that here to prevent that. I've heard rumor this will be
|
73
|
+
# fixed in ruby 3.2
|
74
|
+
def inspect
|
75
|
+
"<#{self.class}:#{object_id}>"
|
76
|
+
end
|
77
|
+
|
78
|
+
end # class
|
79
|
+
|
80
|
+
end # module JamfTest
|
@@ -0,0 +1,267 @@
|
|
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
|
+
# auth
|
29
|
+
module Auth
|
30
|
+
|
31
|
+
require 'open3'
|
32
|
+
require 'pathname'
|
33
|
+
|
34
|
+
# The security command
|
35
|
+
SEC_COMMAND = '/usr/bin/security'
|
36
|
+
|
37
|
+
# exit status when the keychain password provided is incorrect
|
38
|
+
SEC_STATUS_AUTH_ERROR = 51
|
39
|
+
|
40
|
+
# exit status when the desired item isn't found in the keychain
|
41
|
+
SEC_STATUS_NOT_FOUND_ERROR = 44
|
42
|
+
|
43
|
+
KEYCHAIN_LABEL_BASE = 'ruby-jss testing suite: '.freeze
|
44
|
+
KEYCHAIN_API_LABEL = KEYCHAIN_LABEL_BASE + 'API Access'
|
45
|
+
|
46
|
+
KEYCHAIN_SVC_BASE = 'com.pixar.ruby-jss.testing'.freeze
|
47
|
+
KEYCHAIN_API_SVC = KEYCHAIN_SVC_BASE + '.api'
|
48
|
+
|
49
|
+
###########################
|
50
|
+
def self.connect_to_api(host:, port: nil)
|
51
|
+
creds = api_creds host: host
|
52
|
+
creds ||= prompt_for_api_pw(host: host, port: port)
|
53
|
+
|
54
|
+
Jamf.connect host: host, port: creds[:port], user: creds[:user], pw: creds[:pw]
|
55
|
+
end
|
56
|
+
|
57
|
+
# return the user's API password, prompting for it if we don't already have
|
58
|
+
# it
|
59
|
+
###########################
|
60
|
+
def self.prompt_for_api_pw(host:, port: nil)
|
61
|
+
# If we're here, we need to get theuser and pw via prompt
|
62
|
+
print "Enter the API username for #{host}: "
|
63
|
+
user = $stdin.gets.chomp
|
64
|
+
|
65
|
+
pw = prompt_for_password prompt: "Enter the API password for #{user}@#{host}" do |apw|
|
66
|
+
Jamf.cnx.disconnect
|
67
|
+
Jamf.cnx.connect user: user, pw: apw, host: host, port: port
|
68
|
+
true
|
69
|
+
rescue JSS::AuthenticationError
|
70
|
+
false
|
71
|
+
# begin
|
72
|
+
end # do apw
|
73
|
+
raise JSS::AuthenticationError, "Incorrect API password for #{user}@#{host}" unless pw
|
74
|
+
|
75
|
+
save_api_creds(host: host, user: user, pw: pw, port: port)
|
76
|
+
|
77
|
+
{ user: user, pw: pw, port: port }
|
78
|
+
end
|
79
|
+
|
80
|
+
# Prompt the user for a password in the shell
|
81
|
+
# Returns:
|
82
|
+
# - a valid password, or
|
83
|
+
# - false if no valid password after the max number of tries
|
84
|
+
#
|
85
|
+
# Displays the provided promp. Passes what the user types to the block you
|
86
|
+
# provide, which must return a Boolean indicating if the password was correct.
|
87
|
+
#
|
88
|
+
# @param prompt[String] The message asking for the password
|
89
|
+
#
|
90
|
+
# @option max_tries[Integer] The max number of times to let the
|
91
|
+
# user enter the passwd. Defaults to 3
|
92
|
+
#
|
93
|
+
# @option retry_msg[String] the text to display after a failure,
|
94
|
+
# but before :max_tries failures. Defaults to "Try again: " followed
|
95
|
+
# by the text arg.
|
96
|
+
#
|
97
|
+
# @option failed_msg[String] The message to display after :max_tries
|
98
|
+
# failures. Defaults to "Too many failed attempts"
|
99
|
+
#
|
100
|
+
# @yield The block should figure out if the user typed the correct password
|
101
|
+
#
|
102
|
+
# @yieldparam pw [String] The password typed by the user in the input field
|
103
|
+
#
|
104
|
+
# @yieldreturn [Boolean] Was the password correct?
|
105
|
+
#
|
106
|
+
# @return [String] The validated password
|
107
|
+
# @return [false] The user failed after max_tries: attempts.
|
108
|
+
#
|
109
|
+
############################
|
110
|
+
def self.prompt_for_password(**options)
|
111
|
+
colon = ':'
|
112
|
+
# set defaults
|
113
|
+
options[:prompt] ||= 'Enter your password:'
|
114
|
+
options[:prompt] << colon unless options[:prompt].end_with? colon
|
115
|
+
options[:max_tries] ||= 3
|
116
|
+
options[:retry_msg] ||= "Try Again. #{options[:prompt]}"
|
117
|
+
options[:failed_msg] ||= 'Too many failed attempts'
|
118
|
+
|
119
|
+
tries = 0
|
120
|
+
|
121
|
+
prompt = options[:prompt]
|
122
|
+
|
123
|
+
while tries < options[:max_tries]
|
124
|
+
print "#{prompt} "
|
125
|
+
system 'stty -echo'
|
126
|
+
pw = $stdin.gets.chomp
|
127
|
+
puts
|
128
|
+
system 'stty echo'
|
129
|
+
return pw if yield pw
|
130
|
+
|
131
|
+
prompt = options[:retry_msg]
|
132
|
+
tries += 1
|
133
|
+
end
|
134
|
+
puts options[:failed_msg]
|
135
|
+
false
|
136
|
+
ensure # make sure terminal is usable at the end of this
|
137
|
+
system 'stty echo'
|
138
|
+
end # prompt_for_password
|
139
|
+
|
140
|
+
# Save the API testing credentials to the default keychain
|
141
|
+
###########################
|
142
|
+
def self.save_api_creds(host:, user:, pw:, port: nil)
|
143
|
+
delete_api_creds(host: host)
|
144
|
+
|
145
|
+
cmd = +'add-internet-password'
|
146
|
+
cmd << " -a #{escape_for_security user}"
|
147
|
+
cmd << " -s #{escape_for_security host}"
|
148
|
+
cmd << " -l #{escape_for_security KEYCHAIN_API_LABEL}"
|
149
|
+
cmd << " -P #{port}" if port
|
150
|
+
cmd << " -w #{escape_for_security pw}"
|
151
|
+
|
152
|
+
run_security cmd
|
153
|
+
:saved
|
154
|
+
end
|
155
|
+
|
156
|
+
###########################
|
157
|
+
def self.delete_api_creds(host:)
|
158
|
+
# NOTE: -s must come before -l
|
159
|
+
cmd = +'delete-internet-password'
|
160
|
+
cmd << " -s #{escape_for_security host}"
|
161
|
+
cmd << " -l #{escape_for_security KEYCHAIN_API_LABEL}"
|
162
|
+
|
163
|
+
run_security cmd
|
164
|
+
:deleted
|
165
|
+
rescue
|
166
|
+
nil
|
167
|
+
end
|
168
|
+
|
169
|
+
# retrieve the API testing credentials from the default keychain
|
170
|
+
#
|
171
|
+
# @return [Hash] The user, pw and possibly port for accessing the API
|
172
|
+
# on the host
|
173
|
+
###########################
|
174
|
+
def self.api_creds(host:)
|
175
|
+
# NOTE: -s must come before -l
|
176
|
+
cmd = +'find-internet-password'
|
177
|
+
cmd << " -s #{escape_for_security host}"
|
178
|
+
cmd << " -l #{escape_for_security KEYCHAIN_API_LABEL}"
|
179
|
+
output = run_security(cmd)
|
180
|
+
|
181
|
+
output =~ /"acct"<blob>="(.+)"$/
|
182
|
+
user = Regexp.last_match[1]
|
183
|
+
|
184
|
+
output =~ /"port"<uint32>=0x([A-F0-9]+)( |$)/
|
185
|
+
port = Regexp.last_match[1]
|
186
|
+
port &&= port.to_i(16)
|
187
|
+
|
188
|
+
cmd << ' -w'
|
189
|
+
pw = run_security(cmd).chomp
|
190
|
+
|
191
|
+
{ user: user, pw: pw, port: port }
|
192
|
+
rescue
|
193
|
+
nil
|
194
|
+
end
|
195
|
+
|
196
|
+
# Run the security command in interactive mode on a given keyshcain,
|
197
|
+
# passing in a subcommand and its arguments. so that they don't appear in the
|
198
|
+
# `ps` output
|
199
|
+
#
|
200
|
+
# @param cmd [String] the subcommand being passed to 'security' with
|
201
|
+
# all needed options. It will not be visible outide this process, so
|
202
|
+
# its OK to put passwords into the options.
|
203
|
+
#
|
204
|
+
# @return [String] the stdout of the 'security' command.
|
205
|
+
#
|
206
|
+
#################################
|
207
|
+
def self.run_security(cmd)
|
208
|
+
output = ''
|
209
|
+
errs = ''
|
210
|
+
exit_status = nil
|
211
|
+
|
212
|
+
Open3.popen3("#{SEC_COMMAND} -i") do |stdin, stdout, stderr, wait_thr|
|
213
|
+
# pid = wait_thr.pid # pid of the started process.
|
214
|
+
stdin.puts cmd
|
215
|
+
stdin.close
|
216
|
+
output = stdout.read
|
217
|
+
errs = stderr.read
|
218
|
+
exit_status = wait_thr.value # Process::Status object returned.
|
219
|
+
end
|
220
|
+
return output.chomp if exit_status.success?
|
221
|
+
|
222
|
+
case exit_status.exitstatus
|
223
|
+
when SEC_STATUS_AUTH_ERROR
|
224
|
+
raise 'Incorrect keychain password'
|
225
|
+
when SEC_STATUS_NOT_FOUND_ERROR
|
226
|
+
raise 'No matching item was found in the keychain'
|
227
|
+
else
|
228
|
+
errs.chomp!
|
229
|
+
errs =~ /: returned\s+(-?\d+)$/
|
230
|
+
errnum = Regexp.last_match(1)
|
231
|
+
desc = nil
|
232
|
+
if errnum
|
233
|
+
desc = `#{SEC_COMMAND} error #{errnum}`
|
234
|
+
desc =
|
235
|
+
if desc.include?('unknown error')
|
236
|
+
nil
|
237
|
+
else
|
238
|
+
desc.chomp.split(errnum).last
|
239
|
+
end
|
240
|
+
end
|
241
|
+
desc ||= errs
|
242
|
+
raise "Keychain Error: #{desc.gsub("\n", '; ')}; exit status #{exit_status.exitstatus}"
|
243
|
+
end # case
|
244
|
+
end # run_security
|
245
|
+
|
246
|
+
# given a string, wrap it in single quotes and escape internal single quotes
|
247
|
+
# and backslashes so it can be used in the interactive 'security' command
|
248
|
+
#
|
249
|
+
# @param str[String] the string to escape
|
250
|
+
#
|
251
|
+
# @return [String] the escaped string
|
252
|
+
############################
|
253
|
+
def self.escape_for_security(str)
|
254
|
+
# first escape backslashes
|
255
|
+
str = str.to_s.gsub '\\', '\\\\\\'
|
256
|
+
|
257
|
+
# then single quotes
|
258
|
+
str.gsub! "'", "\\\\'"
|
259
|
+
|
260
|
+
# if other things need escaping, add them here
|
261
|
+
|
262
|
+
"'#{str}'"
|
263
|
+
end # escape
|
264
|
+
|
265
|
+
end # module auth
|
266
|
+
|
267
|
+
end # module JamfTest
|