Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
abc520b
Add o.o.Agama.Network1 to the D-Bus configuration
imobachgs Apr 18, 2023
5712b2d
Add an agama-network package
imobachgs Apr 18, 2023
a032669
Add agama-network dependencies
imobachgs May 5, 2023
c82bf0b
Add a basic NetworkManager client
imobachgs May 5, 2023
fcbd519
Export network devices on D-Bus
imobachgs May 5, 2023
86f6a29
Add a missing error.rs file
imobachgs May 5, 2023
c71717d
Export network connections on D-Bus
imobachgs May 5, 2023
d9ce0b3
Read and expose IPv4 addresses
imobachgs May 8, 2023
b79f2d9
Export nameservers on network D-Bus
imobachgs May 8, 2023
9cb8d95
Export gateways on network D-Bus interface
imobachgs May 8, 2023
d9f7b91
Export wireless settings on D-Bus
imobachgs May 8, 2023
13015b4
Update the network support design document
imobachgs May 9, 2023
1b3a707
Remove unused 'use' statements
imobachgs May 9, 2023
1c6b074
Remove the unused 'applied_connections' method
imobachgs May 9, 2023
7aaf53f
Test the conversion from D-Bus to the NetworkManager model
imobachgs May 9, 2023
922dd54
Use an index for the published device interfaces
teclator May 9, 2023
160808b
Publish devices interface
teclator May 9, 2023
b04bf43
Publish connections interface
teclator May 9, 2023
6ebf188
Simplify the network service building
imobachgs May 9, 2023
47c47ea
Refactor object paths handling in the network service
imobachgs May 9, 2023
5b43a94
GetDevices and GetConnections returns ao
imobachgs May 9, 2023
b8d9969
Remove 'network' from interfaces::Connection
imobachgs May 9, 2023
fdf8434
Avoid unneeded copies of strings
imobachgs May 9, 2023
0e0463f
Extend agama-network configuration
imobachgs May 9, 2023
2958086
Move the logic to read the network to NetworkState
imobachgs May 9, 2023
2196935
Add some documentation to agama-network
imobachgs May 9, 2023
0787522
Minor documentation changes
imobachgs May 10, 2023
155aca8
Use o.o.A.N.Connection.* for D-Bus connection interfaces
imobachgs May 10, 2023
f226893
Extend the agama-network documentation
imobachgs May 10, 2023
ef5a59b
Drop redundant code
imobachgs May 11, 2023
766755e
Reduce the complexity of the network service
imobachgs May 12, 2023
a51fdee
Fix a footnote in network documentation
imobachgs May 15, 2023
9b4f13d
Allow setting IPv4 settings through D-Bus
imobachgs May 11, 2023
f006b40
Base with_ipv4 on with_ipv4_mut
imobachgs May 11, 2023
8668c25
Allow setting wireless settings through D-Bus
imobachgs May 11, 2023
eed3964
Read and expose the connections uuid
imobachgs May 11, 2023
cb6c248
Convert a network Connection into a D-Bus HashMap
imobachgs May 12, 2023
87bafbd
Add a D-Bus action to update a network connection
imobachgs May 12, 2023
e61eccf
Make network D-Bus naming consistent with storage
imobachgs May 15, 2023
e6f9ec8
Add methods to add, update and remove connections
imobachgs May 16, 2023
70c184d
Use NetworkState#update_connection on D-Bus
imobachgs May 16, 2023
f42c1d1
Add a D-Bus action to add a network connection
imobachgs May 16, 2023
6ce9ce8
Extract the logic to update the network D-Bus tree
imobachgs May 19, 2023
448f88c
Improve ObjectsPaths API
imobachgs May 19, 2023
8328f7d
Add support to add/remove network connections
imobachgs May 19, 2023
41c21c8
Rename ObjectsPaths to ObjectsRegistry
imobachgs May 19, 2023
c0c36f8
Use a Connection clone as AddConnection payload
imobachgs May 19, 2023
9e10c54
Improve naming of TreeManager
imobachgs May 19, 2023
0edba92
Identify network connections by UUID
imobachgs May 19, 2023
95e472b
Wrap NetworkState in a NetworkSystem struct
imobachgs May 19, 2023
43a7ff3
D-Bus interfaces work with an Arc to a Connection
imobachgs May 21, 2023
8d733a4
Rename TreeManager to Tree
imobachgs May 22, 2023
ad456d4
Remove unneeded fields from network interfaces
imobachgs May 22, 2023
f602c1d
Clean and document the Tree struct
imobachgs May 22, 2023
aac9e53
Write NetworkManager settings
imobachgs May 22, 2023
cc2e32d
Implement SetSecurity in the networking service
imobachgs May 23, 2023
ffe61dc
Replace the Mutex with a channel in the network service
imobachgs May 24, 2023
cf5de1f
Remove unused code in the NetworkManager client
imobachgs May 24, 2023
607fd9e
Update the network service documentation
imobachgs May 24, 2023
8610be4
Use the proper value for wireless infrastructure mode
imobachgs May 24, 2023
321b1ec
Add support to network loopback devices
imobachgs May 25, 2023
8f8cfb3
Merge network connections configuration
imobachgs May 25, 2023
d7d1aef
Drop unused error variants
imobachgs May 25, 2023
90389e5
Merge branch 'master' into network-service-2
imobachgs May 25, 2023
bfed626
agama-dbus-server starts the network service
imobachgs May 25, 2023
0d1defa
Only consider loopback, ethernet and wireless devices
imobachgs May 25, 2023
c9cfe6f
Use a more consistent naming for locale and network services
imobachgs May 26, 2023
d3ef322
Use rustfmt to format locale.rs
imobachgs May 26, 2023
b1ef6fd
Expose the DeviceType as Type
imobachgs May 26, 2023
8667ac6
Fix documentation
imobachgs May 26, 2023
84dd76b
Allow unsetting the gateway in the network service
imobachgs May 26, 2023
4bd6d48
Fix error about not getting the network service name
imobachgs May 26, 2023
43ca226
Improve the network Tree API to prevent errors
imobachgs May 26, 2023
7f97961
Rename refresh_* functions to set_*
imobachgs May 26, 2023
113dc9c
Remove an unneeded comment
imobachgs May 26, 2023
28204c9
Rename unused file
imobachgs May 26, 2023
936f544
Fix connection type detection in network service
imobachgs May 26, 2023
0c43818
Improve handling of NmMethod and NmDeviceType
imobachgs May 26, 2023
b1cba3c
Move *NestedHash types to agama-lib
imobachgs May 26, 2023
a606556
Rename Missing/is_missing to Removed/is_removed
imobachgs May 26, 2023
62cca58
Fix the documentation
imobachgs May 26, 2023
dc54189
Use HashMap::with_capacity in merge_dbus_connections
imobachgs May 26, 2023
513fc5b
Use Vec::with_capacity in the NetworkManager client
imobachgs May 26, 2023
82a8a91
Add a TODO to write a macro for the base_* functions
imobachgs May 26, 2023
f532a19
Bring back text about D-Bus proxies
imobachgs May 26, 2023
d211e3e
Use HashMap::with_capacity
imobachgs May 26, 2023
dc1ff0a
Improve handling of wireless settings
imobachgs May 26, 2023
fc16172
Remove WirelessMode::Other
imobachgs May 27, 2023
edcf0e3
doc/dbus: seeded introspection XML for Network1.*
mvidner May 29, 2023
73ca602
doc/dbus: copied to .doc.xml and kept only relevant interface
mvidner May 29, 2023
82a3b8d
doc/dbus: added headings so that gdbus-codegen sees the docs
mvidner May 29, 2023
649b16a
Fix objects paths
imobachgs May 31, 2023
36c4837
Log the device name for unsupported types
imobachgs May 31, 2023
e23a865
Improve documentation
imobachgs May 31, 2023
55e0324
Replace ty with type_
imobachgs May 31, 2023
fd6f821
Do not send the 'addresses' key
imobachgs May 31, 2023
de0dad2
Apply suggestions from code review
imobachgs May 31, 2023
c19bfee
Add a TODO about using OwnedObjectPath
imobachgs May 31, 2023
5141cb9
Update the changes file
imobachgs Jun 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Connection.bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Connection.Wireless">
<property name="Mode" type="y" access="readwrite"/>
<property name="Password" type="s" access="readwrite"/>
<property name="SSID" type="ay" access="readwrite"/>
<property name="Security" type="y" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection">
<property name="Id" type="s" access="read"/>
<property name="UUID" type="s" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.IPv4">
<property name="Addresses" type="a(su)" access="readwrite"/>
<property name="Gateway" type="s" access="readwrite"/>
<property name="Method" type="y" access="readwrite"/>
<property name="Nameservers" type="as" access="readwrite"/>
</interface>
</node>

