Class: Y2Network::ConnectionConfig::Wireless
- Includes:
- Yast2::Equatable
- 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 ⇒ 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.
-
#client_key_password ⇒ String
Client private key password.
-
#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
TODO: unify psk and password and write correct one depending on mode.
-
#wpa_psk ⇒ String
FIXME: Consider moving keys to different classes.
Attributes inherited from Base
#bootproto, #description, #dhclient_set_hostname, #ethtool_options, #firewall_zone, #hostnames, #id, #interface, #ip, #ip_aliases, #lladdress, #mtu, #name, #startmode
Instance Method Summary collapse
-
#initialize ⇒ Wireless
constructor
A new instance of Wireless.
-
#keys? ⇒ Boolean
Convenience method to check whether there are some WEP key defined.
Methods inherited from Base
#all_ips, #dhcp?, #find_parent, #hostname, #hostname=, #propose, #propose_startmode, #static?, #type, #virtual?
Constructor Details
#initialize ⇒ Wireless
Returns a new instance of Wireless.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 82 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
62 63 64 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 62 def ap @ap end |
#ap_scanmode ⇒ Integer
FIXME: Consider an enum
65 66 67 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 65 def ap_scanmode @ap_scanmode end |
#auth_mode ⇒ Symbol
Returns Authorization mode (:open, :shared, :psk, :eap).
39 40 41 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 39 def auth_mode @auth_mode end |
#bitrate ⇒ Float?
Returns bitrate limitation in Mb/s or nil for automatic.
60 61 62 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 60 def bitrate @bitrate end |
#ca_cert ⇒ String
Returns ca certificate used to sign server certificate.
74 75 76 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 74 def ca_cert @ca_cert end |
#channel ⇒ Integer?
56 57 58 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 56 def channel @channel end |
#client_cert ⇒ String
Returns client certificate used to login for TLS.
76 77 78 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 76 def client_cert @client_cert end |
#client_key ⇒ String
Returns client private key used to encrypt for TLS.
78 79 80 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 78 def client_key @client_key end |
#client_key_password ⇒ String
Returns client private key password.
80 81 82 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 80 def client_key_password @client_key_password end |
#default_key ⇒ Integer
Returns default WEP key.
48 49 50 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 48 def default_key @default_key end |
#eap_auth ⇒ String
54 55 56 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 54 def eap_auth @eap_auth end |
#eap_mode ⇒ String
52 53 54 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 52 def eap_mode @eap_mode end |
#essid ⇒ String
35 36 37 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 35 def essid @essid end |
#frequency ⇒ Integer
58 59 60 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 58 def frequency @frequency end |
#key_length ⇒ Integer
44 45 46 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 44 def key_length @key_length end |
#keys ⇒ Array<String>
Returns WEP keys.
46 47 48 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 46 def keys @keys end |
#mode ⇒ String
wireless options
FIXME: Consider an enum
33 34 35 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 33 def mode @mode end |
#nick ⇒ String
50 51 52 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 50 def nick @nick end |
#nwid ⇒ String
Returns Network ID.
37 38 39 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 37 def nwid @nwid end |
#wpa_anonymous_identity ⇒ String
Returns initial identity used for creating tunnel.
72 73 74 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 72 def wpa_anonymous_identity @wpa_anonymous_identity end |
#wpa_identity ⇒ String
70 71 72 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 70 def wpa_identity @wpa_identity end |
#wpa_password ⇒ String
TODO: unify psk and password and write correct one depending on mode
68 69 70 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 68 def wpa_password @wpa_password end |
#wpa_psk ⇒ String
FIXME: Consider moving keys to different classes.
42 43 44 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 42 def wpa_psk @wpa_psk end |
Instance Method Details
#keys? ⇒ Boolean
Convenience method to check whether there are some WEP key defined
113 114 115 |
# File 'src/lib/y2network/connection_config/wireless.rb', line 113 def keys? !(keys || []).compact.all?(&:empty?) end |