Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d84b21e
Use the Id to index the network connections
imobachgs Jun 23, 2023
ec56b57
Add an method to get a connection path by name
imobachgs Jun 23, 2023
75283e0
Use ObjectPath structs instead of strings
imobachgs Jun 23, 2023
7577639
Prefer ids to UUIDs in the network model
imobachgs Jun 23, 2023
070f789
Make Clippy happy
imobachgs Jun 23, 2023
ec36574
Implement the merge strategy for NetworkSettings
imobachgs Jun 27, 2023
a7c6609
Fix the Jsonnet example
imobachgs Jun 27, 2023
d68d6d3
Allow not specifying the connection method
imobachgs Jun 27, 2023
1d55105
Do not allow additional attributes in the network settings
imobachgs Jun 27, 2023
f7604d4
Use a vector of strings to set IPv4 'Addresses'
imobachgs Jun 28, 2023
72bd865
Move DeviceType to the types module
imobachgs Jun 28, 2023
3c1f8a4
Use a string to represent an IP method over D-Bus
imobachgs Jun 28, 2023
24a5efb
Write network settings from a profile
imobachgs Jun 28, 2023
74003d7
Write wireless settings from a profile
imobachgs Jun 28, 2023
248ebde
Fix the update of the name servers in NetworkManager
imobachgs Jun 28, 2023
bc0c4d0
Annotate the wireless D-Bus interface's setters
imobachgs Jun 28, 2023
f3a0d0e
Log unsupported network devices
imobachgs Jun 28, 2023
85c2eb3
Add support for duplicated connection IDs
imobachgs Jun 29, 2023
80cd754
Do not expose the connection UUID over D-Bus
imobachgs Jun 29, 2023
378dacf
Write the network configuration from the CLI
imobachgs Jun 29, 2023
c6f25e5
Log errors when writing network connections
imobachgs Jun 29, 2023
2bc7258
Add a "get" function to SettingObject
imobachgs Jun 30, 2023
5aced7d
Derive Debug for SettingValue and SettingObject
imobachgs Jun 30, 2023
bb842f7
Fix adding a new connection through the CLI
imobachgs Jun 30, 2023
cedf34c
Add tests for network/types
imobachgs Jul 3, 2023
5ef7a79
Fix the Rust code formatting
imobachgs Jul 3, 2023
7e327a5
Remove network services *.bus.xml files
imobachgs Jul 4, 2023
ff3ec63
Extend the network::interfaces documentation
imobachgs Jul 4, 2023
1d9630e
Update the org.opensuse.Agama.Network1 documentation
imobachgs Jul 4, 2023
08351ea
Merge branch 'master' into write-network-changes
imobachgs Jul 4, 2023
0aea744
Use 'id' instead of 'name' to identify network connections
imobachgs Jul 4, 2023
9c402d3
Add network servies *.bus.xml files
imobachgs Jul 4, 2023
d412ca5
Fix the *.Connection.Wireless documentation
imobachgs Jul 4, 2023
a3c0890
Fix the add_connection documentation
imobachgs Jul 4, 2023
e401b66
Merge branch 'master' into write-network-changes
imobachgs Jul 4, 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

This file was deleted.

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

<!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.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection">
<!--
Connection ID.

Unique identifier of the network connection. It may or not be the same that the used by the
backend. For instance, when using NetworkManager (which is the only supported backend by
now), it uses the original ID but appending a number in case the ID is duplicated.
-->
<property name="Id" type="s" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.IPv4">
<!--
List of IP addresses.

When the method is 'auto', these addresses are used as additional addresses.
-->
<property name="Addresses" type="as" access="readwrite"/>
<!--
Network gateway.

An empty string removes the current value. It is not possible to set a gateway if the
addresses property is empty.
-->
<property name="Gateway" type="s" access="readwrite"/>
<!--
IP configuration method.

Possible values: "disabled", "auto", "manual" or "link-local".

See [crate::model::IpMethod].
-->
<property name="Method" type="s" access="readwrite"/>
<!--
Name server addresses.
-->
<property name="Nameservers" type="as" access="readwrite"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.Wireless">
<!--
Wireless connection mode.

Possible values: "unknown", "adhoc", "infrastructure", "ap" or "mesh".

See [crate::model::WirelessMode].
-->
<property name="Mode" type="s" access="readwrite"/>
<!--
Password to connect to the wireless network.
-->
<property name="Password" type="s" access="readwrite"/>
<!--
Network SSID.
-->
<property name="SSID" type="ay" access="readwrite"/>
<!--
Wireless security protocol.

Possible values: "none", "owe", "ieee8021x", "wpa-psk", "sae", "wpa-eap",
"wpa-eap-suite-b192".

See [crate::model::WirelessMode].
-->
<property name="Security" type="s" access="readwrite"/>
</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>
</node>

This file was deleted.

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

<!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.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection">
<!--
Connection ID.

