Created
March 28, 2011 19:18
-
-
Save dwins/891080 to your computer and use it in GitHub Desktop.
test geoserver config using gsconfig.py
This file contains 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://host/geoserver/rest', 'user', 'password') | |
def internal_name(s): | |
return s.startswith("__") and s.endswith("__") | |
def check(x): | |
if hasattr(x, 'name'): | |
print "NAME:", x.name, " TYPE:", type(x) | |
for name in dir(x): | |
if not internal_name(name) and getattr(x, name) is None: | |
print x, name, "IS NONE" | |
for ws in cat.get_workspaces(): | |
check(ws) | |
for st in cat.get_stores(): | |
check(st) | |
for rs in cat.get_resources(st): | |
check(rs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment