ruby-jss 1.2.4a3 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-jss might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +180 -1
- data/README.md +4 -2
- data/bin/cgrouper +1 -1
- data/bin/jamfHelperBackgrounder +1 -1
- data/bin/netseg-update +1 -1
- data/data/ruby-jss.conf.example +1 -1
- data/lib/jamf.rb +2 -1
- data/lib/jamf/api/abstract_classes/advanced_search.rb +1 -1
- data/lib/jamf/api/abstract_classes/collection_resource.rb +54 -38
- data/lib/jamf/api/abstract_classes/generic_reference.rb +1 -1
- data/lib/jamf/api/abstract_classes/json_object.rb +16 -10
- data/lib/jamf/api/abstract_classes/prestage.rb +111 -35
- data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +1 -1
- data/lib/jamf/api/abstract_classes/resource.rb +1 -1
- data/lib/jamf/api/abstract_classes/singleton_resource.rb +1 -1
- data/lib/jamf/api/attribute_classes/ip_address.rb +1 -1
- data/lib/jamf/api/attribute_classes/timestamp.rb +1 -1
- data/lib/jamf/api/connection.rb +166 -69
- data/lib/jamf/api/connection/api_error.rb +1 -1
- data/lib/jamf/api/connection/api_error_styleguide.rb +1 -1
- data/lib/jamf/api/connection/token.rb +87 -16
- data/lib/jamf/api/json_objects/account_prefs.rb +1 -1
- data/lib/jamf/api/json_objects/android_details.rb +1 -1
- data/lib/jamf/api/json_objects/appletv_details.rb +1 -1
- data/lib/jamf/api/json_objects/attachment.rb +1 -1
- data/lib/jamf/api/json_objects/cellular_network.rb +1 -1
- data/lib/jamf/api/json_objects/change_log_entry.rb +1 -1
- data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +1 -1
- data/lib/jamf/api/json_objects/country.rb +1 -1
- data/lib/jamf/api/json_objects/criterion.rb +1 -1
- data/lib/jamf/api/json_objects/device_enrollment_device.rb +6 -4
- data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
- data/lib/jamf/api/json_objects/extension_attribute_value.rb +1 -1
- data/lib/jamf/api/json_objects/installed_application.rb +1 -1
- data/lib/jamf/api/json_objects/installed_certificate.rb +1 -1
- data/lib/jamf/api/json_objects/installed_configuration_profile.rb +1 -1
- data/lib/jamf/api/json_objects/installed_ebook.rb +1 -1
- data/lib/jamf/api/json_objects/installed_provisioning_profile.rb +1 -1
- data/lib/jamf/api/json_objects/inventory_preload_extension_attribute.rb +1 -1
- data/lib/jamf/api/json_objects/ios_details.rb +1 -1
- data/lib/jamf/api/json_objects/location.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_name.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_names.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb +1 -1
- data/lib/jamf/api/json_objects/mobile_device_details.rb +1 -1
- data/lib/jamf/api/json_objects/mobile_device_security.rb +1 -1
- data/lib/jamf/api/json_objects/prestage_assignment.rb +5 -3
- data/lib/jamf/api/json_objects/prestage_location.rb +1 -1
- data/lib/jamf/api/json_objects/prestage_purchasing_data.rb +1 -1
- data/lib/jamf/api/json_objects/prestage_scope.rb +1 -1
- data/lib/jamf/api/json_objects/prestage_sync_status.rb +1 -1
- data/lib/jamf/api/json_objects/purchasing_data.rb +1 -1
- data/lib/jamf/api/mixins/abstract.rb +1 -1
- data/lib/jamf/api/mixins/bulk_deletable.rb +1 -1
- data/lib/jamf/api/mixins/change_log.rb +3 -1
- data/lib/jamf/api/mixins/extendable.rb +1 -1
- data/lib/jamf/api/mixins/immutable.rb +1 -1
- data/lib/jamf/api/mixins/locatable.rb +1 -1
- data/lib/jamf/api/mixins/lockable.rb +1 -1
- data/lib/jamf/api/mixins/referable.rb +1 -1
- data/lib/jamf/api/mixins/searchable.rb +3 -3
- data/lib/jamf/api/mixins/uncreatable.rb +1 -1
- data/lib/jamf/api/mixins/undeletable.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/account.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/advanced_user_search.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/building.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/category.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/computer.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/department.rb +2 -1
- data/lib/jamf/api/resources/collection_resources/device_enrollment.rb +110 -18
- data/lib/jamf/api/resources/collection_resources/extension_attribute.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/inventory_preload_record.rb +9 -2
- data/lib/jamf/api/resources/collection_resources/mobile_device.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/script.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/site.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/time_zone.rb +119 -0
- data/lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb +1 -1
- data/lib/jamf/api/resources/singleton_resources/authorization.rb +1 -1
- data/lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb +1 -1
- data/lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb +1 -1
- data/lib/jamf/client.rb +59 -4
- data/lib/jamf/client/jamf_binary.rb +1 -1
- data/lib/jamf/client/jamf_helper.rb +1 -1
- data/lib/jamf/client/management_action.rb +1 -1
- data/lib/jamf/compatibility.rb +1 -1
- data/lib/jamf/composer.rb +1 -1
- data/lib/jamf/configuration.rb +6 -8
- data/lib/jamf/exceptions.rb +6 -1
- data/lib/jamf/ruby_extensions.rb +2 -1
- data/lib/jamf/ruby_extensions/array.rb +2 -2
- data/lib/jamf/ruby_extensions/array/predicates.rb +1 -1
- data/lib/jamf/ruby_extensions/array/utils.rb +4 -3
- data/lib/jamf/ruby_extensions/dig.rb +52 -0
- data/lib/jamf/ruby_extensions/filetest.rb +1 -1
- data/lib/jamf/ruby_extensions/filetest/predicates.rb +1 -1
- data/lib/jamf/ruby_extensions/hash.rb +1 -1
- data/lib/jamf/ruby_extensions/hash/backports.rb +2 -2
- data/lib/jamf/ruby_extensions/ipaddr.rb +1 -1
- data/lib/jamf/ruby_extensions/ipaddr/utils.rb +1 -1
- data/lib/jamf/ruby_extensions/object.rb +1 -1
- data/lib/jamf/ruby_extensions/object/predicates.rb +1 -1
- data/lib/jamf/ruby_extensions/pathname.rb +1 -1
- data/lib/jamf/ruby_extensions/pathname/predicates.rb +1 -1
- data/lib/jamf/ruby_extensions/pathname/utils.rb +1 -1
- data/lib/jamf/ruby_extensions/string.rb +1 -1
- data/lib/jamf/ruby_extensions/string/backports.rb +1 -1
- data/lib/jamf/ruby_extensions/string/conversions.rb +1 -1
- data/lib/jamf/ruby_extensions/string/predicates.rb +14 -4
- data/lib/jamf/utility.rb +1 -1
- data/lib/jamf/validate.rb +1 -1
- data/lib/jamf/version.rb +2 -2
- data/lib/jpapi.rb +1 -1
- data/lib/jss-api.rb +1 -1
- data/lib/jss.rb +5 -2
- data/lib/jss/api_connection.rb +3 -30
- data/lib/jss/api_object.rb +16 -3
- data/lib/jss/api_object/account.rb +1 -1
- data/lib/jss/api_object/advanced_search.rb +1 -1
- data/lib/jss/api_object/advanced_search/advanced_computer_search.rb +1 -1
- data/lib/jss/api_object/advanced_search/advanced_mobile_device_search.rb +1 -1
- data/lib/jss/api_object/advanced_search/advanced_user_search.rb +1 -1
- data/lib/jss/api_object/building.rb +1 -1
- data/lib/jss/api_object/categorizable.rb +1 -1
- data/lib/jss/api_object/category.rb +1 -1
- data/lib/jss/api_object/computer.rb +12 -6
- data/lib/jss/api_object/computer/application_installs.rb +1 -1
- data/lib/jss/api_object/computer_invitation.rb +1 -1
- data/lib/jss/api_object/configuration_profile.rb +4 -2
- data/lib/jss/api_object/configuration_profile/mobile_device_configuration_profile.rb +1 -1
- data/lib/jss/api_object/configuration_profile/osx_configuration_profile.rb +1 -1
- data/lib/jss/api_object/creatable.rb +1 -1
- data/lib/jss/api_object/criteriable.rb +10 -5
- data/lib/jss/api_object/criteriable/criteria.rb +26 -10
- data/lib/jss/api_object/criteriable/criterion.rb +1 -1
- data/lib/jss/api_object/department.rb +1 -1
- data/lib/jss/api_object/directory_binding.rb +273 -0
- data/lib/jss/api_object/directory_binding_type.rb +90 -0
- data/lib/jss/api_object/directory_binding_type/active_directory.rb +502 -0
- data/lib/jss/api_object/directory_binding_type/admitmac.rb +525 -0
- data/lib/jss/api_object/directory_binding_type/centrify.rb +212 -0
- data/lib/jss/api_object/directory_binding_type/open_directory.rb +178 -0
- data/lib/jss/api_object/directory_binding_type/powerbroker_identity_services.rb +73 -0
- data/lib/jss/api_object/disk_encryption_configurations.rb +114 -0
- data/lib/jss/api_object/distribution_point.rb +96 -36
- data/lib/jss/api_object/dock_item.rb +137 -0
- data/lib/jss/api_object/ebook.rb +1 -1
- data/lib/jss/api_object/extendable.rb +67 -28
- data/lib/jss/api_object/extension_attribute.rb +1 -1
- data/lib/jss/api_object/extension_attribute/computer_extension_attribute.rb +1 -1
- data/lib/jss/api_object/extension_attribute/mobile_device_extension_attribute.rb +1 -1
- data/lib/jss/api_object/extension_attribute/user_extension_attribute.rb +1 -1
- data/lib/jss/api_object/group.rb +1 -1
- data/lib/jss/api_object/group/computer_group.rb +1 -1
- data/lib/jss/api_object/group/mobile_device_group.rb +1 -1
- data/lib/jss/api_object/group/user_group.rb +1 -1
- data/lib/jss/api_object/ibeacon.rb +1 -1
- data/lib/jss/api_object/ldap_server.rb +1 -1
- data/lib/jss/api_object/locatable.rb +1 -1
- data/lib/jss/api_object/mac_application.rb +1 -1
- data/lib/jss/api_object/management_history.rb +23 -22
- data/lib/jss/api_object/management_history/audit_event.rb +1 -1
- data/lib/jss/api_object/management_history/casper_imaging_log.rb +1 -1
- data/lib/jss/api_object/management_history/casper_remote_log.rb +1 -1
- data/lib/jss/api_object/management_history/computer_usage_log.rb +1 -1
- data/lib/jss/api_object/management_history/ebook.rb +1 -1
- data/lib/jss/api_object/management_history/hashlike.rb +1 -1
- data/lib/jss/api_object/management_history/mac_app_store_app.rb +1 -1
- data/lib/jss/api_object/management_history/mdm_command.rb +1 -1
- data/lib/jss/api_object/management_history/mobile_device_app.rb +1 -1
- data/lib/jss/api_object/management_history/policy_log.rb +1 -1
- data/lib/jss/api_object/management_history/screen_sharing_log.rb +1 -1
- data/lib/jss/api_object/management_history/user_location_change.rb +1 -1
- data/lib/jss/api_object/matchable.rb +1 -1
- data/lib/jss/api_object/mdm.rb +1 -1
- data/lib/jss/api_object/mobile_device.rb +29 -6
- data/lib/jss/api_object/mobile_device_application.rb +13 -1
- data/lib/jss/api_object/netboot_server.rb +1 -1
- data/lib/jss/api_object/network_segment.rb +153 -59
- data/lib/jss/api_object/package.rb +107 -42
- data/lib/jss/api_object/patch_policy.rb +1 -1
- data/lib/jss/api_object/patch_source.rb +1 -1
- data/lib/jss/api_object/patch_source/patch_external_source.rb +1 -1
- data/lib/jss/api_object/patch_source/patch_internal_source.rb +1 -1
- data/lib/jss/api_object/patch_title.rb +1 -1
- data/lib/jss/api_object/patch_title/version.rb +1 -1
- data/lib/jss/api_object/peripheral.rb +1 -1
- data/lib/jss/api_object/peripheral_type.rb +1 -1
- data/lib/jss/api_object/policy.rb +380 -5
- data/lib/jss/api_object/printer.rb +440 -0
- data/lib/jss/api_object/purchasable.rb +1 -1
- data/lib/jss/api_object/removable_macaddr.rb +1 -1
- data/lib/jss/api_object/restricted_software.rb +1 -1
- data/lib/jss/api_object/scopable.rb +1 -1
- data/lib/jss/api_object/scopable/scope.rb +257 -37
- data/lib/jss/api_object/script.rb +1 -1
- data/lib/jss/api_object/self_servable.rb +7 -7
- data/lib/jss/api_object/self_servable/icon.rb +1 -1
- data/lib/jss/api_object/sitable.rb +6 -2
- data/lib/jss/api_object/site.rb +1 -1
- data/lib/jss/api_object/software_update_server.rb +1 -1
- data/lib/jss/api_object/updatable.rb +1 -1
- data/lib/jss/api_object/uploadable.rb +1 -1
- data/lib/jss/api_object/user.rb +5 -3
- data/lib/jss/api_object/vppable.rb +1 -1
- data/lib/jss/api_object/webhook.rb +1 -1
- data/lib/jss/client.rb +1 -1
- data/lib/jss/client/jamf_binary.rb +1 -1
- data/lib/jss/client/jamf_helper.rb +1 -1
- data/lib/jss/client/management_action.rb +1 -1
- data/lib/jss/compatibility.rb +1 -1
- data/lib/jss/composer.rb +2 -2
- data/lib/jss/configuration.rb +1 -1
- data/lib/jss/db_connection.rb +1 -1
- data/lib/jss/exceptions.rb +1 -1
- data/lib/jss/ruby_extensions.rb +1 -1
- data/lib/jss/ruby_extensions/array.rb +1 -1
- data/lib/jss/ruby_extensions/filetest.rb +1 -1
- data/lib/jss/ruby_extensions/hash.rb +1 -1
- data/lib/jss/ruby_extensions/ipaddr.rb +1 -1
- data/lib/jss/ruby_extensions/pathname.rb +1 -1
- data/lib/jss/ruby_extensions/string.rb +1 -1
- data/lib/jss/ruby_extensions/string/backports.rb +1 -1
- data/lib/jss/ruby_extensions/string/conversions.rb +1 -1
- data/lib/jss/ruby_extensions/string/predicates.rb +14 -4
- data/lib/jss/ruby_extensions/time.rb +1 -1
- data/lib/jss/server.rb +1 -1
- data/lib/jss/utility.rb +9 -23
- data/lib/jss/validate.rb +1 -1
- data/lib/jss/version.rb +2 -2
- data/lib/jss/xml_workaround.rb +1 -1
- data/lib/ruby-jss.rb +1 -1
- data/test/bin/runtests +1 -1
- data/test/lib/testhelper.rb +1 -1
- data/test/lib/testhelper/auth.rb +1 -1
- data/test/lib/testhelper/patch_mgmt.rb +1 -1
- data/test/specs/api_connection_spec.rb +1 -1
- data/test/specs/patch01_source_spec.rb +1 -1
- data/test/specs/patch02_internal_source_spec.rb +1 -1
- data/test/specs/patch03_external_source_spec.rb +1 -1
- data/test/specs/patch04_titles_spec.rb +1 -1
- data/test/specs/patch05_policies_spec.rb +1 -1
- data/test/specs/patch06_cleanup_spec.rb +1 -1
- data/test/specs/policy_spec.rb +1 -1
- metadata +16 -4
@@ -0,0 +1,212 @@
|
|
1
|
+
### Copyright 2019 Rixar
|
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 JSS
|
27
|
+
|
28
|
+
# Module for containing the different types of DirectoryBindings stored within the JSS
|
29
|
+
|
30
|
+
module DirectoryBindingType
|
31
|
+
|
32
|
+
# Module Variables
|
33
|
+
#####################################
|
34
|
+
|
35
|
+
# Module Methods
|
36
|
+
#####################################
|
37
|
+
|
38
|
+
# Classes
|
39
|
+
#####################################
|
40
|
+
|
41
|
+
# Class for the specific ADmitMac DirectoryBinding type stored within the JSS
|
42
|
+
#
|
43
|
+
# @author Tyler Morgan
|
44
|
+
#
|
45
|
+
# Attributes
|
46
|
+
# @!attribute [rw] workstation_mode
|
47
|
+
# @!attribute [rw] overwrite_existing
|
48
|
+
# @!attribute [rw] update_PAM
|
49
|
+
# @!attribute [rw] zone
|
50
|
+
# @!attribute [rw] preferred_domain_server
|
51
|
+
class Centrify < DirectoryBindingType
|
52
|
+
# Mix-Ins
|
53
|
+
#####################################
|
54
|
+
|
55
|
+
# Class Methods
|
56
|
+
#####################################
|
57
|
+
|
58
|
+
# Class Constants
|
59
|
+
#####################################
|
60
|
+
|
61
|
+
# Attributes
|
62
|
+
#####################################
|
63
|
+
attr_reader :workstation_mode
|
64
|
+
attr_reader :overwrite_existing
|
65
|
+
attr_reader :update_PAM
|
66
|
+
attr_reader :zone
|
67
|
+
attr_reader :preferred_domain_server
|
68
|
+
|
69
|
+
# Constructor
|
70
|
+
#####################################
|
71
|
+
|
72
|
+
# An initializer for the Centrify object.
|
73
|
+
#
|
74
|
+
# @author Tyler Morgan
|
75
|
+
# @see JSS::DirectoryBinding
|
76
|
+
# @see JSS::DirectoryBindingType
|
77
|
+
#
|
78
|
+
# @param [Hash] initialize data
|
79
|
+
def initialize(init_data)
|
80
|
+
|
81
|
+
# Return without processing anything since there is
|
82
|
+
# nothing to process.
|
83
|
+
return if init_data.nil?
|
84
|
+
|
85
|
+
# Process the provided information
|
86
|
+
@workstation_mode = init_data[:workstation_mode]
|
87
|
+
@overwrite_existing = init_data[:overwrite_existing]
|
88
|
+
@update_PAM = init_data[:update_PAM]
|
89
|
+
@zone = init_data[:zone]
|
90
|
+
@preferred_domain_server = init_data[:preferred_domain_server]
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
# Public Instance Methods
|
95
|
+
#####################################
|
96
|
+
|
97
|
+
|
98
|
+
# Sets the Centrify Mode to Workstation mode
|
99
|
+
#
|
100
|
+
# @author Tyler Morgan
|
101
|
+
#
|
102
|
+
# @param newvalue [Bool]
|
103
|
+
#
|
104
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
105
|
+
#
|
106
|
+
# @return [void]
|
107
|
+
def workstation_mode=(newvalue)
|
108
|
+
|
109
|
+
raise JSS::InvalidDataError, "workstation_mode must be true or false." unless newvalue.is_a? Bool
|
110
|
+
|
111
|
+
@workstation_mode = newvalue
|
112
|
+
|
113
|
+
self.container&.should_update
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
# Want to overwrite existing joined computer in the directory
|
118
|
+
#
|
119
|
+
# @author Tyler Morgan
|
120
|
+
#
|
121
|
+
# @param newvalue [Bool]
|
122
|
+
#
|
123
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
124
|
+
#
|
125
|
+
# @return [void]
|
126
|
+
def overwrite_existing=(newvalue)
|
127
|
+
|
128
|
+
raise JSS::InvalidDataError, "overwrite_existing must be true or false." unless newvalue.is_a? Bool
|
129
|
+
|
130
|
+
@overwrite_existing = newvalue
|
131
|
+
|
132
|
+
self.container&.should_update
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
# Update the PAM module and overwrite DirectoryService configuration
|
137
|
+
#
|
138
|
+
# @author Tyler Morgan
|
139
|
+
#
|
140
|
+
# @param newvalue [Bool]
|
141
|
+
#
|
142
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
143
|
+
#
|
144
|
+
# @return [void]
|
145
|
+
def update_PAM=(newvalue)
|
146
|
+
|
147
|
+
raise JSS::InvalidDataError, "update_PAM must be true or false." unless newvalue.is_a? Bool
|
148
|
+
|
149
|
+
@update_PAM = newvalue
|
150
|
+
|
151
|
+
self.container&.should_update
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
# The zone the computer is to be joined to
|
156
|
+
#
|
157
|
+
# @author Tyler Morgan
|
158
|
+
#
|
159
|
+
# @param newvalue [String] the new zone the computer is to be joined to
|
160
|
+
#
|
161
|
+
# @raise [JSS::InvalidDataError] If the new value is not a string.
|
162
|
+
#
|
163
|
+
# @return [void]
|
164
|
+
def zone=(newvalue)
|
165
|
+
|
166
|
+
raise JSS::InvalidDataError, "zone must be a string." unless newvalue.is_a? String
|
167
|
+
|
168
|
+
@zone = newvalue
|
169
|
+
|
170
|
+
self.container&.should_update
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
# The specific domain server that should be prioritized
|
175
|
+
#
|
176
|
+
# @author Tyler Morgan
|
177
|
+
#
|
178
|
+
# @param newvalue [String] The domain server that would be prioritized.
|
179
|
+
#
|
180
|
+
# @raise [JSS::InvalidDataError] If the new value is not a string.
|
181
|
+
#
|
182
|
+
# @return [void]
|
183
|
+
def preferred_domain_server=(newvalue)
|
184
|
+
|
185
|
+
raise JSS::InvalidDataError, "preferred_domain_server must be a string." unless newvalue.is_a? String
|
186
|
+
|
187
|
+
@preferred_domain_server = newvalue
|
188
|
+
|
189
|
+
self.container&.should_update
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
# Return a REXML Element containing the current state of the DirectoryBindingType
|
194
|
+
# object for adding into the XML of the container.
|
195
|
+
#
|
196
|
+
# @author Tyler Morgan
|
197
|
+
#
|
198
|
+
# @return [REXML::Element]
|
199
|
+
def type_setting_xml
|
200
|
+
type_setting = REXML::Element.new "centrify"
|
201
|
+
type_setting.add_element("workstation_mode").text = @workstation_mode
|
202
|
+
type_setting.add_element("overwrite_existing").text = @overwrite_existing
|
203
|
+
type_setting.add_element("update_PAM").text = @update_PAM
|
204
|
+
type_setting.add_element("zone").text = @zone
|
205
|
+
type_setting.add_element("preferred_domain_server").text = @preferred_domain_server
|
206
|
+
|
207
|
+
return type_setting
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
### Copyright 2019 Rixar
|
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 JSS
|
27
|
+
|
28
|
+
# Module for containing the different types of DirectoryBindings stored within the JSS
|
29
|
+
|
30
|
+
module DirectoryBindingType
|
31
|
+
|
32
|
+
# Module Variables
|
33
|
+
#####################################
|
34
|
+
|
35
|
+
# Module Methods
|
36
|
+
#####################################
|
37
|
+
|
38
|
+
# Classes
|
39
|
+
#####################################
|
40
|
+
|
41
|
+
# Class for the specific OpenDirectory DirectoryBinding type stored within the JSS
|
42
|
+
#
|
43
|
+
# @author Tyler Morgan
|
44
|
+
#
|
45
|
+
# Attributes
|
46
|
+
# @!attribute [rw] require_confirmation
|
47
|
+
|
48
|
+
class OpenDirectory < DirectoryBindingType
|
49
|
+
# Mix-Ins
|
50
|
+
#####################################
|
51
|
+
|
52
|
+
# Class Methods
|
53
|
+
#####################################
|
54
|
+
|
55
|
+
# Class Constants
|
56
|
+
#####################################
|
57
|
+
|
58
|
+
# Attributes
|
59
|
+
#####################################
|
60
|
+
attr_reader :encrypt_using_ssl
|
61
|
+
attr_reader :perform_secure_bind
|
62
|
+
attr_reader :use_for_authentication
|
63
|
+
attr_reader :use_for_contacts
|
64
|
+
|
65
|
+
# Constructor
|
66
|
+
#####################################
|
67
|
+
def initialize(init_data)
|
68
|
+
|
69
|
+
# Return without processing anything since there is
|
70
|
+
# nothing to process.
|
71
|
+
return if init_data.nil?
|
72
|
+
|
73
|
+
# Process the provided information
|
74
|
+
@encrypt_using_ssl = init_data[:encrypt_using_ssl]
|
75
|
+
@perform_secure_bind = init_data[:perform_secure_bind]
|
76
|
+
@use_for_authentication = init_data[:use_for_authentication]
|
77
|
+
@use_for_contacts = init_data[:use_for_contacts]
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
# Public Instance Methods
|
83
|
+
#####################################
|
84
|
+
|
85
|
+
# Encrypt the connection using SSL
|
86
|
+
#
|
87
|
+
# @author Tyler Morgan
|
88
|
+
#
|
89
|
+
# @param newvalue [Bool]
|
90
|
+
#
|
91
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
92
|
+
#
|
93
|
+
# @return [void]
|
94
|
+
def encrypt_using_ssl=(newvalue)
|
95
|
+
|
96
|
+
raise JSS::InvalidDataError, "encrypt_using_ssl must be true or false." unless newvalue.is_a? Bool
|
97
|
+
|
98
|
+
@encrypt_using_ssl = newvalue
|
99
|
+
|
100
|
+
self.container&.should_update
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
# Attempt to perform a secure bind to the domain server
|
105
|
+
#
|
106
|
+
# @author Tyler Morgan
|
107
|
+
#
|
108
|
+
# @param newvalue [Bool]
|
109
|
+
#
|
110
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
111
|
+
#
|
112
|
+
# @return [void]
|
113
|
+
def perform_secure_bind=(newvalue)
|
114
|
+
|
115
|
+
raise JSS::InvalidDataError, "perform_secure_bind must be true or false." unless newvalue.is_a? Bool
|
116
|
+
|
117
|
+
@perform_secure_bind = newvalue
|
118
|
+
|
119
|
+
self.container&.should_update
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
# Use this binding for authentication
|
124
|
+
#
|
125
|
+
# @author Tyler Morgan
|
126
|
+
#
|
127
|
+
# @param newvalue [Bool]
|
128
|
+
#
|
129
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
130
|
+
#
|
131
|
+
# @return [void]
|
132
|
+
def use_for_authentication=(newvalue)
|
133
|
+
|
134
|
+
raise JSS::InvalidDataError, "use_for_authentication must be true or false." unless newvalue.is_a? Bool
|
135
|
+
|
136
|
+
@use_for_authentication = newvalue
|
137
|
+
|
138
|
+
self.container&.should_update
|
139
|
+
end
|
140
|
+
|
141
|
+
|
142
|
+
# Use this binding for contact population
|
143
|
+
#
|
144
|
+
# @author Tyler Morgan
|
145
|
+
#
|
146
|
+
# @param newvalue [Bool]
|
147
|
+
#
|
148
|
+
# @raise [JSS::InvalidDataError] If the new value doesn't match a Bool value
|
149
|
+
#
|
150
|
+
# @return [void]
|
151
|
+
def use_for_contacts=(newvalue)
|
152
|
+
|
153
|
+
raise JSS::InvalidDataError, "use_for_contacts must be true or false." unless newvalue.is_a? Bool
|
154
|
+
|
155
|
+
@use_for_contacts = newvalue
|
156
|
+
|
157
|
+
self.container&.should_update
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
# Return a REXML Element containing the current state of the DirectoryBindingType
|
162
|
+
# object for adding into the XML of the container.
|
163
|
+
#
|
164
|
+
# @author Tyler Morgan
|
165
|
+
#
|
166
|
+
# @return [REXML::Element]
|
167
|
+
def type_setting_xml
|
168
|
+
type_setting = REXML::Element.new "admitmac"
|
169
|
+
type_setting.add_element("encrypt_using_ssl").text = @encrypt_using_ssl
|
170
|
+
type_setting.add_element("perform_secure_bind").text = @perform_secure_bind
|
171
|
+
type_setting.add_element("use_for_authentication").text = @use_for_authentication
|
172
|
+
type_setting.add_element("use_for_contacts").text = @use_for_contacts
|
173
|
+
|
174
|
+
return type_setting
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
### Copyright 2019 Rixar
|
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 JSS
|
27
|
+
|
28
|
+
# Module for containing the different types of DirectoryBindings stored within the JSS
|
29
|
+
|
30
|
+
module DirectoryBindingType
|
31
|
+
|
32
|
+
# Module Variables
|
33
|
+
#####################################
|
34
|
+
|
35
|
+
# Module Methods
|
36
|
+
#####################################
|
37
|
+
|
38
|
+
# Classes
|
39
|
+
#####################################
|
40
|
+
|
41
|
+
# Class for the specific PowerBroker DirectoryBinding type stored within the JSS
|
42
|
+
#
|
43
|
+
# @author Tyler Morgan
|
44
|
+
#
|
45
|
+
# Attributes
|
46
|
+
class PowerBroker < DirectoryBindingType
|
47
|
+
# Mix-Ins
|
48
|
+
#####################################
|
49
|
+
|
50
|
+
|
51
|
+
# Class Methods
|
52
|
+
#####################################
|
53
|
+
|
54
|
+
|
55
|
+
# Class Constants
|
56
|
+
#####################################
|
57
|
+
|
58
|
+
|
59
|
+
# Attributes
|
60
|
+
#####################################
|
61
|
+
|
62
|
+
|
63
|
+
# Constructor
|
64
|
+
#####################################
|
65
|
+
def initialize(init_data)
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
# Public Instance Methods
|
70
|
+
#####################################
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|