Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions doc/dbus/bus/org.opensuse.Agama.Storage1.ISCSI.bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/opensuse/Agama/Storage1/ISCSI">
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="value" direction="out" type="v"/>
</method>
<method name="Set">
<arg name="interface_name" direction="in" type="s"/>
<arg name="property_name" direction="in" type="s"/>
<arg name="val" direction="in" type="v"/>
</method>
<method name="GetAll">
<arg name="interface_name" direction="in" type="s"/>
<arg name="value" direction="out" type="a{sv}"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" 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 name="xml_data" direction="out" type="s"/>
</method>
</interface>
<interface name="org.opensuse.Agama1.Issues">
<property type="a(sssuu)" name="All" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Storage1.ISCSI">
<method name="SetConfig">
<arg name="serialized_config" direction="in" type="s"/>
<arg name="result" direction="out" type="u"/>
</method>
</interface>
</node>
70 changes: 46 additions & 24 deletions doc/dbus/bus/org.opensuse.Agama.Storage1.bus.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/opensuse/Agama/Storage1">
<node name="ISCSI" />
<node name="iscsi_nodes" />
<node name="staging" />
<node name="system" />
<node name="zfcp_controllers" />
<node name="zfcp_disks" />
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml_data" direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.ObjectManager">
<method name="GetManagedObjects">
<arg name="res" direction="out" type="a{oa{sa{sv}}}"/>
</method>
<signal name="InterfacesAdded">
<arg name="object" type="o"/>
<arg name="interfaces_and_properties" type="a{sa{sv}}"/>
</signal>
<signal name="InterfacesRemoved">
<arg name="object" type="o"/>
<arg name="interfaces" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" direction="in" type="s"/>
Expand All @@ -42,6 +28,42 @@
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml_data" direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.ObjectManager">
<method name="GetManagedObjects">
<arg name="res" direction="out" type="a{oa{sa{sv}}}"/>
</method>
<signal name="InterfacesAdded">
<arg name="object" type="o"/>
<arg name="interfaces_and_properties" type="a{sa{sv}}"/>
</signal>
<signal name="InterfacesRemoved">
<arg name="object" type="o"/>
<arg name="interfaces" type="as"/>
</signal>
</interface>
<interface name="org.opensuse.Agama1.Issues">
<property type="a(sssuu)" name="All" access="read"/>
</interface>
<interface name="org.opensuse.Agama1.LocaleMixin">
<method name="SetLocale">
<arg name="locale" direction="in" type="s"/>
</method>
</interface>
<interface name="org.opensuse.Agama1.Progress">
<property type="u" name="TotalSteps" access="read"/>
<property type="(us)" name="CurrentStep" access="read"/>
<property type="b" name="Finished" access="read"/>
<property type="as" name="Steps" access="read"/>
</interface>
<interface name="org.opensuse.Agama1.ServiceStatus">
<property type="aa{sv}" name="All" access="read"/>
<property type="u" name="Current" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Storage1">
<method name="Probe">
</method>
Expand All @@ -65,7 +87,7 @@
<arg name="serialized_model" direction="out" type="s"/>
</method>
<method name="SolveConfigModel">
<arg name="model" direction="in" type="s"/>
<arg name="sparse_model" direction="in" type="s"/>
<arg name="solved_model" direction="out" type="s"/>
</method>
<method name="Install">
Expand Down Expand Up @@ -122,20 +144,20 @@
<property type="s" name="InitiatorName" access="readwrite"/>
<property type="b" name="IBFT" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Storage1.Proposal.Calculator">
<interface name="org.opensuse.Agama.Storage1.Proposal.Calculator">
<method name="DefaultVolume">
<arg name="mount_path" direction="in" type="s"/>
<arg name="volume" direction="out" type="a{sv}"/>
</method>
<method name="Calculate">
<arg name="settings" direction="in" type="a{sv}"/>
<arg name="settings_dbus" direction="in" type="a{sv}"/>
<arg name="result" direction="out" type="u"/>
</method>
<property type="ao" name="AvailableDevices" access="read"/>
<property type="as" name="ProductMountPoints" access="read"/>
<property type="o" name="Result" access="read"/>
<property type="as" name="EncryptionMethods" access="read"/>
</interface>
<interface name="org.opensuse.Agama.Storage1.ZFCP.Manager">
<interface name="org.opensuse.Agama.Storage1.ZFCP.Manager">
<method name="Probe">
</method>
<property type="b" name="AllowLUNScan" access="read"/>
Expand Down
3 changes: 3 additions & 0 deletions doc/dbus/org.opensuse.Agama.Storage1.ISCSI.Initiator.doc.xml
Original file line number Diff line number Diff line change
@@ -1,7 +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 name="/org/opensuse/Agama/Storage1">
<node name="ISCSI" />
<node name="iscsi_nodes" />
<node name="staging" />
<node name="system" />
<node name="zfcp_controllers" />
<node name="zfcp_disks" />
<interface name="org.opensuse.Agama.Storage1.ISCSI.Initiator">
Expand Down
21 changes: 21 additions & 0 deletions doc/dbus/org.opensuse.Agama.Storage1.ISCSI.doc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/opensuse/Agama/Storage1/ISCSI">
<interface name="org.opensuse.Agama.Storage1.ISCSI">
<!--
Sets the iSCSI config.
-->
<method name="SetConfig">
<!--
See iscsi.schema.json
-->
<arg name="serialized_config" direction="in" type="s"/>
<!--
Whether the config was correctly applied:
0: success
1: failure
-->
<arg name="result" direction="out" type="u"/>
</method>
</interface>
</node>
Original file line number Diff line number Diff line change
@@ -1,7 +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 name="/org/opensuse/Agama/Storage1">
<node name="ISCSI" />
<node name="iscsi_nodes" />
<node name="staging" />
<node name="system" />
<node name="zfcp_controllers" />
<node name="zfcp_disks" />
<!--
Expand Down Expand Up @@ -70,7 +73,7 @@
Snapshots b (makes sense only for btrfs)
Transactional b (makes sense only for btrfs)
-->
<arg name="settings" direction="in" type="a{sv}"/>
<arg name="settings_dbus" direction="in" type="a{sv}"/>
<!--
Whether the proposal was correctly calculated:
0: success
Expand All @@ -84,7 +87,7 @@
values for these mount points (e.g., min and max sizes, file system type, etc).
-->
<property type="as" name="ProductMountPoints" access="read"/>
<property type="o" name="Result" access="read"/>
<property type="as" name="EncryptionMethods" access="read"/>
</interface>

