Class: IntersightClient::VnicFcIf
- Defined in:
- lib/intersight_client/models/vnic_fc_if.rb
Overview
Virtual Fibre Channel Interface.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#fc_adapter_policy ⇒ Object
Returns the value of attribute fc_adapter_policy.
-
#fc_network_policy ⇒ Object
Returns the value of attribute fc_network_policy.
-
#fc_qos_policy ⇒ Object
Returns the value of attribute fc_qos_policy.
-
#name ⇒ Object
Name of the virtual fibre channel interface.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#order ⇒ Object
The order in which the virtual interface is brought up.
-
#persistent_bindings ⇒ Object
Enables retention of LUN ID associations in memory until they are manually cleared.
-
#placement ⇒ Object
Returns the value of attribute placement.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#san_connectivity_policy ⇒ Object
Returns the value of attribute san_connectivity_policy.
-
#scp_vhba ⇒ Object
Returns the value of attribute scp_vhba.
-
#sp_vhbas ⇒ Object
An array of relationships to vnicFcIf resources.
-
#static_wwpn_address ⇒ Object
The WWPN address must be in hexadecimal format xx:xx:xx:xx:xx:xx:xx:xx.
-
#type ⇒ Object
VHBA Type configuration for SAN Connectivity Policy.
-
#vif_id ⇒ Object
This should be the same as the channel number of the vfc created on switch in order to set up the data path.
-
#wwpn ⇒ Object
The WWPN address that is assigned to the vHBA based on the wwn pool that has been assigned to the SAN Connectivity Policy.
-
#wwpn_address_type ⇒ Object
Type of allocation selected to assign a WWPN address to the vhba.
-
#wwpn_lease ⇒ Object
Returns the value of attribute wwpn_lease.
-
#wwpn_pool ⇒ Object
Returns the value of attribute wwpn_pool.
Attributes inherited from MoBaseMo
#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s).
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s).
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VnicFcIf
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ VnicFcIf
Initializes the object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 177 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::VnicFcIf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize super(attributes) if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'vnic.FcIf' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'vnic.FcIf' end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'order') self.order = attributes[:'order'] end if attributes.key?(:'persistent_bindings') self.persistent_bindings = attributes[:'persistent_bindings'] end if attributes.key?(:'placement') self.placement = attributes[:'placement'] end if attributes.key?(:'static_wwpn_address') self.static_wwpn_address = attributes[:'static_wwpn_address'] end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'fc-initiator' end if attributes.key?(:'vif_id') self.vif_id = attributes[:'vif_id'] end if attributes.key?(:'wwpn') self.wwpn = attributes[:'wwpn'] end if attributes.key?(:'wwpn_address_type') self.wwpn_address_type = attributes[:'wwpn_address_type'] else self.wwpn_address_type = 'POOL' end if attributes.key?(:'fc_adapter_policy') self.fc_adapter_policy = attributes[:'fc_adapter_policy'] end if attributes.key?(:'fc_network_policy') self.fc_network_policy = attributes[:'fc_network_policy'] end if attributes.key?(:'fc_qos_policy') self.fc_qos_policy = attributes[:'fc_qos_policy'] end if attributes.key?(:'profile') self.profile = attributes[:'profile'] end if attributes.key?(:'san_connectivity_policy') self.san_connectivity_policy = attributes[:'san_connectivity_policy'] end if attributes.key?(:'scp_vhba') self.scp_vhba = attributes[:'scp_vhba'] end if attributes.key?(:'sp_vhbas') if (value = attributes[:'sp_vhbas']).is_a?(Array) self.sp_vhbas = value end end if attributes.key?(:'wwpn_lease') self.wwpn_lease = attributes[:'wwpn_lease'] end if attributes.key?(:'wwpn_pool') self.wwpn_pool = attributes[:'wwpn_pool'] end end |
Instance Attribute Details
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 20 def class_id @class_id end |
#fc_adapter_policy ⇒ Object
Returns the value of attribute fc_adapter_policy.
51 52 53 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 51 def fc_adapter_policy @fc_adapter_policy end |
#fc_network_policy ⇒ Object
Returns the value of attribute fc_network_policy.
53 54 55 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 53 def fc_network_policy @fc_network_policy end |
#fc_qos_policy ⇒ Object
Returns the value of attribute fc_qos_policy.
55 56 57 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 55 def fc_qos_policy @fc_qos_policy end |
#name ⇒ Object
Name of the virtual fibre channel interface.
26 27 28 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 26 def name @name end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 23 def object_type @object_type end |
#order ⇒ Object
The order in which the virtual interface is brought up. The order assigned to an interface should be unique for all the Ethernet and Fibre-Channel interfaces on each PCI link on a VIC adapter. The maximum value of PCI order is limited by the number of virtual interfaces (Ethernet and Fibre-Channel) on each PCI link on a VIC adapter. All VIC adapters have a single PCI link except VIC 1385 which has two.
29 30 31 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 29 def order @order end |
#persistent_bindings ⇒ Object
Enables retention of LUN ID associations in memory until they are manually cleared.
32 33 34 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 32 def persistent_bindings @persistent_bindings end |
#placement ⇒ Object
Returns the value of attribute placement.
34 35 36 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 34 def placement @placement end |
#profile ⇒ Object
Returns the value of attribute profile.
57 58 59 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 57 def profile @profile end |
#san_connectivity_policy ⇒ Object
Returns the value of attribute san_connectivity_policy.
59 60 61 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 59 def san_connectivity_policy @san_connectivity_policy end |
#scp_vhba ⇒ Object
Returns the value of attribute scp_vhba.
61 62 63 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 61 def scp_vhba @scp_vhba end |
#sp_vhbas ⇒ Object
An array of relationships to vnicFcIf resources.
64 65 66 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 64 def sp_vhbas @sp_vhbas end |
#static_wwpn_address ⇒ Object
The WWPN address must be in hexadecimal format xx:xx:xx:xx:xx:xx:xx:xx. Allowed ranges are 20:00:00:00:00:00:00:00 to 20:FF:FF:FF:FF:FF:FF:FF or from 50:00:00:00:00:00:00:00 to 5F:FF:FF:FF:FF:FF:FF:FF. To ensure uniqueness of WWN’s in the SAN fabric, you are strongly encouraged to use the WWN prefix - 20:00:00:25:B5:xx:xx:xx.
37 38 39 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 37 def static_wwpn_address @static_wwpn_address end |
#type ⇒ Object
VHBA Type configuration for SAN Connectivity Policy. This configuration is supported only on Cisco VIC 14XX series and higher series of adapters. * fc-initiator - The default value set for vHBA Type Configuration. Fc-initiator specifies vHBA as a consumer of storage. Enables SCSI commands to transfer data and status information between host and target storage systems. * fc-nvme-initiator - Fc-nvme-initiator specifies vHBA as a consumer of storage. Enables NVMe-based message commands to transfer data and status information between host and target storage systems. * fc-nvme-target - Fc-nvme-target specifies vHBA as a provider of storage volumes to initiators. Enables NVMe-based message commands to transfer data and status information between host and target storage systems. Currently tech-preview, only enabled with an asynchronous driver. * fc-target - Fc-target specifies vHBA as a provider of storage volumes to initiators. Enables SCSI commands to transfer data and status information between host and target storage systems. fc-target is enabled only with an asynchronous driver.
40 41 42 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 40 def type @type end |
#vif_id ⇒ Object
This should be the same as the channel number of the vfc created on switch in order to set up the data path. The property is applicable only for FI attached servers where a vfc is created on the switch for every vHBA.
43 44 45 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 43 def vif_id @vif_id end |
#wwpn ⇒ Object
The WWPN address that is assigned to the vHBA based on the wwn pool that has been assigned to the SAN Connectivity Policy.
46 47 48 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 46 def wwpn @wwpn end |
#wwpn_address_type ⇒ Object
Type of allocation selected to assign a WWPN address to the vhba. * POOL - The user selects a pool from which the mac/wwn address will be leased for the Virtual Interface. * STATIC - The user assigns a static mac/wwn address for the Virtual Interface.
49 50 51 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 49 def wwpn_address_type @wwpn_address_type end |
#wwpn_lease ⇒ Object
Returns the value of attribute wwpn_lease.
66 67 68 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 66 def wwpn_lease @wwpn_lease end |
#wwpn_pool ⇒ Object
Returns the value of attribute wwpn_pool.
68 69 70 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 68 def wwpn_pool @wwpn_pool end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)
124 125 126 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 124 def self.acceptable_attribute_map attribute_map.merge(superclass.acceptable_attribute_map) end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
119 120 121 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 119 def self.acceptable_attributes attribute_map.values.concat(superclass.acceptable_attributes) end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 93 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'name' => :'Name', :'order' => :'Order', :'persistent_bindings' => :'PersistentBindings', :'placement' => :'Placement', :'static_wwpn_address' => :'StaticWwpnAddress', :'type' => :'Type', :'vif_id' => :'VifId', :'wwpn' => :'Wwpn', :'wwpn_address_type' => :'WwpnAddressType', :'fc_adapter_policy' => :'FcAdapterPolicy', :'fc_network_policy' => :'FcNetworkPolicy', :'fc_qos_policy' => :'FcQosPolicy', :'profile' => :'Profile', :'san_connectivity_policy' => :'SanConnectivityPolicy', :'scp_vhba' => :'ScpVhba', :'sp_vhbas' => :'SpVhbas', :'wwpn_lease' => :'WwpnLease', :'wwpn_pool' => :'WwpnPool' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
457 458 459 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 457 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
163 164 165 166 167 168 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 163 def self.openapi_all_of [ :'MoBaseMo', :'VnicFcIfAllOf' ] end |
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3
171 172 173 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 171 def self.openapi_discriminator_name :'ClassId' end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
155 156 157 158 159 160 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 155 def self.openapi_nullable Set.new([ :'placement', :'sp_vhbas', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 129 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'name' => :'String', :'order' => :'Integer', :'persistent_bindings' => :'Boolean', :'placement' => :'VnicPlacementSettings', :'static_wwpn_address' => :'String', :'type' => :'String', :'vif_id' => :'Integer', :'wwpn' => :'String', :'wwpn_address_type' => :'String', :'fc_adapter_policy' => :'VnicFcAdapterPolicyRelationship', :'fc_network_policy' => :'VnicFcNetworkPolicyRelationship', :'fc_qos_policy' => :'VnicFcQosPolicyRelationship', :'profile' => :'PolicyAbstractConfigProfileRelationship', :'san_connectivity_policy' => :'VnicSanConnectivityPolicyRelationship', :'scp_vhba' => :'VnicFcIfRelationship', :'sp_vhbas' => :'Array<VnicFcIfRelationship>', :'wwpn_lease' => :'FcpoolLeaseRelationship', :'wwpn_pool' => :'FcpoolPoolRelationship' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 417 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && name == o.name && order == o.order && persistent_bindings == o.persistent_bindings && placement == o.placement && static_wwpn_address == o.static_wwpn_address && type == o.type && vif_id == o.vif_id && wwpn == o.wwpn && wwpn_address_type == o.wwpn_address_type && fc_adapter_policy == o.fc_adapter_policy && fc_network_policy == o.fc_network_policy && fc_qos_policy == o.fc_qos_policy && profile == o.profile && san_connectivity_policy == o.san_connectivity_policy && scp_vhba == o.scp_vhba && sp_vhbas == o.sp_vhbas && wwpn_lease == o.wwpn_lease && wwpn_pool == o.wwpn_pool && super(o) end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 488 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 559 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 464 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) VnicFcIf.openapi_types.each_pair do |key, type| if attributes[VnicFcIf.attribute_map[key]].nil? && VnicFcIf.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[VnicFcIf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[VnicFcIf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[VnicFcIf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[VnicFcIf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
444 445 446 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 444 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
450 451 452 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 450 def hash [class_id, object_type, name, order, persistent_bindings, placement, static_wwpn_address, type, vif_id, wwpn, wwpn_address_type, fc_adapter_policy, fc_network_policy, fc_qos_policy, profile, san_connectivity_policy, scp_vhba, sp_vhbas, wwpn_lease, wwpn_pool].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 286 def list_invalid_properties invalid_properties = super if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end if !@name.nil? && @name.to_s.length > 31 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 31.') end pattern = Regexp.new(/^[a-zA-Z0-9\-\._:]+$/) if !@name.nil? && @name !~ pattern invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^$|((^20|5[0-9a-fA-F]{1}):([0-9a-fA-F]{2}:){6}([0-9a-fA-F]{2}))/) if !@static_wwpn_address.nil? && @static_wwpn_address !~ pattern invalid_properties.push("invalid value for \"static_wwpn_address\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^$|((^20|5[0-9a-fA-F]{1}):([0-9a-fA-F]{2}:){6}([0-9a-fA-F]{2}))/) if !@wwpn.nil? && @wwpn !~ pattern invalid_properties.push("invalid value for \"wwpn\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
535 536 537 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 535 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 541 def to_hash hash = super VnicFcIf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = VnicFcIf.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
529 530 531 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 529 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/intersight_client/models/vnic_fc_if.rb', line 320 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["vnic.FcIf"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["vnic.FcIf"]) return false unless object_type_validator.valid?(@object_type) return false if !@name.nil? && @name.to_s.length > 31 return false if !@name.nil? && @name !~ Regexp.new(/^[a-zA-Z0-9\-\._:]+$/) return false if !@static_wwpn_address.nil? && @static_wwpn_address !~ Regexp.new(/^$|((^20|5[0-9a-fA-F]{1}):([0-9a-fA-F]{2}:){6}([0-9a-fA-F]{2}))/) type_validator = EnumAttributeValidator.new('String', ["fc-initiator", "fc-nvme-initiator", "fc-nvme-target", "fc-target"]) return false unless type_validator.valid?(@type) return false if !@wwpn.nil? && @wwpn !~ Regexp.new(/^$|((^20|5[0-9a-fA-F]{1}):([0-9a-fA-F]{2}:){6}([0-9a-fA-F]{2}))/) wwpn_address_type_validator = EnumAttributeValidator.new('String', ["POOL", "STATIC"]) return false unless wwpn_address_type_validator.valid?(@wwpn_address_type) true && super end |