Class: MistApi::SwitchMatchingRuleOobIpConfig
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SwitchMatchingRuleOobIpConfig
- Defined in:
- lib/mist_api/models/switch_matching_rule_oob_ip_config.rb
Overview
Out-of-Band Management interface configuration
Instance Attribute Summary collapse
-
#type ⇒ IpTypeEnum
enum: ‘dhcp`, `static`.
-
#use_mgmt_vrf ⇒ TrueClass | FalseClass
If supported on the platform.
-
#use_mgmt_vrf_for_host_out ⇒ TrueClass | FalseClass
For host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(type = IpTypeEnum::DHCP, use_mgmt_vrf = false, use_mgmt_vrf_for_host_out = false) ⇒ SwitchMatchingRuleOobIpConfig
constructor
A new instance of SwitchMatchingRuleOobIpConfig.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(type = IpTypeEnum::DHCP, use_mgmt_vrf = false, use_mgmt_vrf_for_host_out = false) ⇒ SwitchMatchingRuleOobIpConfig
Returns a new instance of SwitchMatchingRuleOobIpConfig.
49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 49 def initialize(type = IpTypeEnum::DHCP, use_mgmt_vrf = false, use_mgmt_vrf_for_host_out = false) @type = type unless type == SKIP @use_mgmt_vrf = use_mgmt_vrf unless use_mgmt_vrf == SKIP unless use_mgmt_vrf_for_host_out == SKIP @use_mgmt_vrf_for_host_out = use_mgmt_vrf_for_host_out end end |
Instance Attribute Details
#type ⇒ IpTypeEnum
enum: ‘dhcp`, `static`
14 15 16 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 14 def type @type end |
#use_mgmt_vrf ⇒ TrueClass | FalseClass
If supported on the platform. If enabled, DNS will be using this routing-instance, too
19 20 21 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 19 def use_mgmt_vrf @use_mgmt_vrf end |
#use_mgmt_vrf_for_host_out ⇒ TrueClass | FalseClass
For host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired
24 25 26 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 24 def use_mgmt_vrf_for_host_out @use_mgmt_vrf_for_host_out end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash['type'] ||= IpTypeEnum::DHCP use_mgmt_vrf = hash['use_mgmt_vrf'] ||= false use_mgmt_vrf_for_host_out = hash['use_mgmt_vrf_for_host_out'] ||= false # Create object from extracted values. SwitchMatchingRuleOobIpConfig.new(type, use_mgmt_vrf, use_mgmt_vrf_for_host_out) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['use_mgmt_vrf'] = 'use_mgmt_vrf' @_hash['use_mgmt_vrf_for_host_out'] = 'use_mgmt_vrf_for_host_out' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 36 def self.optionals %w[ type use_mgmt_vrf use_mgmt_vrf_for_host_out ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
82 83 84 85 86 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 82 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, use_mgmt_vrf: #{@use_mgmt_vrf.inspect},"\ " use_mgmt_vrf_for_host_out: #{@use_mgmt_vrf_for_host_out.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
75 76 77 78 79 |
# File 'lib/mist_api/models/switch_matching_rule_oob_ip_config.rb', line 75 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, use_mgmt_vrf: #{@use_mgmt_vrf}, use_mgmt_vrf_for_host_out:"\ " #{@use_mgmt_vrf_for_host_out}>" end |