Example #1
0
def delete_host_deployments(package_name, app_id, environment):
    """ """

    host_deps = (Session.query(HostDeployment).join(Host).join(Package).filter(
        Package.pkg_name == package_name).filter(Host.app_id == app_id).filter(
            Host.environment == environment).all())

    for host_dep in host_deps:
        # Commit to DB immediately
        Session.delete(host_dep)
        Session.commit()
Example #2
0
def delete_host_deployment(hostname, package_name):
    """ """

    host_deps = (Session.query(HostDeployment).join(Host).join(Package).filter(
        Package.pkg_name == package_name).filter(
            Host.hostname == hostname).all())

    # Allow this to silently do nothing if there are no matching rows
    for host_dep in host_deps:
        # Commit to DB immediately
        Session.delete(host_dep)
        Session.commit()
Example #3
0
def delete_host_deployment(hostname, package_name):
    """ """

    host_deps = (Session.query(HostDeployment)
                 .join(Host)
                 .join(Package)
                 .filter(Package.pkg_name == package_name)
                 .filter(Host.hostname == hostname)
                 .all())

    # Allow this to silently do nothing if there are no matching rows
    for host_dep in host_deps:
        # Commit to DB immediately
        Session.delete(host_dep)
        Session.commit()
Example #4
0
def delete_host_deployments(package_name, app_id, environment):
    """ """

    host_deps = (Session.query(HostDeployment)
                 .join(Host)
                 .join(Package)
                 .filter(Package.pkg_name == package_name)
                 .filter(Host.app_id == app_id)
                 .filter(Host.environment == environment)
                 .all())

    for host_dep in host_deps:
        # Commit to DB immediately
        Session.delete(host_dep)
        Session.commit()