Class: OCI::FileStorage::Models::ClientOptions
- Inherits:
-
Object
- Object
- OCI::FileStorage::Models::ClientOptions
- Defined in:
- lib/oci/file_storage/models/client_options.rb
Overview
NFS export options applied to a specified set of clients. Only governs access through the associated export. Access to the same file system through a different export (on the same or different mount target) will be governed by that export's export options.
Constant Summary collapse
- ACCESS_ENUM =
[ ACCESS_READ_WRITE = 'READ_WRITE'.freeze, ACCESS_READ_ONLY = 'READ_ONLY'.freeze, ACCESS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- IDENTITY_SQUASH_ENUM =
[ IDENTITY_SQUASH_NONE = 'NONE'.freeze, IDENTITY_SQUASH_ROOT = 'ROOT'.freeze, IDENTITY_SQUASH_ALL = 'ALL'.freeze, IDENTITY_SQUASH_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ALLOWED_AUTH_ENUM =
[ ALLOWED_AUTH_SYS = 'SYS'.freeze, ALLOWED_AUTH_KRB5 = 'KRB5'.freeze, ALLOWED_AUTH_KRB5_I = 'KRB5I'.freeze, ALLOWED_AUTH_KRB5_P = 'KRB5P'.freeze, ALLOWED_AUTH_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#access ⇒ String
Type of access to grant clients using the file system through this export.
-
#allowed_auth ⇒ Array<String>
Array of allowed NFS authentication types.
-
#anonymous_gid ⇒ Integer
GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to
65534
. -
#anonymous_uid ⇒ Integer
UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to
65534
. -
#identity_squash ⇒ String
Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'.
-
#is_anonymous_access_allowed ⇒ BOOLEAN
Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping.
-
#require_privileged_source_port ⇒ BOOLEAN
If
true
, clients accessing the file system through this export must connect from a privileged source port. -
#source ⇒ String
[Required] Clients these options should apply to.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ClientOptions
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ClientOptions
Initializes the object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/oci/file_storage/models/client_options.rb', line 141 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.source = attributes[:'source'] if attributes[:'source'] self.require_privileged_source_port = attributes[:'requirePrivilegedSourcePort'] unless attributes[:'requirePrivilegedSourcePort'].nil? raise 'You cannot provide both :requirePrivilegedSourcePort and :require_privileged_source_port' if attributes.key?(:'requirePrivilegedSourcePort') && attributes.key?(:'require_privileged_source_port') self.require_privileged_source_port = attributes[:'require_privileged_source_port'] unless attributes[:'require_privileged_source_port'].nil? self.access = attributes[:'access'] if attributes[:'access'] self.identity_squash = attributes[:'identitySquash'] if attributes[:'identitySquash'] raise 'You cannot provide both :identitySquash and :identity_squash' if attributes.key?(:'identitySquash') && attributes.key?(:'identity_squash') self.identity_squash = attributes[:'identity_squash'] if attributes[:'identity_squash'] self.anonymous_uid = attributes[:'anonymousUid'] if attributes[:'anonymousUid'] raise 'You cannot provide both :anonymousUid and :anonymous_uid' if attributes.key?(:'anonymousUid') && attributes.key?(:'anonymous_uid') self.anonymous_uid = attributes[:'anonymous_uid'] if attributes[:'anonymous_uid'] self.anonymous_gid = attributes[:'anonymousGid'] if attributes[:'anonymousGid'] raise 'You cannot provide both :anonymousGid and :anonymous_gid' if attributes.key?(:'anonymousGid') && attributes.key?(:'anonymous_gid') self.anonymous_gid = attributes[:'anonymous_gid'] if attributes[:'anonymous_gid'] self.is_anonymous_access_allowed = attributes[:'isAnonymousAccessAllowed'] unless attributes[:'isAnonymousAccessAllowed'].nil? raise 'You cannot provide both :isAnonymousAccessAllowed and :is_anonymous_access_allowed' if attributes.key?(:'isAnonymousAccessAllowed') && attributes.key?(:'is_anonymous_access_allowed') self.is_anonymous_access_allowed = attributes[:'is_anonymous_access_allowed'] unless attributes[:'is_anonymous_access_allowed'].nil? self.allowed_auth = attributes[:'allowedAuth'] if attributes[:'allowedAuth'] raise 'You cannot provide both :allowedAuth and :allowed_auth' if attributes.key?(:'allowedAuth') && attributes.key?(:'allowed_auth') self.allowed_auth = attributes[:'allowed_auth'] if attributes[:'allowed_auth'] end |
Instance Attribute Details
#access ⇒ String
Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE
.
59 60 61 |
# File 'lib/oci/file_storage/models/client_options.rb', line 59 def access @access end |
#allowed_auth ⇒ Array<String>
Array of allowed NFS authentication types.
93 94 95 |
# File 'lib/oci/file_storage/models/client_options.rb', line 93 def allowed_auth @allowed_auth end |
#anonymous_gid ⇒ Integer
GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534
.
83 84 85 |
# File 'lib/oci/file_storage/models/client_options.rb', line 83 def anonymous_gid @anonymous_gid end |
#anonymous_uid ⇒ Integer
UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534
.
76 77 78 |
# File 'lib/oci/file_storage/models/client_options.rb', line 76 def anonymous_uid @anonymous_uid end |
#identity_squash ⇒ String
Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL
, all users and groups are remapped; if ROOT
, only the root user and group (UID/GID 0) are remapped; if NONE
, no remapping is done. If unspecified, defaults to ROOT
.
69 70 71 |
# File 'lib/oci/file_storage/models/client_options.rb', line 69 def identity_squash @identity_squash end |
#is_anonymous_access_allowed ⇒ BOOLEAN
Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
89 90 91 |
# File 'lib/oci/file_storage/models/client_options.rb', line 89 def is_anonymous_access_allowed @is_anonymous_access_allowed end |
#require_privileged_source_port ⇒ BOOLEAN
If true
, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true
.
53 54 55 |
# File 'lib/oci/file_storage/models/client_options.rb', line 53 def require_privileged_source_port @require_privileged_source_port end |
#source ⇒ String
[Required] Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
Note: Access will also be limited by any applicable VCN security rules and the ability to route IP packets to the mount target. Mount targets do not have Internet-routable IP addresses.
46 47 48 |
# File 'lib/oci/file_storage/models/client_options.rb', line 46 def source @source end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/file_storage/models/client_options.rb', line 96 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'source': :'source', 'require_privileged_source_port': :'requirePrivilegedSourcePort', 'access': :'access', 'identity_squash': :'identitySquash', 'anonymous_uid': :'anonymousUid', 'anonymous_gid': :'anonymousGid', 'is_anonymous_access_allowed': :'isAnonymousAccessAllowed', 'allowed_auth': :'allowedAuth' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/file_storage/models/client_options.rb', line 112 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'source': :'String', 'require_privileged_source_port': :'BOOLEAN', 'access': :'String', 'identity_squash': :'String', 'anonymous_uid': :'Integer', 'anonymous_gid': :'Integer', 'is_anonymous_access_allowed': :'BOOLEAN', 'allowed_auth': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/oci/file_storage/models/client_options.rb', line 241 def ==(other) return true if equal?(other) self.class == other.class && source == other.source && require_privileged_source_port == other.require_privileged_source_port && access == other.access && identity_squash == other.identity_squash && anonymous_uid == other.anonymous_uid && anonymous_gid == other.anonymous_gid && is_anonymous_access_allowed == other.is_anonymous_access_allowed && allowed_auth == other.allowed_auth end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/file_storage/models/client_options.rb', line 278 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
258 259 260 |
# File 'lib/oci/file_storage/models/client_options.rb', line 258 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
267 268 269 |
# File 'lib/oci/file_storage/models/client_options.rb', line 267 def hash [source, require_privileged_source_port, access, identity_squash, anonymous_uid, anonymous_gid, is_anonymous_access_allowed, allowed_auth].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/file_storage/models/client_options.rb', line 311 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
305 306 307 |
# File 'lib/oci/file_storage/models/client_options.rb', line 305 def to_s to_hash.to_s end |