Change in ovirt-engine-cli[master]: cli: Escape comma in values
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Tue May 13 10:46:13 UTC 2014
Juan Hernandez has submitted this change and it was merged.
Change subject: cli: Escape comma in values
......................................................................
cli: Escape comma in values
When a command line option uses a value with several items we use the
comman character as the delimiter of name value pairs, for example:
# update vm myvm --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0"
But some values may actually contain commas, for example the "cpu_set"
value may contain a list of CPU indexes separated by commas:
# update vm myvm --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0,1"
The CLI can't currently support this, as it assumes that "1" is a name,
instead of taking it as part of the value.
To allow this kind of values this patch introduces the backslash as a
way to escape the delimiter (the comma), so that the command can be
written as follows:
# update vm myvm --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0\,1"
Change-Id: I4bcc5944e3f4236b3495acc02801acae7ec82eb2
Bug-Url: https://bugzilla.redhat.com/1088914
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M src/ovirtcli/command/command.py
1 file changed, 44 insertions(+), 2 deletions(-)
Approvals:
Michael Pasternak: Looks good to me, approved
Juan Hernandez: Verified
--
To view, visit http://gerrit.ovirt.org/27078
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4bcc5944e3f4236b3495acc02801acae7ec82eb2
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8520 at yahoo.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list