75 changes: 75 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Connections.bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.opensuse.Agama.Network1.Connections">
<!--
Returns the D-Bus paths of the network connections.
-->
<method name="GetConnections">
<arg type="ao" direction="out"/>
</method>
<!--
Adds a new network connection.

* `name`: connection name.
* `ty`: connection type (see [crate::model::DeviceType]).
-->
<method name="AddConnection">
<arg name="name" type="s" direction="in"/>
<arg name="ty" type="y" direction="in"/>
</method>
<!--
Removes a network connection.

* `uuid`: connection UUID..
-->
<method name="RemoveConnection">
<arg name="uuid" type="s" direction="in"/>
</method>
<!--
Applies the network configuration.

It includes adding, updating and removing connections as needed.
-->
<method name="Apply">
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
</node>

46 changes: 46 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Device.bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.opensuse.Agama.Network1.Device">
<property name="Name" type="s" access="read"/>
<property name="Type" type="y" access="read"/>
</interface>
</node>

50 changes: 50 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Devices.bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Devices">
<!--
Returns the D-Bus paths of the network devices.
-->
<method name="GetDevices">
<arg type="ao" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
</node>

12 changes: 12 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Connection.IPv4.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Connection.IPv4">
<property name="Addresses" type="a(su)" access="readwrite"/>
<property name="Gateway" type="s" access="readwrite"/>
<property name="Method" type="y" access="readwrite"/>
<property name="Nameservers" type="as" access="readwrite"/>
</interface>
</node>

