Class: NetworkManager::DBus::Device
- Inherits:
-
Object
- Object
- NetworkManager::DBus::Device
- Includes:
- DBusInterface::Object
- Defined in:
- lib/network_manager/dbus/device.rb
Constant Summary collapse
- NM_DEVICE_TYPE__PROPERTY =
'DeviceType'
- NM_DEVICE_TYPE_UNKNOWN =
The device type is unknown.
0
- NM_DEVICE_TYPE_ETHERNET =
The device is wired Ethernet device.
1
- NM_DEVICE_TYPE_WIFI =
The device is an 802.11 WiFi device.
2
- NM_DEVICE_TYPE_UNUSED1 =
Unused
3
- NM_DEVICE_TYPE_UNUSED2 =
Unused
4
- NM_DEVICE_TYPE_BT =
The device is Bluetooth device that provides PAN or DUN capabilities.
5
- NM_DEVICE_TYPE_OLPC_MESH =
The device is an OLPC mesh networking device.
6
- NM_DEVICE_TYPE_WIMAX =
The device is an 802.16e Mobile WiMAX device.
7
- NM_DEVICE_TYPE_MODEM =
The device is a modem supporting one or more of analog telephone, CDMA/EVDO, GSM/UMTS/HSPA, or LTE standards to access a cellular or wireline data network.
8
Instance Method Summary collapse
-
#active_connection ⇒ NetworkManager::DBus::ActiveConnection
Con.
-
#dhcp4_config ⇒ NetworkManager::DBus::Ip4Config
Conf.
-
#ethernet ⇒ NetworkManager::DBus::EthernetDevice
Dev.
-
#ethernet? ⇒ Boolean
ETHERNET.
- #ip4_address ⇒ Object
-
#ip4_config ⇒ NetworkManager::DBus::Ip4Config
Conf.
Methods included from DBusInterface::Object
#[], #call, included, #initialize, #object_path, #object_path=, #properties, #to_s
Instance Method Details
#active_connection ⇒ NetworkManager::DBus::ActiveConnection
Returns con.
46 47 48 49 |
# File 'lib/network_manager/dbus/device.rb', line 46 def active_connection @active_connection ||= NetworkManager::DBus::ActiveConnection.new self['ActiveConnection'] end |
#dhcp4_config ⇒ NetworkManager::DBus::Ip4Config
Returns conf.
41 42 43 |
# File 'lib/network_manager/dbus/device.rb', line 41 def dhcp4_config @dhcp4_config ||= NetworkManager::DBus::Dhcp4Config.new self['Dhcp4Config'] end |
#ethernet ⇒ NetworkManager::DBus::EthernetDevice
Returns dev.
60 61 62 63 64 65 66 |
# File 'lib/network_manager/dbus/device.rb', line 60 def ethernet if ethernet? @ethernet ||= NetworkManager::DBus::EthernetDevice.new(self.object_path) else nil end end |
#ethernet? ⇒ Boolean
ETHERNET
55 56 57 |
# File 'lib/network_manager/dbus/device.rb', line 55 def ethernet? properties[NM_DEVICE_TYPE__PROPERTY] == NM_DEVICE_TYPE_ETHERNET end |
#ip4_address ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/network_manager/dbus/device.rb', line 27 def ip4_address @ip_addr ||= begin ip4_int = self['Ip4Address'] i = NetworkManager::Ip4Config.from_nm_au ip4_int i.address end end |
#ip4_config ⇒ NetworkManager::DBus::Ip4Config
Returns conf.
36 37 38 |
# File 'lib/network_manager/dbus/device.rb', line 36 def ip4_config @ip4_config ||= NetworkManager::DBus::Ip4Config.new self['Ip4Config'] end |