Skip to content
Snippets Groups Projects
Commit 65bf3de3 authored by Mauro S. M. Rodrigues's avatar Mauro S. M. Rodrigues Committed by Christoph Hellwig
Browse files

nvmetcli: fix Referral operation in shell


It's not possible to create or list a Referral under Port entity,
because Referral class is not imported and thus it fails:

/ports/1/referrals> ls

returning "'module' object has no attribute 'Referral'".

This is caused by changes introduced in:
a21ebd54 ("nvmetcli: Fix nvmet import").

This patch also fixes the attribute type helper expected for Referral's
portid attribute. It was 'int', causing the system to show error
messages like:

"'UIReferralNode' object has no attribute 'ui_type_int'".
The correct type is 'number'.

Reviewed-by: default avatarGuilherme G. <Piccoli&lt;gpiccoli@linux.vnet.ibm.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 651ddef0
No related branches found
No related tags found
No related merge requests found
from .nvme import Root, Subsystem, Namespace, Port, Host
from .nvme import Root, Subsystem, Namespace, Port, Host, Referral
......@@ -460,7 +460,7 @@ class UIReferralNode(UINode):
'traddr': ('string', 'Transport Address (e.g. IP Address)'),
'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'),
'trtype': ('string', 'Transport Type (e.g. rdma or loop)'),
'portid': ('int', 'Port identifier'),
'portid': ('number', 'Port identifier'),
}
def __init__(self, parent, cfnode):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment