Class: MistApi::WlanMistNac
- Defined in:
- lib/mist_api/models/wlan_mist_nac.rb
Overview
WlanMistNac Model.
Instance Attribute Summary collapse
-
#acct_interim_interval ⇒ Integer
How frequently should interim accounting be reported, 60-65535.
-
#auth_servers_retries ⇒ Integer
Radius auth session retries.
-
#auth_servers_timeout ⇒ Integer
Radius auth session timeout.
-
#coa_enabled ⇒ TrueClass | FalseClass
Allows a RADIUS server to dynamically modify the authorization status of a user session.
-
#coa_port ⇒ Integer
the communication port used for “Change of Authorization” (CoA) messages.
-
#enabled ⇒ TrueClass | FalseClass
When enabled: * ‘auth_servers` is ignored * `acct_servers` is ignored * `auth_servers_*` are ignored * `coa_servers` is ignored * `radsec` is ignored * `coa_enabled` is assumed.
-
#fast_dot1x_timers ⇒ TrueClass | FalseClass
If set to true, sets default fast-timers with values calculated from ‘auth_servers_timeout` and `auth_server_retries`.
-
#network ⇒ String
Which network the mist nac server resides in.
-
#source_ip ⇒ String
In case there is a static IP for this network, we can specify it using 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_interim_interval = 0, auth_servers_retries = 2, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, enabled = false, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP) ⇒ WlanMistNac
constructor
A new instance of WlanMistNac.
-
#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_interim_interval = 0, auth_servers_retries = 2, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, enabled = false, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP) ⇒ WlanMistNac
Returns a new instance of WlanMistNac.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 105 def initialize(acct_interim_interval = 0, auth_servers_retries = 2, auth_servers_timeout = 5, coa_enabled = false, coa_port = SKIP, enabled = false, fast_dot1x_timers = false, network = SKIP, source_ip = SKIP) @acct_interim_interval = acct_interim_interval unless acct_interim_interval == 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 @enabled = enabled unless enabled == 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_interim_interval ⇒ Integer
How frequently should interim accounting be reported, 60-65535. default is 0 (use one specified in Access-Accept request from Server). Very frequent messages can affect the performance of the radius server, 600 and up is recommended when enabled.
17 18 19 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 17 def acct_interim_interval @acct_interim_interval end |
#auth_servers_retries ⇒ Integer
Radius auth session retries. Following fast timers are set if ‘fast_dot1x_timers` knob is enabled. “retries” are set to value of `auth_servers_timeout`. “max-requests” is also set when setting `auth_servers_retries` is set to default value to 3.
24 25 26 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 24 def auth_servers_retries @auth_servers_retries end |
#auth_servers_timeout ⇒ Integer
Radius auth session timeout. Following fast timers are set if ‘fast_dot1x_timers` knob is enabled. “quite-period” and “transmit-period” are set to half the value of `auth_servers_timeout`. “supplicant-timeout” is also set when setting `auth_servers_timeout` is set to default value of 10.
32 33 34 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 32 def auth_servers_timeout @auth_servers_timeout end |
#coa_enabled ⇒ TrueClass | FalseClass
Allows a RADIUS server to dynamically modify the authorization status of a user session.
37 38 39 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 37 def coa_enabled @coa_enabled end |
#coa_port ⇒ Integer
the communication port used for “Change of Authorization” (CoA) messages
41 42 43 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 41 def coa_port @coa_port end |
#enabled ⇒ TrueClass | FalseClass
When enabled:
* `auth_servers` is ignored
* `acct_servers` is ignored
* `auth_servers_*` are ignored
* `coa_servers` is ignored
* `radsec` is ignored
* `coa_enabled` is assumed
51 52 53 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 51 def enabled @enabled end |
#fast_dot1x_timers ⇒ TrueClass | FalseClass
If set to true, sets default fast-timers with values calculated from ‘auth_servers_timeout` and `auth_server_retries`.
56 57 58 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 56 def fast_dot1x_timers @fast_dot1x_timers end |
#network ⇒ String
Which network the mist nac server resides in
60 61 62 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 60 def network @network end |
#source_ip ⇒ String
In case there is a static IP for this network, we can specify it using source ip
65 66 67 |
# File 'lib/mist_api/models/wlan_mist_nac.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.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 121 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. acct_interim_interval = hash['acct_interim_interval'] ||= 0 auth_servers_retries = hash['auth_servers_retries'] ||= 2 auth_servers_timeout = hash['auth_servers_timeout'] ||= 5 coa_enabled = hash['coa_enabled'] ||= false coa_port = hash.key?('coa_port') ? hash['coa_port'] : SKIP enabled = hash['enabled'] ||= false 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. WlanMistNac.new(acct_interim_interval, auth_servers_retries, auth_servers_timeout, coa_enabled, coa_port, enabled, 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 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 68 def self.names @_hash = {} if @_hash.nil? @_hash['acct_interim_interval'] = 'acct_interim_interval' @_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['enabled'] = 'enabled' @_hash['fast_dot1x_timers'] = 'fast_dot1x_timers' @_hash['network'] = 'network' @_hash['source_ip'] = 'source_ip' @_hash end |
.nullables ⇒ Object
An array for nullable fields
98 99 100 101 102 103 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 98 def self.nullables %w[ network source_ip ] end |
.optionals ⇒ Object
An array for optional fields
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 83 def self.optionals %w[ acct_interim_interval auth_servers_retries auth_servers_timeout coa_enabled coa_port enabled fast_dot1x_timers network source_ip ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
149 150 151 152 153 154 155 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 149 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.
167 168 169 170 171 172 173 174 175 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 167 def inspect class_name = self.class.name.split('::').last "<#{class_name} acct_interim_interval: #{@acct_interim_interval.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}, enabled: #{@enabled.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.
158 159 160 161 162 163 164 |
# File 'lib/mist_api/models/wlan_mist_nac.rb', line 158 def to_s class_name = self.class.name.split('::').last "<#{class_name} acct_interim_interval: #{@acct_interim_interval}, auth_servers_retries:"\ " #{@auth_servers_retries}, auth_servers_timeout: #{@auth_servers_timeout}, coa_enabled:"\ " #{@coa_enabled}, coa_port: #{@coa_port}, enabled: #{@enabled}, fast_dot1x_timers:"\ " #{@fast_dot1x_timers}, network: #{@network}, source_ip: #{@source_ip}>" end |