Skip to content

Commit

Permalink
iSCSI: adjust to change in how blivet passes auth info
Browse files Browse the repository at this point in the history
When blivet switched from using libiscsi to storaged, the node
attribute of an `iScsiDiskDevice` changed from being a libiscsi
`PyIscsiNode` instance to a blivet `NodeInfo` namedtuple, but
both blivet and anaconda continued trying to call the `getAuth`
method of the node - which `NodeInfo` doesn't have - to find
the authentication info for the node. I've sent a blivet PR
to store this information in the `NodeInfo` namedtuple instead:
storaged-project/blivet#518 . This patch
adjusts anaconda to use it.
  • Loading branch information
AdamWill committed Oct 27, 2016
1 parent 6589265 commit 770c5bf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pyanaconda/ui/gui/spokes/storage.py
Expand Up @@ -418,14 +418,12 @@ def _create_iscsi_data(self, device):
if self.storage.iscsi.ifaces:
iscsi_data.iface = self.storage.iscsi.ifaces[dev_node.iface]

auth = dev_node.getAuth()
if auth:
if auth.username and auth.password:
iscsi_data.user = auth.username
iscsi_data.password = auth.password
if auth.reverse_username and auth.reverse_password:
iscsi_data.user_in = auth.reverse_username
iscsi_data.password_in = auth.reverse_password
if dev_node.username and dev_node.password:
iscsi_data.user = dev_node.username
iscsi_data.password = dev_node.password
if dev_node.r_username and dev_node.r_password:
iscsi_data.user_in = dev_node.r_username
iscsi_data.password_in = dev_node.r_password
return iscsi_data

@property
Expand Down

0 comments on commit 770c5bf

Please sign in to comment.