From: maurosr@linux.vnet.ibm.com (Mauro S. M. Rodrigues)
Subject: [PATCH 2/3] nvmetcli: Fix Referral operation in shell
Date: Mon, 27 Mar 2017 14:46:44 -0300 [thread overview]
Message-ID: <1490636805-13688-2-git-send-email-maurosr@linux.vnet.ibm.com> (raw)
In-Reply-To: <1490636805-13688-1-git-send-email-maurosr@linux.vnet.ibm.com>
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:
a21ebd54f0 ("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: Guilherme G. Piccoli<gpiccoli at linux.vnet.ibm.com>
Signed-off-by: Mauro S. M. Rodrigues <maurosr at linux.vnet.ibm.com>
---
nvmet/__init__.py | 2 +-
nvmetcli | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/nvmet/__init__.py b/nvmet/__init__.py
index 9a0b51d..6542d87 100644
--- a/nvmet/__init__.py
+++ b/nvmet/__init__.py
@@ -1 +1 @@
-from .nvme import Root, Subsystem, Namespace, Port, Host
+from .nvme import Root, Subsystem, Namespace, Port, Host, Referral
diff --git a/nvmetcli b/nvmetcli
index 8140fc6..9f7eacf 100755
--- a/nvmetcli
+++ b/nvmetcli
@@ -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):
--
2.7.4
next prev parent reply other threads:[~2017-03-27 17:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 17:46 [PATCH 1/3] nvmetcli: Fix Port and Host operations in shell Mauro S. M. Rodrigues
2017-03-27 17:46 ` Mauro S. M. Rodrigues [this message]
2017-03-28 10:41 ` [PATCH 2/3] nvmetcli: Fix Referral operation " Sagi Grimberg
2017-03-30 8:27 ` Christoph Hellwig
2017-03-27 17:46 ` [PATCH 3/3] nvmetcli: Install nvmetcli executable in $PATH Mauro S. M. Rodrigues
2017-03-28 10:41 ` Sagi Grimberg
2017-03-30 8:28 ` Christoph Hellwig
2017-04-05 23:56 ` Mauro Rodrigues
2017-04-06 7:20 ` Christoph Hellwig
2017-03-28 10:40 ` [PATCH 1/3] nvmetcli: Fix Port and Host operations in shell Sagi Grimberg
2017-03-30 8:27 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490636805-13688-2-git-send-email-maurosr@linux.vnet.ibm.com \
--to=maurosr@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).