]> www.infradead.org Git - users/hch/nvmetcli.git/commit
nvmetcli: fix Port and Host operations in shell
authorMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Mon, 27 Mar 2017 17:46:43 +0000 (14:46 -0300)
committerChristoph Hellwig <hch@lst.de>
Thu, 30 Mar 2017 08:26:30 +0000 (10:26 +0200)
commit651ddef0fed637b7fe3c6100f89955c50a426363
tree89a68cbb09cecd26141c46bbba8d351128d63ce6
parentec76995c4dc711218cfde20da423365baad9d97b
nvmetcli: fix Port and Host operations in shell

Operations against Port and Host entities are broken. When performing
operations like the follow:

/ports> create 1
/hosts> create 1

nvmetcli fails, saying the object doesn't have the attribute we're
trying to access, for instance:
'module' object has no attribute 'Port'

This patch fixes this issue by importing the classes Port and Host in
nvmet/__init__.py which was forgotten during the follow change:

a21ebd54f0 ("nvmetcli: Fix nvmet import").

Tested-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Tested-by: Sagi Grimberg <sagi@grimberg.m>
Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
nvmet/__init__.py