Martin Betak has uploaded a new change for review. Change subject: cli: Enable update of VM with integer name ......................................................................
cli: Enable update of VM with integer name Changed the detection of GUID/name in command.py so now if the user quotes the name of vm it will be interpreted as name not an id. For example: update vm '12345' --description testdescription Will update a VM with the name 12345 instead of returning error that VM with id 12345 does not exist. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=977566 Change-Id: I5c54b646f057d2f39b85ab0ca6c448308c06ecce Signed-off-by: Martin Betak <[email protected]> --- M AUTHORS M src/ovirtcli/command/command.py 2 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/95/18595/1 diff --git a/AUTHORS b/AUTHORS index 8037548..7da8255 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,5 @@ The following people have contributed to this project. * Michael Pasternak <[email protected]> - * Geert Jansen <[email protected]> \ No newline at end of file + * Geert Jansen <[email protected]> + * Martin Betak <[email protected]> diff --git a/src/ovirtcli/command/command.py b/src/ovirtcli/command/command.py index 09868bb..dd7d0ba 100644 --- a/src/ovirtcli/command/command.py +++ b/src/ovirtcli/command/command.py @@ -359,18 +359,9 @@ match = re.search(r'[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}', candidate) if match: return self._toUUID(candidate) - match = re.search(r'[-+]?\d+', candidate) - if match: - return self._toLong(candidate) elif type(candidate) == int or type(candidate) == long: return candidate return None - - def _toLong(self, string): - try: - return long(string) - except: - return None def _toUUID(self, string): try: -- To view, visit http://gerrit.ovirt.org/18595 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c54b646f057d2f39b85ab0ca6c448308c06ecce Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-cli Gerrit-Branch: master Gerrit-Owner: Martin Betak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
