1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env python
from optparse import OptionParser
from grackle.server.model import create_schema
parser = OptionParser(usage="usage: %prog [options] <hostname> <keyspace>")
parser.add_option(
"--clobber", action="store_true", default=False, dest="clobber",
help="clear the keyspace before initialising it")
options, args = parser.parse_args()
if len(args) != 2:
parser.error("hostname and keyspace required")
create_schema(args[0], args[1], clobber=options.clobber)
|