vmware-archive / vcd-cli

Command Line Interface for VMware vCloud Director
https://vmware.github.io/vcd-cli
Other
165 stars 106 forks source link

vcd disk update Argument type missmatch #497

Closed not4mad closed 5 years ago

not4mad commented 5 years ago

Hello,

if I try to update independent disk with size parameter i got error like:

`$ vcd disk update -s 15g my-disk Usage: vcd disk update [OPTIONS] Try "vcd disk update -h" for help.

Error: Argument must be bytes or unicode, got 'int'`

In error log i see:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/vcd_cli/disk.py", line 232, in update new_iops=iops) File "/usr/local/lib/python3.6/dist-packages/pyvcloud/vcd/vdc.py", line 633, in update_disk disk_params.set('size', new_size) File "src/lxml/etree.pyx", line 815, in lxml.etree._Element.set File "src/lxml/apihelpers.pxi", line 593, in lxml.etree._setAttributeValue File "src/lxml/apihelpers.pxi", line 1525, in lxml.etree._utf8 TypeError: Argument must be bytes or unicode, got 'int'

vCD version 9.1 with api version 30.0.

not4mad commented 5 years ago

I have found cause of this problem, solution send to pyvcloud issue 618

not4mad commented 5 years ago

Pull request with fix merged to main branch: 620