Permalink
Browse files

Mirror httplib parameter instead of modifying it on the way through

  • Loading branch information...
dwins committed Jul 24, 2012
1 parent 3baf10b commit 1db1c2587bdf437be8d415cd885fb15a5bc3162f
View
@@ -0,0 +1,15 @@
+
+from geoserver.catalog import Catalog
+
+cat = Catalog("http://localhost:8080/geoserver/rest")
+print cat.get_layers()
+# cat.create_workspace("the best workspace", "http://example.com/")
+#
+# d = cat.create_datastore("test datastore", "the best workspace")
+# cat.save(d)
+#
+# for s in cat.get_workspaces():
+# print s.name
+#
+# for s in cat.get_stores():
+# print s.workspace.name, s.name
View
@@ -58,11 +58,12 @@ class Catalog(object):
- Namespaces, which provide unique identifiers for resources
"""
- def __init__(self, service_url, username="admin", password="geoserver", ssl_certificate_validation=True):
+ def __init__(self, service_url, username="admin", password="geoserver", disable_ssl_certificate_validation=False):
self.service_url = service_url
if self.service_url.endswith("/"):
self.service_url = self.service_url.strip("/")
- self.http = httplib2.Http(disable_ssl_certificate_validation=(not ssl_certificate_validation))
+ self.http = httplib2.Http(
+ disable_ssl_certificate_validation=disable_ssl_certificate_validation)
self.username = username
self.password = password
self.http.add_credentials(self.username, self.password)
Oops, something went wrong.

0 comments on commit 1db1c25

Please sign in to comment.