예제 #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()
예제 #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()
예제 #3
0
파일: deploy.py 프로젝트: ifwe/tagopsdb
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()
예제 #4
0
파일: deploy.py 프로젝트: ifwe/tagopsdb
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()