-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt iSCSI handling to the new architecture (#1187)
This PR implements an HTTP/JSON API for managing iSCSI devices. It works as a proxy over the real API which is implemented in D-Bus. The API is composed of these parts: * A bunch of HTTP/JSON endpoints to manage the iSCSI configuration. * A stream of iSCSI nodes changes (adding, changing or removing nodes). * A stream of initiator changes (not implemented yet). NOTE: this PR should be merged after #1175. ## To do - [x] Adapt the client - [x] Populate the cache of ISCSI nodes in the stream - [x] Allow changing the initiator name - [x] Allow changing the startup - [x] Emit initiator changes - [x] OpenAPI documentation - [x] Remove calls to `unwrap()` in the initiator changes stream ## References * Trello: https://trello.com/c/TEQvbxAU/
- Loading branch information
Showing
29 changed files
with
1,511 additions
and
233 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
doc/dbus/bus/org.opensuse.Agama.Storage1.ISCSI.Initiator.bus.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.opensuse.Agama.Storage1.bus.xml |
46 changes: 46 additions & 0 deletions
46
doc/dbus/bus/org.opensuse.Agama.Storage1.ISCSI.Node.bus.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 name="/org/opensuse/Agama/Storage1/iscsi_nodes/1"> | ||
<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.Agama.Storage1.ISCSI.Node"> | ||
<method name="Login"> | ||
<arg name="options" direction="in" type="a{sv}"/> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<method name="Logout"> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<property type="s" name="Target" access="read"/> | ||
<property type="s" name="Address" access="read"/> | ||
<property type="u" name="Port" access="read"/> | ||
<property type="s" name="Interface" access="read"/> | ||
<property type="b" name="IBFT" access="read"/> | ||
<property type="b" name="Connected" access="read"/> | ||
<property type="s" name="Startup" access="readwrite"/> | ||
</interface> | ||
</node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
doc/dbus/org.opensuse.Agama.Storage1.ISCSI.Initiator.doc.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"> | ||
<node name="iscsi_nodes" /> | ||
<node name="zfcp_controllers" /> | ||
<node name="zfcp_disks" /> | ||
<interface name="org.opensuse.Agama.Storage1.ISCSI.Initiator"> | ||
<method name="Discover"> | ||
<arg name="address" direction="in" type="s"/> | ||
<arg name="port" direction="in" type="u"/> | ||
<arg name="options" direction="in" type="a{sv}"/> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<method name="Delete"> | ||
<arg name="node" direction="in" type="o"/> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<property type="s" name="InitiatorName" access="readwrite"/> | ||
<property type="b" name="IBFT" access="read"/> | ||
</interface> | ||
</node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!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_nodes/1"> | ||
<interface name="org.opensuse.Agama.Storage1.ISCSI.Node"> | ||
<method name="Login"> | ||
<arg name="options" direction="in" type="a{sv}"/> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<method name="Logout"> | ||
<arg name="result" direction="out" type="u"/> | ||
</method> | ||
<property type="s" name="Target" access="read"/> | ||
<property type="s" name="Address" access="read"/> | ||
<property type="u" name="Port" access="read"/> | ||
<property type="s" name="Interface" access="read"/> | ||
<property type="b" name="IBFT" access="read"/> | ||
<property type="b" name="Connected" access="read"/> | ||
<property type="s" name="Startup" access="readwrite"/> | ||
</interface> | ||
</node> |
1 change: 1 addition & 0 deletions
1
doc/dbus/org.opensuse.Agama.Storage1.Proposal.Calculator.doc.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.