import sipb_xen_database.models as models
+from sipb_xen_database import connect
-# `name' gets passed in from the xm create call
+connect('postgres://sipb-xen@sipb-vm-1/sipb_xen')
+# `machine_name' should get passed in from the xm create call
-machine = models.Machine.get_by(name=name)
+machine = models.Machine.get_by(name=machine_name)
machine_type = models.Type.get_by(type_id=machine.type_id)
memory = machine.memory