Getting bodhi to return FAS like JSON login response in "dummy" mode
by Severin Gehwolf
Hi,
I'd like to test bodhi logins for a little bodhi client we wrote. It
works if I point my client to
https://admin.stg.fedoraproject.org/updates/ However, it doesn't work if
I point it to my local bodhi instance, which runs in "dummy" acl_system
mode, since the JSON response returned is somewhat different than the
one returned by an instance connected to packagedb. In particular, the
dummy system returns a "user" object with attribute "user_name", whereas
the FAS connected instance returns a "user" object with attribute
"username".
Would it be possible to configure bodhi in a way so that it returns a
FAS like JSON string? See attachment bodhi_test_json_response.txt for an
example as to how I like it to be and bodhi_test_json_response_old.txt
for an example as to how it looks now.
Thanks!
--Severin
12 years, 8 months
apache/bodhi.wsgi
by Luke Macken
apache/bodhi.wsgi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 01e0c8bf83cf0e46d907fbce6e35d954293e862f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 21 16:32:31 2011 -0400
Have our WSGI app require TurboGears as opposed to CherryPy.
Since TurboGears provides the appropriate egg-info for all of it's
dependencies, this fixes a bug on RHEL6 and gets things working again with
TurboJson >= 1.3
diff --git a/apache/bodhi.wsgi b/apache/bodhi.wsgi
index 61655e0..223b9ef 100644
--- a/apache/bodhi.wsgi
+++ b/apache/bodhi.wsgi
@@ -2,7 +2,7 @@ import sys
sys.stdout = sys.stderr
import __main__
-__main__.__requires__ = __requires__ = 'CherryPy<3.0'
+__main__.__requires__ = __requires__ = 'TurboGears'
import pkg_resources
pkg_resources.require(__requires__)
12 years, 8 months
bodhi/controllers.py
by Luke Macken
bodhi/controllers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 7f0312a80b44736719328acd824caec6cdfa62f4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jul 6 13:11:08 2011 -0400
Get our Broken Upgrade Path errors to propagate to the bodhi client (#621)
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 7a234ff..7ccd4aa 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -881,7 +881,7 @@ class Root(controllers.RootController):
flash_log("Broken update path: %s is older "
"than %s in %s" % (kojiBuild['nvr'],
oldBuild['nvr'], tag))
- raise redirect('/new', **params)
+ raise InvalidUpdateException(params)
# Create all of the PackageBuild objects, obsoleting any older updates
for build in builds:
12 years, 8 months