summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjesus m. rodriguez <jesusr@redhat.com>2009-11-18 23:19:28 -0500
committerjesus m. rodriguez <jesusr@redhat.com>2009-11-18 23:19:28 -0500
commitb3f1d75169c16cae604e6ed6f07e4c6db359f7d1 (patch)
treee1f991b59bc6e5580ffc964eabf7277172709819
parentd1db0051e3440f5ef4a7c9751eb8008f0ac7045a (diff)
downloadcandlepin-b3f1d75169c16cae604e6ed6f07e4c6db359f7d1.tar.gz
candlepin-b3f1d75169c16cae604e6ed6f07e4c6db359f7d1.tar.xz
candlepin-b3f1d75169c16cae604e6ed6f07e4c6db359f7d1.zip
pool api that reads from certificate
-rwxr-xr-xproxy/code/scripts/test-poolapi.py12
1 files changed, 8 insertions, 4 deletions
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))