Class: MistApi::OspfAreasNetwork
- Defined in:
- lib/mist_api/models/ospf_areas_network.rb
Overview
Property key is the network name. Networks to participate in an OSPF area
Instance Attribute Summary collapse
-
#auth_keys ⇒ Hash[String, String]
Required if ‘auth_type`==`md5`.
-
#auth_password ⇒ String
Required if ‘auth_type`==`password`, the password, max length is 8.
-
#auth_type ⇒ OspfAreaNetworkAuthTypeEnum
auth type.
-
#bfd_minimum_interval ⇒ Integer
auth type.
-
#dead_interval ⇒ Integer
auth type.
-
#export_policy ⇒ String
auth type.
-
#hello_interval ⇒ Integer
auth type.
-
#import_policy ⇒ String
auth type.
-
#interface_type ⇒ OspfAreaNetworkInterfaceTypeEnum
interface type (nbma = non-broadcast multi-access).
-
#metric ⇒ Integer
interface type (nbma = non-broadcast multi-access).
-
#no_readvertise_to_overlay ⇒ TrueClass | FalseClass
By default, we’ll re-advertise all learned OSPF routes toward overlay.
-
#passive ⇒ TrueClass | FalseClass
Whether to send OSPF-Hello.
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(auth_keys = SKIP, auth_password = SKIP, auth_type = OspfAreaNetworkAuthTypeEnum::NONE, bfd_minimum_interval = SKIP, dead_interval = SKIP, export_policy = SKIP, hello_interval = SKIP, import_policy = SKIP, interface_type = OspfAreaNetworkInterfaceTypeEnum::BROADCAST, metric = SKIP, no_readvertise_to_overlay = false, passive = false) ⇒ OspfAreasNetwork
constructor
A new instance of OspfAreasNetwork.
-
#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(auth_keys = SKIP, auth_password = SKIP, auth_type = OspfAreaNetworkAuthTypeEnum::NONE, bfd_minimum_interval = SKIP, dead_interval = SKIP, export_policy = SKIP, hello_interval = SKIP, import_policy = SKIP, interface_type = OspfAreaNetworkInterfaceTypeEnum::BROADCAST, metric = SKIP, no_readvertise_to_overlay = false, passive = false) ⇒ OspfAreasNetwork
Returns a new instance of OspfAreasNetwork.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 105 def initialize(auth_keys = SKIP, auth_password = SKIP, auth_type = OspfAreaNetworkAuthTypeEnum::NONE, bfd_minimum_interval = SKIP, dead_interval = SKIP, export_policy = SKIP, hello_interval = SKIP, import_policy = SKIP, interface_type = OspfAreaNetworkInterfaceTypeEnum::BROADCAST, metric = SKIP, = false, passive = false) @auth_keys = auth_keys unless auth_keys == SKIP @auth_password = auth_password unless auth_password == SKIP @auth_type = auth_type unless auth_type == SKIP @bfd_minimum_interval = bfd_minimum_interval unless bfd_minimum_interval == SKIP @dead_interval = dead_interval unless dead_interval == SKIP @export_policy = export_policy unless export_policy == SKIP @hello_interval = hello_interval unless hello_interval == SKIP @import_policy = import_policy unless import_policy == SKIP @interface_type = interface_type unless interface_type == SKIP @metric = metric unless metric == SKIP unless == SKIP @no_readvertise_to_overlay = end @passive = passive unless passive == SKIP end |
Instance Attribute Details
#auth_keys ⇒ Hash[String, String]
Required if ‘auth_type`==`md5`. Property key is the key number
14 15 16 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 14 def auth_keys @auth_keys end |
#auth_password ⇒ String
Required if ‘auth_type`==`password`, the password, max length is 8
18 19 20 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 18 def auth_password @auth_password end |
#auth_type ⇒ OspfAreaNetworkAuthTypeEnum
auth type. enum: ‘md5`, `none`, `password`
22 23 24 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 22 def auth_type @auth_type end |
#bfd_minimum_interval ⇒ Integer
auth type. enum: ‘md5`, `none`, `password`
26 27 28 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 26 def bfd_minimum_interval @bfd_minimum_interval end |
#dead_interval ⇒ Integer
auth type. enum: ‘md5`, `none`, `password`
30 31 32 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 30 def dead_interval @dead_interval end |
#export_policy ⇒ String
auth type. enum: ‘md5`, `none`, `password`
34 35 36 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 34 def export_policy @export_policy end |
#hello_interval ⇒ Integer
auth type. enum: ‘md5`, `none`, `password`
38 39 40 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 38 def hello_interval @hello_interval end |
#import_policy ⇒ String
auth type. enum: ‘md5`, `none`, `password`
42 43 44 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 42 def import_policy @import_policy end |
#interface_type ⇒ OspfAreaNetworkInterfaceTypeEnum
interface type (nbma = non-broadcast multi-access). enum: ‘broadcast`, `nbma`, `p2mp`, `p2p`
47 48 49 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 47 def interface_type @interface_type end |
#metric ⇒ Integer
interface type (nbma = non-broadcast multi-access). enum: ‘broadcast`, `nbma`, `p2mp`, `p2p`
52 53 54 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 52 def metric @metric end |
#no_readvertise_to_overlay ⇒ TrueClass | FalseClass
By default, we’ll re-advertise all learned OSPF routes toward overlay
56 57 58 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 56 def @no_readvertise_to_overlay end |
#passive ⇒ TrueClass | FalseClass
Whether to send OSPF-Hello
60 61 62 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 60 def passive @passive end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth_keys = hash.key?('auth_keys') ? hash['auth_keys'] : SKIP auth_password = hash.key?('auth_password') ? hash['auth_password'] : SKIP auth_type = hash['auth_type'] ||= OspfAreaNetworkAuthTypeEnum::NONE bfd_minimum_interval = hash.key?('bfd_minimum_interval') ? hash['bfd_minimum_interval'] : SKIP dead_interval = hash.key?('dead_interval') ? hash['dead_interval'] : SKIP export_policy = hash.key?('export_policy') ? hash['export_policy'] : SKIP hello_interval = hash.key?('hello_interval') ? hash['hello_interval'] : SKIP import_policy = hash.key?('import_policy') ? hash['import_policy'] : SKIP interface_type = hash['interface_type'] ||= OspfAreaNetworkInterfaceTypeEnum::BROADCAST metric = hash.key?('metric') ? hash['metric'] : SKIP = hash['no_readvertise_to_overlay'] ||= false passive = hash['passive'] ||= false # Create object from extracted values. OspfAreasNetwork.new(auth_keys, auth_password, auth_type, bfd_minimum_interval, dead_interval, export_policy, hello_interval, import_policy, interface_type, metric, , passive) end |
.names ⇒ Object
A mapping from model property names to API property names.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 63 def self.names @_hash = {} if @_hash.nil? @_hash['auth_keys'] = 'auth_keys' @_hash['auth_password'] = 'auth_password' @_hash['auth_type'] = 'auth_type' @_hash['bfd_minimum_interval'] = 'bfd_minimum_interval' @_hash['dead_interval'] = 'dead_interval' @_hash['export_policy'] = 'export_policy' @_hash['hello_interval'] = 'hello_interval' @_hash['import_policy'] = 'import_policy' @_hash['interface_type'] = 'interface_type' @_hash['metric'] = 'metric' @_hash['no_readvertise_to_overlay'] = 'no_readvertise_to_overlay' @_hash['passive'] = 'passive' @_hash end |
.nullables ⇒ Object
An array for nullable fields
99 100 101 102 103 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 99 def self.nullables %w[ metric ] end |
.optionals ⇒ Object
An array for optional fields
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 81 def self.optionals %w[ auth_keys auth_password auth_type bfd_minimum_interval dead_interval export_policy hello_interval import_policy interface_type metric no_readvertise_to_overlay passive ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 177 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth_keys: #{@auth_keys.inspect}, auth_password: #{@auth_password.inspect},"\ " auth_type: #{@auth_type.inspect}, bfd_minimum_interval: #{@bfd_minimum_interval.inspect},"\ " dead_interval: #{@dead_interval.inspect}, export_policy: #{@export_policy.inspect},"\ " hello_interval: #{@hello_interval.inspect}, import_policy: #{@import_policy.inspect},"\ " interface_type: #{@interface_type.inspect}, metric: #{@metric.inspect},"\ " no_readvertise_to_overlay: #{@no_readvertise_to_overlay.inspect}, passive:"\ " #{@passive.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
167 168 169 170 171 172 173 174 |
# File 'lib/mist_api/models/ospf_areas_network.rb', line 167 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth_keys: #{@auth_keys}, auth_password: #{@auth_password}, auth_type:"\ " #{@auth_type}, bfd_minimum_interval: #{@bfd_minimum_interval}, dead_interval:"\ " #{@dead_interval}, export_policy: #{@export_policy}, hello_interval: #{@hello_interval},"\ " import_policy: #{@import_policy}, interface_type: #{@interface_type}, metric: #{@metric},"\ " no_readvertise_to_overlay: #{@no_readvertise_to_overlay}, passive: #{@passive}>" end |