</node>
5 changes: 4 additions & 1 deletion doc/dbus/org.opensuse.Agama.Storage1.doc.xml
Original file line number Diff line number Diff line change
@@ -1,7 +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 name="/org/opensuse/Agama/Storage1">
<node name="ISCSI" />
<node name="iscsi_nodes" />
<node name="staging" />
<node name="system" />
<node name="zfcp_controllers" />
<node name="zfcp_disks" />
<interface name="org.opensuse.Agama.Storage1">
Expand Down Expand Up @@ -146,7 +149,7 @@
]
}
-->
<arg name="model" direction="in" type="s"/>
<arg name="sparse_model" direction="in" type="s"/>
<!--
E.g.,
{
Expand Down
46 changes: 46 additions & 0 deletions rust/agama-lib/share/examples/iscsi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"storage": {
"drives": [
{
"partitions": [{ "generate": "default" }]
}
]
},
"iscsi": {
"initiator": "iqn.2013-02.de.suse:01:e229358d2dea",
"targets": [
{
"address": "192.168.1.1",
"port": 3260,
"name": "iqn.2001-05.com.doe:test1",
"interface": "default",
"startup": "onboot",
"authByTarget": {
"username": "test",
"password": "12345"
}
},
{
"address": "192.168.1.1",
"port": 3260,
"name": "iqn.2001-05.com.doe:test2",
"interface": "default",
"startup": "manual",
"authByTarget": {
"username": "test",
"password": "12345"
},
"authByInitiator": {
"username": "test",
"password": "12345"
}
},
{
"address": "192.168.1.1",
"port": 3261,
"name": "iqn.2001-05.com.doe:test3",
"interface": "default"
}
]
}
}
51 changes: 51 additions & 0 deletions rust/agama-lib/share/iscsi.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Config",
"description": "iSCSI config.",
"type": "object",
"additionalProperties": false,
"properties": {
"initiator": {
"description": "Initiator name.",
"type": "string"
},
"targets": {
"description": "List of targets.",
"type": "array",
"items": { "$ref": "#/$defs/target" }
}
},
"$defs": {
"target": {
"type": "object",
"additionalProperties": false,
"required": ["address", "port", "name", "interface"],
"properties": {
"address": {
"description": "IP address.",
"type": "string"
},
"port": {
"type": "integer",
"minimum": 0
},
"name": { "type": "string" },
"interface": { "type": "string" },
"startup": {
"enum": ["onboot", "manual", "automatic"]
},
"authByTarget": { "$ref": "#/$defs/authentication" },
"authByInitiator": { "$ref": "#/$defs/authentication" }
}
},
"authentication": {
"type": "object",
"additionalProperties": false,
"required": ["username", "password"],
"properties": {
"username": { "type": "string" },
"password": { "type": "string" }
}
}
}
}
3 changes: 3 additions & 0 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@
"items": {
"type": "object"
}
},
"iscsi": {
"$ref": "iscsi.schema.json"
}
},
"$defs": {
Expand Down
3 changes: 3 additions & 0 deletions rust/agama-lib/src/install_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ pub struct InstallSettings {
pub files: Option<Vec<UserFile>>,
#[serde(default)]
pub hostname: Option<HostnameSettings>,
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub iscsi: Option<Box<RawValue>>,
#[serde(default, flatten)]
pub user: Option<UserSettings>,
#[serde(default)]
Expand Down
Loading
Loading