Created
April 28, 2011 13:29
-
-
Save dwins/946340 to your computer and use it in GitHub Desktop.
basic gsconfig load test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from geoserver.catalog import Catalog | |
cat = Catalog("http://localhost:8001/geoserver/rest", username="admin", password="geoserver") | |
topp = cat.get_workspace("topp") | |
files = dict((x, "roads." + x) for x in ["shp", "prj", "dbf", "shx"]) | |
for i in xrange(0, 200): | |
cat.create_featurestore("roads_" + str(i), files, workspace=topp) | |
for i in xrange(0, 200): | |
res = cat.get_resource("roads_" + str(i)) | |
assert res is not None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment