From b3f1d75169c16cae604e6ed6f07e4c6db359f7d1 Mon Sep 17 00:00:00 2001 From: "jesus m. rodriguez" Date: Wed, 18 Nov 2009 23:19:28 -0500 Subject: pool api that reads from certificate --- proxy/code/scripts/test-poolapi.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'proxy/code/scripts/test-poolapi.py') diff --git a/proxy/code/scripts/test-poolapi.py b/proxy/code/scripts/test-poolapi.py index bfb09c6..2344381 100755 --- a/proxy/code/scripts/test-poolapi.py +++ b/proxy/code/scripts/test-poolapi.py @@ -6,8 +6,12 @@ import simplejson response = urllib.urlopen('http://localhost:8080/candlepin/entitlementpool') rsp = response.read() -print("list: %s" % rsp) +#print("list: %s" % rsp) pool = simplejson.loads(rsp) -print(type(pool)) -for (k, v) in pool.iteritems(): - print("pool[%s] = '%s'" % (k, v)) +#print(type(pool)) +for p in pool['entitlementPool']: + prod = p['product'] + print("%s with qty of %s valid from %s to %s" % (prod['name'], p['maxMembers'], p['startDate'], p['endDate'])) + #print(p) +#for (k, v) in pool.iteritems(): +# print("pool[%s] = '%s'" % (k, v)) -- cgit