Пример #1
0
    def get(self, name):
        """Return the named member."""
        LOG.info("Fetch member [name=%s]" % name)

        db_model = db_api.get_member(name)

        return Member.from_dict(db_model.to_dict())
Пример #2
0
    def get(self, name):
        """Return the named member."""
        LOG.info("Fetch member [name=%s]" % name)

        db_model = db_api.get_member(name)

        return Member.from_dict(db_model.to_dict())
Пример #3
0
    def delete(self, name):
        """Delete the named member."""
        LOG.info("Delete member [name=%s]" % name)

        lb_driver = driver.LB_DRIVER()

        with db_api.transaction():
            member = db_api.get_member(name)
            db_api.delete_member(name)

            lb_driver.delete_member(member)

            lb_driver.apply_changes()
Пример #4
0
    def delete(self, name):
        """Delete the named member."""
        LOG.info("Delete member [name=%s]" % name)

        lb_driver = driver.LB_DRIVER()

        with db_api.transaction():
            member = db_api.get_member(name)
            db_api.delete_member(name)

            lb_driver.delete_member(member)

            lb_driver.apply_changes()