コード例 #1
0
    def get_delete_l7policy_flow(self):
        """Create a flow to delete an L7 policy

        :returns: The flow for deleting an L7 policy
        """
        delete_l7policy_flow = linear_flow.Flow(constants.DELETE_L7POLICY_FLOW)
        delete_l7policy_flow.add(
            lifecycle_tasks.L7PolicyToErrorOnRevertTask(requires=[
                constants.L7POLICY, constants.LISTENERS, constants.LOADBALANCER
            ]))
        delete_l7policy_flow.add(
            database_tasks.MarkL7PolicyPendingDeleteInDB(
                requires=constants.L7POLICY))
        delete_l7policy_flow.add(
            model_tasks.DeleteModelObject(
                rebind={constants.OBJECT: constants.L7POLICY}))
        delete_l7policy_flow.add(
            a10_database_tasks.GetVThunderByLoadBalancer(
                requires=constants.LOADBALANCER,
                provides=a10constants.VTHUNDER))
        delete_l7policy_flow.add(
            l7policy_tasks.DeleteL7Policy(
                requires=[constants.L7POLICY, a10constants.VTHUNDER]))
        delete_l7policy_flow.add(
            database_tasks.DeleteL7PolicyInDB(requires=constants.L7POLICY))
        delete_l7policy_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        delete_l7policy_flow.add(
            vthunder_tasks.WriteMemory(requires=a10constants.VTHUNDER))
        delete_l7policy_flow.add(
            a10_database_tasks.SetThunderUpdatedAt(
                requires=a10constants.VTHUNDER))
        return delete_l7policy_flow
コード例 #2
0
    def get_delete_l7policy_flow(self):
        """Create a flow to delete an L7 policy

        :returns: The flow for deleting an L7 policy
        """
        delete_l7policy_flow = linear_flow.Flow(constants.DELETE_L7POLICY_FLOW)
        delete_l7policy_flow.add(
            lifecycle_tasks.L7PolicyToErrorOnRevertTask(requires=[
                constants.L7POLICY, constants.LISTENERS, constants.LOADBALANCER
            ]))
        delete_l7policy_flow.add(
            database_tasks.MarkL7PolicyPendingDeleteInDB(
                requires=constants.L7POLICY))
        delete_l7policy_flow.add(
            model_tasks.DeleteModelObject(
                rebind={constants.OBJECT: constants.L7POLICY}))
        delete_l7policy_flow.add(
            amphora_driver_tasks.ListenersUpdate(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        delete_l7policy_flow.add(
            database_tasks.DeleteL7PolicyInDB(requires=constants.L7POLICY))
        delete_l7policy_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))

        return delete_l7policy_flow