## org.freedesktop.UDisks2.Manager.ISCSI.Initiator

org.freedesktop.UDisks2.Manager.ISCSI.Initiator — iSCSI add-on to the manager singleton

## Methods

    GetFirmwareInitiatorName (OUT s        result);
    GetInitiatorName         (OUT s        result);
    GetInitiatorNameRaw      (OUT ay       result);
    SetInitiatorName         (IN  s        name,
                              IN  a{sv}    options);
    DiscoverSendTargets      (IN  s        address,
                              IN  q        port,
                              IN  a{sv}    options,
                              OUT a(sisis) nodes,
                              OUT i        nodes_cnt);
    DiscoverFirmware         (IN  a{sv}    options,
                              OUT a(sisis) nodes,
                              OUT i        nodes_cnt);
    Login                    (IN  s        name,
                              IN  i        tpgt,
                              IN  s        address,
                              IN  i        port,
                              IN  s        iface,
                              IN  a{sv}    options);
    Logout                   (IN  s        name,
                              IN  i        tpgt,
                              IN  s        address,
                              IN  i        port,
                              IN  s        iface,
                              IN  a{sv}    options);

## Properties

    SessionsSupported  readable   b

## Description

Additional interface with iSCSI specifics for top-level manager singleton object located at the object path `/org/freedesktop/UDisks2/Manager`.

Since 2.0.1

## Method Details

### The GetFirmwareInitiatorName() method

    GetFirmwareInitiatorName (OUT s result);

Returns the iSCSI firmware initiator name.

`OUT s `result``: | The iSCSI firmware initiator name.

Since 2.4.0

### The GetInitiatorName() method

    GetInitiatorName (OUT s result);

Returns a iSCSI initiator name.

Note: Initiator name can contain non UTF-8 characters. In this case this function will return "Invalid UTF-8" string. Use org.freedesktop.UDisks2.Manager.ISCSI.Initiator:GetInitiatorNameRaw to get raw, undecoded initiator name.

`OUT s `result``: | The iSCSI initiator name.

Since 2.0.1

### The GetInitiatorNameRaw() method

    GetInitiatorNameRaw (OUT ay result);

Returns an iSCSI initiator name as a raw NULL terminated byte array.

`OUT ay `result``: | The iSCSI initiator name.

Since 2.8.3

### The SetInitiatorName() method

    SetInitiatorName (IN  s     name,
                      IN  a{sv} options);

Sets a new iSCSI initiator name. This is typically done by populating the `/etc/iscsi/initiatorname.iscsi` file.

The iscsid service needs to be restarted afterwards to reflect the change (if running). This is however distribution-specific and not performed by UDisks at this moment.

No additional options are currently defined.

`IN s `name``: | The new iSCSI initiator name.
`IN a{sv} `options``: | Additional options.

Since 2.1.3

### The DiscoverSendTargets() method

    DiscoverSendTargets (IN  s        address,
                         IN  q        port,
                         IN  a{sv}    options,
                         OUT a(sisis) nodes,
                         OUT i        nodes_cnt);

Performs targets' discovery with no authentication data.

If the option `username` is provided, then the `username` and `password` will be used for CHAP authentication.

If the option `reverse-username` is provided, the the `reverse-username` and `reverse-password` will be used for CHAP authentication.

`IN s `address``: | Hostname or IP-address to connect to.
`IN q `port``: | Port to connect to, or 0 for the default port.
`IN a{sv} `options``: | Additional options.
`OUT a(sisis) `nodes``: | Discovered nodes.
`OUT i `nodes_cnt``: | The number of found nodes.

Since 2.3.1

### The DiscoverFirmware() method

    DiscoverFirmware (IN  a{sv}    options,
                      OUT a(sisis) nodes,
                      OUT i        nodes_cnt);

Performs targets' discovery using firmware (ppc or ibft).

No additional options are currently defined.

`IN a{sv} `options``: | Additional options.
`OUT a(sisis) `nodes``: | Structure containing discovered targets (name, tpgt, address, port, iface).
`OUT i `nodes_cnt``: | The number of found nodes.

Since 2.1.3

### The Login() method

    Login (IN  s     name,
           IN  i     tpgt,
           IN  s     address,
           IN  i     port,
           IN  s     iface,
           IN  a{sv} options);

Login to the iSCSI node described by the given node properties.

If the option `username` is provided, then the `username` and `password` will be used for CHAP authentication.

If the option `reverse-username` is provided, the the `reverse-username` and `reverse-password` will be used for CHAP authentication.

Firmware-discovered nodes retain their authentication info unless overriden with specified credentials (see above).

All the additional options are transformed into the interface parameters. For example, if an automatic node startup is desired, the `node.startup` needs to be set to 'automatic' (default value is 'manual').

`IN s `name``: | iSCSI iqn for the node.
`IN i `tpgt``: | Portal group number.
`IN s `address``: | Portal hostname or IP-address.
`IN i `port``: | Portal port number.
`IN s `iface``: | Interface to connect through.
`IN a{sv} `options``: | Additional options.

Since 2.1.3

### The Logout() method

    Logout (IN  s     name,
            IN  i     tpgt,
            IN  s     address,
            IN  i     port,
            IN  s     iface,
            IN  a{sv} options);

Logout of the iSCSI node described by the given node properties.

All the additional options are transformed into the interface parameters. For example, if an automatic node startup is not desired, the `node.startup` needs to be set to 'manual'.

`IN s `name``: | iSCSI iqn for the node.
`IN i `tpgt``: | Portal group number.
`IN s `address``: | Portal hostname or IP-address.
`IN i `port``: | Portal port number.
`IN s `iface``: | Interface to logout.
`IN a{sv} `options``: | Additional options.

Since 2.1.3

## Property Details

### The "SessionsSupported" property

    SessionsSupported  readable   b

Whether or not this version of Udisks

supports ISCSI.Session objects.

Since 2.0.1