Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def deleteby1uniquekey(session, uniq_key, is_deleted=False):
    guest = session.query(Machine).filter(
        Machine.uniq_key == uniq_key).one()

    return logical_delete(session, guest)
        


src/k/a/karesansui-HEAD/bin/delete_guest.py   karesansui(Download)
    from karesansui.lib.virt.virt import KaresansuiVirtConnection
    from karesansui.lib.utils import load_locale
    from karesansui.db.access.machine import findby1uniquekey, deleteby1uniquekey
    from karesansui.db.access.machine2jobgroup import deleteby1machine
    from karesansui.lib.const import XEN_VIRT_CONFIG_DIR, KVM_VIRT_CONFIG_DIR, \
                # rollback - machine
                self.up_progress(5)
                deleteby1uniquekey(self.kss_session, u"%s" % uuid)
                self.up_progress(5)
            except KssCommandException, e: