summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a347eb0)
svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=24
--- /dev/null
+import sipb_xen_database.models as models
+
+# `name' gets passed in from the xm create call
+
+machine = models.Machine.get_by(name=name)
+
+
+memory = machine.memory
+maxmem = memory
+name = machine.name
+uuid = machine.uuid
+
+vcpus = machine.cpus
+
+# XXX TODO deal with vifs
+
+disk = []
+
+for d in machine.disks:
+ dspec = 'phy:xenvg/%s,%s,w' % (???, d.guest_device_name)
+ disk.append(dspec)
+
+restart = 'destroy'
+if machine.autorestart:
+ restart = 'restart'
+
+on_poweroff = 'destroy'
+on_reboot = 'restart'
+on_crash = restart