Class: Y2Network::ConnectionConfig::Wireless
- Defined in:
- src/lib/y2network/connection_config/wireless.rb
Overview
Configuration for wireless connections
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
- #ap ⇒ String
-
#ap_scanmode ⇒ Integer
FIXME: Consider an enum.
-
#auth_mode ⇒ Object
@return [Symbol] Authorization mode (:open, :shared, :psk, :eap).
-
#bitrate ⇒ Float?
Bitrate limitation in Mb/s or nil for automatic.
-
#ca_cert ⇒ String
Ca certificate used to sign server certificate.
- #channel ⇒ Integer?
-
#client_cert ⇒ String
Client certificate used to login for TLS.
-
#client_key ⇒ String
Client private key used to encrypt for TLS.
-
#default_key ⇒ Integer
Default WEP key.
- #eap_auth ⇒ String
- #eap_mode ⇒ String
- #essid ⇒ String
- #frequency ⇒ Integer
- #key_length ⇒ Integer
-
#keys ⇒ Array<String>
WEP keys.
-
#mode ⇒ String
wireless options.
- #nick ⇒ String
-
#nwid ⇒ String
Network ID.
-
#wpa_anonymous_identity ⇒ String
Initial identity used for creating tunnel.
- #wpa_identity ⇒ String
- #wpa_password ⇒ String
-
#wpa_psk ⇒ String
FIXME: Consider moving keys to different classes.
Attributes inherited from Base
#bootproto, #description, #ethtool_options, #firewall_zone, #hostname, #id, #interface, #ip, #ip_aliases, #lladdress, #mtu, #name, #startmode
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize ⇒ Wireless
constructor
A new instance of Wireless.
Methods inherited from Base
#all_ips, #find_master, #propose, #propose_startmode, #type, #virtual?
Constructor Details
#initialize ⇒ Wireless
Returns a new instance of Wireless.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 76 def initialize super self.mode = "Managed" self.essid = "" self.nwid = "" self.auth_mode = :open self.wpa_psk = "" self.key_length = 128 self.keys = [] self.default_key = 0 self.eap_mode = "PEAP" self.eap_auth = "MSCHAPV2" self.ap_scanmode = 1 # For WIFI DHCP makes more sense as majority of wifi routers act as dhcp servers self.bootproto = BootProtocol::DHCP end |
Instance Attribute Details
#ap ⇒ String
59 60 61 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 59 def ap @ap end |
#ap_scanmode ⇒ Integer
FIXME: Consider an enum
62 63 64 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 62 def ap_scanmode @ap_scanmode end |
#auth_mode ⇒ Object
@return [Symbol] Authorization mode (:open, :shared, :psk, :eap)
36 37 38 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 36 def auth_mode @auth_mode end |
#bitrate ⇒ Float?
Returns bitrate limitation in Mb/s or nil for automatic.
57 58 59 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 57 def bitrate @bitrate end |
#ca_cert ⇒ String
Returns ca certificate used to sign server certificate.
70 71 72 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 70 def ca_cert @ca_cert end |
#channel ⇒ Integer?
53 54 55 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 53 def channel @channel end |
#client_cert ⇒ String
Returns client certificate used to login for TLS.
72 73 74 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 72 def client_cert @client_cert end |
#client_key ⇒ String
Returns client private key used to encrypt for TLS.
74 75 76 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 74 def client_key @client_key end |
#default_key ⇒ Integer
Returns default WEP key.
45 46 47 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 45 def default_key @default_key end |
#eap_auth ⇒ String
51 52 53 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 51 def eap_auth @eap_auth end |
#eap_mode ⇒ String
49 50 51 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 49 def eap_mode @eap_mode end |
#essid ⇒ String
32 33 34 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 32 def essid @essid end |
#frequency ⇒ Integer
55 56 57 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 55 def frequency @frequency end |
#key_length ⇒ Integer
41 42 43 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 41 def key_length @key_length end |
#keys ⇒ Array<String>
Returns WEP keys.
43 44 45 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 43 def keys @keys end |
#mode ⇒ String
wireless options
FIXME: Consider an enum
30 31 32 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 30 def mode @mode end |
#nick ⇒ String
47 48 49 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 47 def nick @nick end |
#nwid ⇒ String
Returns Network ID.
34 35 36 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 34 def nwid @nwid end |
#wpa_anonymous_identity ⇒ String
Returns initial identity used for creating tunnel.
68 69 70 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 68 def wpa_anonymous_identity @wpa_anonymous_identity end |
#wpa_identity ⇒ String
66 67 68 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 66 def wpa_identity @wpa_identity end |
#wpa_password ⇒ String
64 65 66 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 64 def wpa_password @wpa_password end |
#wpa_psk ⇒ String
FIXME: Consider moving keys to different classes.
39 40 41 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 39 def wpa_psk @wpa_psk end |
Instance Method Details
#==(other) ⇒ Object
94 95 96 97 98 99 100 101 102 103 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 94 def ==(other) return false unless super [:mode, :essid, :nwid, :auth_mode, :wpa_psk, :key_length, :keys, :default_key, :nick, :eap_mode, :eap_auth, :channel, :frequency, :bitrate, :ap, :ap_scanmode, :wpa_password, :wpa_identity, :wpa_anonymous_identity, :ca_cert, :client_cert, :client_key].all? do |method| public_send(method) == other.public_send(method) end end |