remove apparently obsoleted script sipb-xen-lvcreate
[invirt/packages/invirt-database.git] / client / usr / sbin / sipb-xen-lvcreate
diff --git a/client/usr/sbin/sipb-xen-lvcreate b/client/usr/sbin/sipb-xen-lvcreate
deleted file mode 100755 (executable)
index 3d886ca..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-
-from sipb_xen_database import *
-import sys
-import os.path
-from subprocess import call
-import re
-
-connect('postgres://sipb-xen@sipb-xen-dev.mit.edu/sipb_xen')
-
-def check(b):
-    if not b:
-        exit(1)
-
-vg = "xenvg"
-for d in Disk.select():
-    check(re.match('^[A-Za-z0-9]+$', d.guest_device_name))
-    machine = Machine.get(d.machine_id)
-    check(re.match('^[A-Za-z0-9][A-Za-z0-9._-]*$', machine.name))
-    lvname = machine.name + "_" + d.guest_device_name
-    if not os.path.exists("/dev/%s/%s" % (vg, lvname)):
-        # LV doesn't exist
-        print >>sys.stderr, "Creating LV %s..." % (lvname,)
-        rv = call(["lvcreate", "-L", str(d.size) + "M", "-n", lvname, vg])
-        if rv != 0:
-            print >>sys.stderr, "Error creating LV %s\n" %(lvname,)