3 import vserver, sys, os, re, getopt
9 %s [OPTION]... [COMMAND] [ARGUMENT]...
16 Set max disk limit for a slice
19 Get current disk limit for slice
26 vs = vserver.VServer(slicename)
27 limit = vs.get_disklimit()
28 return "%s %d limit" % (slicename,limit)
32 vs = vserver.VServer(slicename)
33 oldlimit = vs.get_disklimit()
34 newlimit = int(argv[1])
35 if newlimit >= oldlimit:
36 vs.set_disklimit(newlimit)
40 functions = {"get":get, "set":set}
43 func = functions.get(argv[0],usage)
44 result = func(argv[1:])
53 if __name__ == '__main__':