On 10/31/2012 12:15 PM, Martin Kosek wrote:
On 10/31/2012 10:16 AM, Martin Kosek wrote:
On 10/30/2012 03:08 PM, Tomas Babej wrote:
Hi,

All *-find commands now enable leading/trailing whitespaces in the
search phrase. Behaviour has been implemented directly into
crud.Search class.

https://fedorahosted.org/freeipa/ticket/2981

Tomas

ACK, works fine.

Martin

I take the ACK back, just found out you forgot to re-generate API.txt which
makes the build fail:


# make rpms
...
Argument 'criteria?' in command 'aci_find' in API file not found
Argument count in aci_find of 0 doesn't match expected: 1
Argument criteria? of command aci_find in ipalib, not in API file:
Str('criteria?', noextrawhitespace=False)
Argument 'criteria?' in command 'delegation_find' in API file not found
Argument count in delegation_find of 0 doesn't match expected: 1
Argument criteria? of command delegation_find in ipalib, not in API file:
Str('criteria?', noextrawhitespace=False)
Argument 'criteria?' in command 'selfservice_find' in API file not found
Argument count in selfservice_find of 0 doesn't match expected: 1
Argument criteria? of command selfservice_find in ipalib, not in API file:
Str('criteria?', noextrawhitespace=False)

There are one or more changes to the API.
Either undo the API changes or update API.txt and increment the major version
in VERSION.
make: *** [version-update] Error 1

Martin
Update patch version attached. I regenerated API.txt and incremented
IPA_API_VERSION_MINOR to 45.

Tomas
>From 856f61e76733e0deb38fd84bdd149fa7a20a2adf Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Tue, 30 Oct 2012 09:44:50 -0400
Subject: [PATCH] Relax restriction for leading/trailing whitespaces in *-find
 commands

All *-find commands now enable leading/trailing whitespaces in the
search phrase. Behaviour has been implemented directly into
crud.Search class. IPA_API_VERSION_MINOR incremented to 45.

https://fedorahosted.org/freeipa/ticket/2981
---
 API.txt        | 6 +++---
 VERSION        | 2 +-
 ipalib/crud.py | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/API.txt b/API.txt
index 7bd046c8d504bb7e39059a4f2b6743c7c0b6d8ef..ba2127175119dbed6c30ea424268fecf67ebedb5 100644
--- a/API.txt
+++ b/API.txt
@@ -28,7 +28,7 @@ output: Output('result', <type 'bool'>, None)
 output: Output('value', <type 'unicode'>, None)
 command: aci_find
 args: 1,16,4
-arg: Str('criteria?')
+arg: Str('criteria?', noextrawhitespace=False)
 option: Str('aciname', attribute=False, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False)
 option: Str('permission', attribute=False, autofill=False, cli_name='permission', multivalue=False, query=True, required=False)
 option: Str('group', attribute=False, autofill=False, cli_name='group', multivalue=False, query=True, required=False)
@@ -570,7 +570,7 @@ output: Output('result', <type 'bool'>, None)
 output: Output('value', <type 'unicode'>, None)
 command: delegation_find
 args: 1,9,4
-arg: Str('criteria?')
+arg: Str('criteria?', noextrawhitespace=False)
 option: Str('aciname', attribute=True, autofill=False, cli_name='name', multivalue=False, primary_key=True, query=True, required=False)
 option: Str('permissions', attribute=True, autofill=False, cli_name='permissions', csv=True, multivalue=True, query=True, required=False)
 option: Str('attrs', attribute=True, autofill=False, cli_name='attrs', csv=True, multivalue=True, query=True, required=False)
@@ -2573,7 +2573,7 @@ output: Output('result', <type 'bool'>, None)
 output: Output('value', <type 'unicode'>, None)
 command: selfservice_find
 args: 1,7,4
-arg: Str('criteria?')
+arg: Str('criteria?', noextrawhitespace=False)
 option: Str('aciname', attribute=True, autofill=False, cli_name='name', multivalue=False, pattern='^[-_ a-zA-Z0-9]+$', primary_key=True, query=True, required=False)
 option: Str('permissions', attribute=True, autofill=False, cli_name='permissions', csv=True, multivalue=True, query=True, required=False)
 option: Str('attrs', attribute=True, autofill=False, cli_name='attrs', csv=True, multivalue=True, query=True, required=False)
diff --git a/VERSION b/VERSION
index 6e2696047dd0636ef3343b955e8cb7ae5b4acd0a..dd3bf28c6688524cbf65b1d467c3ee3d3611c318 100644
--- a/VERSION
+++ b/VERSION
@@ -79,4 +79,4 @@ IPA_DATA_VERSION=20100614120000
 #                                                      #
 ########################################################
 IPA_API_VERSION_MAJOR=2
-IPA_API_VERSION_MINOR=44
+IPA_API_VERSION_MINOR=45
diff --git a/ipalib/crud.py b/ipalib/crud.py
index 12edbf58ab0a784fae9ba17573d6dd45f31ebccc..d54b91fd7a927dda363f983d68fe732616663a82 100644
--- a/ipalib/crud.py
+++ b/ipalib/crud.py
@@ -230,7 +230,7 @@ class Search(Method):
     has_output = output.standard_list_of_entries
 
     def get_args(self):
-        yield parameters.Str('criteria?')
+        yield parameters.Str('criteria?', noextrawhitespace=False)
 
     def get_options(self):
         if self.extra_options_first:
-- 
1.7.11.7

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to