vcd-cli icon indicating copy to clipboard operation
vcd-cli copied to clipboard

vcd right info not working with comma in right name

Open MarRio81 opened this issue 7 years ago • 3 comments

Hi,

The error is returned on all commands where you specify rights with comma in its name.

vcd right info 'vApp: Migrate, Force Undeploy, Relocate, Consolidate'
Usage: vcd right info [OPTIONS] <right-name>

Error: Status code: 400/BAD_REQUEST, Bad request: Expression  Force Undeploy is not a comparison expression. (request id: 4d76e99d-dece-4eba-a340-cef1b2505d13)
vcd version
vcd-cli, VMware vCloud Director Command Line Interface, 20.1.2

MarRio81 avatar Mar 09 '18 12:03 MarRio81

This is embarrassing. We will fix this soon. In the meantime please encode the right using percent encoding e.g. https://www.url-encode-decode.com/

(vcd-cli) C:\code\vcd-cli>vcd right add "vApp%3A+VM+Migrate%2C+Force+Undeploy%2C+Relocate%2C+Consolidate" Rights added to the Org 'testorg1'

(vcd-cli) C:\code\vcd-cli>vcd right list

Catalog: Create / Delete a Catalog . . vApp: View VM metrics VAPP_VM_METADATA_TO_VCENTER vApp: VM Boot Options vApp: VM Migrate, Force Undeploy, Relocate, Consolidate

rocknes avatar Mar 12 '18 23:03 rocknes

Btw please note that removing the right (with comma in it) from the org might not work even after percent encoding.

rocknes avatar Mar 12 '18 23:03 rocknes

Fix is being pushed to branch via https://github.com/vmware/pyvcloud/pull/282 and https://github.com/vmware/vcd-cli/pull/239

rocknes avatar Sep 06 '18 00:09 rocknes