Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: Fix parsing the device or path list (#428)
If device path contains `:` character then parsing was failing. ``` $ kubectl kadalu storage-add storage-pool-1 \ --device node2:/dev/disk/by-id/usb-SanDisk_Ultra_4C530001061023116262-0:0 ``` Error: ``` The following nodes are available: node1, node2, node3, node4, node5, node6 Traceback (most recent call last): File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/hfi/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/bin/kubectl-kadalu/__main__.py", line 58, in <module> File "/usr/local/bin/kubectl-kadalu/__main__.py", line 47, in main File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 231, in run File "/usr/local/bin/kubectl-kadalu/storage_add.py", line 189, in storage_add_data ValueError: too many values to unpack (expected 2) ``` Added fix to handle the parsing. Credits: Hans Fischer (https://github.com/hans-fischer) Fixes: #427 Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.io>
- Loading branch information