12 changes: 12 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Connection.Wireless.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Connection.Wireless">
<property name="Mode" type="y" access="readwrite"/>
<property name="Password" type="s" access="readwrite"/>
<property name="SSID" type="ay" access="readwrite"/>
<property name="Security" type="y" access="readwrite"/>
</interface>
</node>

10 changes: 10 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Connection.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Connection">
<property name="Id" type="s" access="read"/>
<property name="UUID" type="s" access="read"/>
</interface>
</node>

44 changes: 44 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Connections.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Connections">
<!--
GetConnections:
Returns the D-Bus paths of the network connections.
-->
<method name="GetConnections">
<arg type="ao" direction="out"/>
</method>
<!--
AddConnection:
Adds a new network connection.

* `name`: connection name.

* `ty`: connection type (see [crate::model::DeviceType]).
-->
<method name="AddConnection">
<arg name="name" type="s" direction="in"/>
<arg name="ty" type="y" direction="in"/>
</method>
<!--
RemoveConnection:
Removes a network connection.

* `uuid`: connection UUID..
-->
<method name="RemoveConnection">
<arg name="uuid" type="s" direction="in"/>
</method>
<!--
Apply:
Applies the network configuration.

It includes adding, updating and removing connections as needed.
-->
<method name="Apply">
</method>
</interface>
</node>

10 changes: 10 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Device.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Device">
<property name="Name" type="s" access="read"/>
<property name="Type" type="y" access="read"/>
</interface>
</node>

15 changes: 15 additions & 0 deletions doc/dbus/org.opensuse.Agama.Network1.Devices.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.opensuse.Agama.Network1.Devices">
<!--
GetDevices:
Returns the D-Bus paths of the network devices.
-->
<method name="GetDevices">
<arg type="ao" direction="out"/>
</method>
</interface>
</node>

Loading