Class: MistApi::SwitchRadiusConfig
- Defined in:
- lib/mist_api/models/switch_radius_config.rb
Overview
Junos Radius config
Instance Attribute Summary collapse
-
#acct_immediate_update ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#acct_interim_interval ⇒ Integer
How frequently should interim accounting be reported, 60-65535.
-
#acct_servers ⇒ Array[RadiusAcctServer]
How frequently should interim accounting be reported, 60-65535.
-
#auth_server_selection ⇒ SwitchRadiusConfigAuthServerSelectionEnum
enum: ‘ordered`, `unordered`.
-
#auth_servers ⇒ Array[RadiusAuthServer]
enum: ‘ordered`, `unordered`.
-
#auth_servers_retries ⇒ Integer
Radius auth session retries.
-
#auth_servers_timeout ⇒ Integer
Radius auth session timeout.
-
#coa_enabled ⇒ TrueClass | FalseClass
Radius auth session timeout.
-
#coa_port ⇒ Object
Radius CoA Port, value from 1 to 65535, default is 3799.
-
#fast_dot1x_timers ⇒ TrueClass | FalseClass
Radius CoA Port, value from 1 to 65535, default is 3799.
-
#network ⇒ String
Use ‘network`or `source_ip`.
-
#source_ip ⇒ String
Use ‘network`or `source_ip`.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(acct_immediate_update = SKIP, acct_interim_interval = 0, acct_servers = SKIP, auth_server_selection = SwitchRadiusConfigAuthServerSelectionEnum::ORDERED, auth_servers = SKIP, auth_servers_retries = 3, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP) ⇒ SwitchRadiusConfig
constructor
A new instance of SwitchRadiusConfig.
-
#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(acct_immediate_update = SKIP, acct_interim_interval = 0, acct_servers = SKIP, auth_server_selection = SwitchRadiusConfigAuthServerSelectionEnum::ORDERED, auth_servers = SKIP, auth_servers_retries = 3, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP) ⇒ SwitchRadiusConfig
Returns a new instance of SwitchRadiusConfig.
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/switch_radius_config.rb', line 108 def initialize( acct_immediate_update = SKIP, acct_interim_interval = 0, acct_servers = SKIP, auth_server_selection = SwitchRadiusConfigAuthServerSelectionEnum::ORDERED, auth_servers = SKIP, auth_servers_retries = 3, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP ) @acct_immediate_update = acct_immediate_update unless acct_immediate_update == SKIP @acct_interim_interval = acct_interim_interval unless acct_interim_interval == SKIP @acct_servers = acct_servers unless acct_servers == SKIP @auth_server_selection = auth_server_selection unless auth_server_selection == SKIP @auth_servers = auth_servers unless auth_servers == SKIP @auth_servers_retries = auth_servers_retries unless auth_servers_retries == SKIP @auth_servers_timeout = auth_servers_timeout unless auth_servers_timeout == SKIP @coa_enabled = coa_enabled unless coa_enabled == SKIP @coa_port = coa_port unless coa_port == SKIP @fast_dot1x_timers = fast_dot1x_timers unless fast_dot1x_timers == SKIP @network = network unless network == SKIP @source_ip = source_ip unless source_ip == SKIP end |
Instance Attribute Details
#acct_immediate_update ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 14 def acct_immediate_update @acct_immediate_update end |
#acct_interim_interval ⇒ Integer
How frequently should interim accounting be reported, 60-65535. default is 0 (use one specified in Access-Accept request from RADIUS Server). Very frequent messages can affect the performance of the radius server, 600 and up is recommended when enabled
21 22 23 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 21 def acct_interim_interval @acct_interim_interval end |
#acct_servers ⇒ Array[RadiusAcctServer]
How frequently should interim accounting be reported, 60-65535. default is 0 (use one specified in Access-Accept request from RADIUS Server). Very frequent messages can affect the performance of the radius server, 600 and up is recommended when enabled
28 29 30 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 28 def acct_servers @acct_servers end |
#auth_server_selection ⇒ SwitchRadiusConfigAuthServerSelectionEnum
enum: ‘ordered`, `unordered`
32 33 34 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 32 def auth_server_selection @auth_server_selection end |
#auth_servers ⇒ Array[RadiusAuthServer]
enum: ‘ordered`, `unordered`
36 37 38 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 36 def auth_servers @auth_servers end |
#auth_servers_retries ⇒ Integer
Radius auth session retries
40 41 42 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 40 def auth_servers_retries @auth_servers_retries end |
#auth_servers_timeout ⇒ Integer
Radius auth session timeout
44 45 46 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 44 def auth_servers_timeout @auth_servers_timeout end |
#coa_enabled ⇒ TrueClass | FalseClass
Radius auth session timeout
48 49 50 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 48 def coa_enabled @coa_enabled end |
#coa_port ⇒ Object
Radius CoA Port, value from 1 to 65535, default is 3799
52 53 54 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 52 def coa_port @coa_port end |
#fast_dot1x_timers ⇒ TrueClass | FalseClass
Radius CoA Port, value from 1 to 65535, default is 3799
56 57 58 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 56 def fast_dot1x_timers @fast_dot1x_timers end |
#network ⇒ String
Use ‘network`or `source_ip`. Which network the RADIUS server resides, if there’s static IP for this network, we’d use it as source-ip
61 62 63 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 61 def network @network end |
#source_ip ⇒ String
Use ‘network`or `source_ip`
65 66 67 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 65 def source_ip @source_ip 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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. acct_immediate_update = hash.key?('acct_immediate_update') ? hash['acct_immediate_update'] : SKIP acct_interim_interval = hash['acct_interim_interval'] ||= 0 # Parameter is an array, so we need to iterate through it acct_servers = nil unless hash['acct_servers'].nil? acct_servers = [] hash['acct_servers'].each do |structure| acct_servers << (RadiusAcctServer.from_hash(structure) if structure) end end acct_servers = SKIP unless hash.key?('acct_servers') auth_server_selection = hash['auth_server_selection'] ||= SwitchRadiusConfigAuthServerSelectionEnum::ORDERED # Parameter is an array, so we need to iterate through it auth_servers = nil unless hash['auth_servers'].nil? auth_servers = [] hash['auth_servers'].each do |structure| auth_servers << (RadiusAuthServer.from_hash(structure) if structure) end end auth_servers = SKIP unless hash.key?('auth_servers') auth_servers_retries = hash['auth_servers_retries'] ||= 3 auth_servers_timeout = hash['auth_servers_timeout'] ||= 5 coa_enabled = hash['coa_enabled'] ||= false coa_port = hash.key?('coa_port') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:RadiusCoaPort), hash['coa_port'] ) : SKIP fast_dot1x_timers = hash['fast_dot1x_timers'] ||= false network = hash.key?('network') ? hash['network'] : SKIP source_ip = hash.key?('source_ip') ? hash['source_ip'] : SKIP # Create object from extracted values. SwitchRadiusConfig.new(acct_immediate_update, acct_interim_interval, acct_servers, auth_server_selection, auth_servers, auth_servers_retries, auth_servers_timeout, coa_enabled, coa_port, fast_dot1x_timers, network, source_ip) end |
.names ⇒ Object
A mapping from model property names to API property names.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 68 def self.names @_hash = {} if @_hash.nil? @_hash['acct_immediate_update'] = 'acct_immediate_update' @_hash['acct_interim_interval'] = 'acct_interim_interval' @_hash['acct_servers'] = 'acct_servers' @_hash['auth_server_selection'] = 'auth_server_selection' @_hash['auth_servers'] = 'auth_servers' @_hash['auth_servers_retries'] = 'auth_servers_retries' @_hash['auth_servers_timeout'] = 'auth_servers_timeout' @_hash['coa_enabled'] = 'coa_enabled' @_hash['coa_port'] = 'coa_port' @_hash['fast_dot1x_timers'] = 'fast_dot1x_timers' @_hash['network'] = 'network' @_hash['source_ip'] = 'source_ip' @_hash end |
.nullables ⇒ Object
An array for nullable fields
104 105 106 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 104 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 86 def self.optionals %w[ acct_immediate_update acct_interim_interval acct_servers auth_server_selection auth_servers auth_servers_retries auth_servers_timeout coa_enabled coa_port fast_dot1x_timers network source_ip ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
187 188 189 190 191 192 193 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 187 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 207 def inspect class_name = self.class.name.split('::').last "<#{class_name} acct_immediate_update: #{@acct_immediate_update.inspect},"\ " acct_interim_interval: #{@acct_interim_interval.inspect}, acct_servers:"\ " #{@acct_servers.inspect}, auth_server_selection: #{@auth_server_selection.inspect},"\ " auth_servers: #{@auth_servers.inspect}, auth_servers_retries:"\ " #{@auth_servers_retries.inspect}, auth_servers_timeout: #{@auth_servers_timeout.inspect},"\ " coa_enabled: #{@coa_enabled.inspect}, coa_port: #{@coa_port.inspect}, fast_dot1x_timers:"\ " #{@fast_dot1x_timers.inspect}, network: #{@network.inspect}, source_ip:"\ " #{@source_ip.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
196 197 198 199 200 201 202 203 204 |
# File 'lib/mist_api/models/switch_radius_config.rb', line 196 def to_s class_name = self.class.name.split('::').last "<#{class_name} acct_immediate_update: #{@acct_immediate_update}, acct_interim_interval:"\ " #{@acct_interim_interval}, acct_servers: #{@acct_servers}, auth_server_selection:"\ " #{@auth_server_selection}, auth_servers: #{@auth_servers}, auth_servers_retries:"\ " #{@auth_servers_retries}, auth_servers_timeout: #{@auth_servers_timeout}, coa_enabled:"\ " #{@coa_enabled}, coa_port: #{@coa_port}, fast_dot1x_timers: #{@fast_dot1x_timers},"\ " network: #{@network}, source_ip: #{@source_ip}>" end |