Unique identifier of the network connection. It may or not be the same that the used by the
backend. For instance, when using NetworkManager (which is the only supported backend by
now), it uses the original ID but appending a number in case the ID is duplicated.
-->
<property name="Id" type="s" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.IPv4">
<!--
List of IP addresses.

When the method is 'auto', these addresses are used as additional addresses.
-->
<property name="Addresses" type="as" access="readwrite"/>
<!--
Network gateway.

An empty string removes the current value. It is not possible to set a gateway if the
addresses property is empty.
-->
<property name="Gateway" type="s" access="readwrite"/>
<!--
IP configuration method.

Possible values: "disabled", "auto", "manual" or "link-local".

See [crate::model::IpMethod].
-->
<property name="Method" type="s" access="readwrite"/>
<!--
Name server addresses.
-->
<property name="Nameservers" type="as" access="readwrite"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.Wireless">
<!--
Wireless connection mode.

Possible values: "unknown", "adhoc", "infrastructure", "ap" or "mesh".

See [crate::model::WirelessMode].
-->
<property name="Mode" type="s" access="readwrite"/>
<!--
Password to connect to the wireless network.
-->
<property name="Password" type="s" access="readwrite"/>
<!--
Network SSID.
-->
<property name="SSID" type="ay" access="readwrite"/>
<!--
Wireless security protocol.

Possible values: "none", "owe", "ieee8021x", "wpa-psk", "sae", "wpa-eap",
"wpa-eap-suite-b192".

See [crate::model::WirelessMode].
-->
<property name="Security" type="s" access="readwrite"/>
</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>
</node>

90 changes: 69 additions & 21 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Connection.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,79 @@
<!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.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection">
<!--
Connection ID.

Unique identifier of the network connection. It may or not be the same that the used by the
backend. For instance, when using NetworkManager (which is the only supported backend by
now), it uses the original ID but appending a number in case the ID is duplicated.
-->
<property name="Id" type="s" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.IPv4">
<!--
List of IP addresses.

When the method is 'auto', these addresses are used as additional addresses.
-->
<property name="Addresses" type="as" access="readwrite"/>
<!--
Network gateway.

An empty string removes the current value. It is not possible to set a gateway if the
addresses property is empty.
-->
<property name="Gateway" type="s" access="readwrite"/>
<!--
IP configuration method.

Possible values: "disabled", "auto", "manual" or "link-local".

See [crate::model::IpMethod].
-->
<property name="Method" type="s" access="readwrite"/>
<!--
Name server addresses.
-->
<property name="Nameservers" type="as" access="readwrite"/>
</interface>
<interface name="org.opensuse.Agama.Network1.Connection.Wireless">
<property name="Mode" type="y" access="readwrite"/>
<!--
Wireless connection mode.

Possible values: "unknown", "adhoc", "infrastructure", "ap" or "mesh".

See [crate::model::WirelessMode].
-->
<property name="Mode" type="s" access="readwrite"/>
<!--
Password to connect to the wireless network.
-->
<property name="Password" type="s" access="readwrite"/>
<!--
Network SSID.
-->
<property name="SSID" type="ay" access="readwrite"/>
<property name="Security" type="y" access="readwrite"/>
<!--
Wireless security protocol.

Possible values: "none", "owe", "ieee8021x", "wpa-psk", "sae", "wpa-eap",
"wpa-eap-suite-b192".

See [crate::model::WirelessMode].
-->
<property name="Security" type="s" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
Expand Down Expand Up @@ -37,22 +102,5 @@
<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>

13 changes: 11 additions & 2 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Connections.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,25 @@
* `ty`: connection type (see [crate::model::DeviceType]).
-->
<method name="AddConnection">
<arg name="name" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="ty" type="y" direction="in"/>
</method>
<!--
Returns the D-Bus path of the network connection.

* `id`: connection ID.
-->
<method name="GetConnection">
<arg name="id" type="s" direction="in"/>
<arg type="o" direction="out"/>
</method>
<!--
Removes a network connection.

* `uuid`: connection UUID..
-->
<method name="RemoveConnection">
<arg name="uuid" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
</method>
<!--
Applies the network configuration.
Expand Down
12 changes: 12 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Device.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@
</signal>
</interface>
<interface name="org.opensuse.Agama.Network1.Device">
<!--
Device name.

Kernel device name, e.g., eth0, enp1s0, etc.
-->
<property name="Name" type="s" access="read"/>
<!--
Device type.

Possible values: 0 = loopback, 1 = ethernet, 2 = wireless.

See [crate::model::DeviceType].
-->
<property name="Type" type="y" access="read"/>
</interface>
</node>
Expand Down
10 changes: 5 additions & 5 deletions doc/dbus/bus/org.opensuse.Agama.Network1.Devices.bus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<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"/>
Expand All @@ -41,10 +46,5 @@
<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>

Loading