Closed ulmitov closed 1 year ago
Don't sure what to say.
It's not a "supported method" so it may be "ok" to fail, but may be other calls that may fail too in the future. Let's see what we can do about this....
Thanks for your report!
Ok, btw the develop branch has a conflict in package names: import from pystorcli2 is working, but not from pystorcli
In [1]: from pystorcli.common import response_data
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from pystorcli.common import response_data
ModuleNotFoundError: No module named 'pystorcli.common'
In [2]: import pystorcli
In [3]: import pystorcli.common
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[3], line 1
----> 1 import pystorcli.common
ModuleNotFoundError: No module named 'pystorcli.common'
In [4]: import pystorcli2.common
In [5]:
Ok, btw the develop branch has a conflict in package names: import from pystorcli2 is working, but not from pystorcli
In [1]: from pystorcli.common import response_data --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[1], line 1 ----> 1 from pystorcli.common import response_data ModuleNotFoundError: No module named 'pystorcli.common' In [2]: import pystorcli In [3]: import pystorcli.common --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[3], line 1 ----> 1 import pystorcli.common ModuleNotFoundError: No module named 'pystorcli.common' In [4]: import pystorcli2.common In [5]:
Try the latest develop branch
Hi @ulmitov try the latest commit on develop. The custom non-json commands should have now a better handling
Both fixed, thanks!
>>> import pystorcli
>>> pystorcli.Controllers()
<pystorcli.controller.Controllers object at 0x7feec62f4f40>
>>> c=pystorcli.Controllers()
>>> c
<pystorcli.controller.Controllers object at 0x7feec635a880>
>>> c.ids
[0]
>>> c=c.get_ctl(0)
>>> c.name
'/c0'
>>> c._run(['show', 'events', 'file=/root/raid_events111.log'])
{'CLI Version': '007.2309.0000.0000 Sep 16, 2022', 'Operating system': 'Linux 5.4.0-99-generic', 'Controller': '0', 'Status': 'Success', 'Description': 'None', 'Events': 'GETEVENTS', '': '===================='}
But this output was missed, not critical though
------------------------------------
Ctrl Status Method Value
------------------------------------
0 Success handleSuboption Events
------------------------------------
But this output was missed, not critical though
------------------------------------ Ctrl Status Method Value ------------------------------------ 0 Success handleSuboption Events ------------------------------------
I tried but was harder than I think without much "hardcoding"
Hi, there is an exception when running some commands, for example:
This command does not have a json format: