Exemplo n.º 1
0
def create_image(cp, xml, itype, name, version, snap, desc='', enable=True):  
    i = Image()
    i.cephpool = cp
    i.name = name
    i.version = version
    i.snap = snap
    i.desc = desc
    i.xml = xml
    i.type = itype
    i.enable = enable
    i.save()
    return i