X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/acc9cd7be881bec82233911da8bd68575d3a5d9f..aeb7de658cdbd0007fcfb485d9dd0d5fe87586e4:/client/etc/xen/sipb-database diff --git a/client/etc/xen/sipb-database b/client/etc/xen/sipb-database index 174fb6b..94ae6cc 100644 --- a/client/etc/xen/sipb-database +++ b/client/etc/xen/sipb-database @@ -1,8 +1,11 @@ +# -*- mode: python; -*- 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-xen-dev.mit.edu/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 @@ -17,7 +20,7 @@ viftype = "" if machine_type.hvm: ioemu = "ioemu:" - viftype = "type=ioemu" + viftype = "type=ioemu, " kernel = 'hvmloader' builder = 'hvm' @@ -35,8 +38,8 @@ apic = machine_type.apic vif = [] for n in machine.nics: - d = '%s, mac=%s, ip=%s, bridge=xenbr0' % (viftype, n.mac_addr, n.ip) - vif.append(disk) + d = '%smac=%s, ip=%s, bridge=xenbr0, script=vif-sipbroute' % (viftype, n.mac_addr, n.ip) + vif.append(d) disk = []