def get_delete_l7rule_flow(self):
     """Create a flow to delete an L7 rule
     :returns: The flow for deleting an L7 rule
     """
     delete_l7rule_flow = linear_flow.Flow(constants.DELETE_L7RULE_FLOW)
     delete_l7rule_flow.add(
         lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
             constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
         ]))
     delete_l7rule_flow.add(
         database_tasks.MarkL7RulePendingDeleteInDB(
             requires=constants.L7RULE))
     delete_l7rule_flow.add(
         model_tasks.DeleteModelObject(
             rebind={constants.OBJECT: constants.L7RULE}))
     delete_l7rule_flow.add(
         a10_database_tasks.GetVThunderByLoadBalancer(
             requires=constants.LOADBALANCER,
             provides=a10constants.VTHUNDER))
     delete_l7rule_flow.add(
         l7rule_tasks.DeleteL7Rule(requires=[
             constants.L7RULE, constants.LISTENERS, a10constants.VTHUNDER
         ]))
     delete_l7rule_flow.add(
         database_tasks.DeleteL7RuleInDB(requires=constants.L7RULE))
     delete_l7rule_flow.add(
         database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
     delete_l7rule_flow.add(
         database_tasks.MarkLBAndListenersActiveInDB(
             requires=[constants.LOADBALANCER, constants.LISTENERS]))
     delete_l7rule_flow.add(
         vthunder_tasks.WriteMemory(requires=a10constants.VTHUNDER))
     return delete_l7rule_flow
Ejemplo n.º 2
0
    def get_delete_l7rule_flow(self):
        """Create a flow to delete an L7 rule

        :returns: The flow for deleting an L7 rule
        """
        delete_l7rule_flow = linear_flow.Flow(constants.DELETE_L7RULE_FLOW)
        delete_l7rule_flow.add(
            lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
                constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
            ]))
        delete_l7rule_flow.add(
            database_tasks.MarkL7RulePendingDeleteInDB(
                requires=constants.L7RULE))
        delete_l7rule_flow.add(
            model_tasks.DeleteModelObject(
                rebind={constants.OBJECT: constants.L7RULE}))
        delete_l7rule_flow.add(
            amphora_driver_tasks.ListenersUpdate(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        delete_l7rule_flow.add(
            database_tasks.DeleteL7RuleInDB(requires=constants.L7RULE))
        delete_l7rule_flow.add(
            database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
        delete_l7rule_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))

        return delete_l7rule_flow
Ejemplo n.º 3
0
    def get_delete_l7rule_flow(self, topology):
        """Create a flow to delete an L7 rule
        :returns: The flow for deleting an L7 rule
        """
        delete_l7rule_flow = linear_flow.Flow(constants.DELETE_L7RULE_FLOW)
        delete_l7rule_flow.add(
            lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
                constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
            ]))
        delete_l7rule_flow.add(
            vthunder_tasks.VthunderInstanceBusy(
                requires=a10constants.COMPUTE_BUSY))

        delete_l7rule_flow.add(
            database_tasks.MarkL7RulePendingDeleteInDB(
                requires=constants.L7RULE))
        delete_l7rule_flow.add(
            model_tasks.DeleteModelObject(
                rebind={constants.OBJECT: constants.L7RULE}))
        delete_l7rule_flow.add(
            a10_database_tasks.GetVThunderByLoadBalancer(
                requires=constants.LOADBALANCER,
                provides=a10constants.VTHUNDER))
        if topology == constants.TOPOLOGY_ACTIVE_STANDBY:
            delete_l7rule_flow.add(
                vthunder_tasks.GetMasterVThunder(
                    name=a10constants.GET_MASTER_VTHUNDER,
                    requires=a10constants.VTHUNDER,
                    provides=a10constants.VTHUNDER))
        delete_l7rule_flow.add(
            l7rule_tasks.DeleteL7Rule(requires=[
                constants.L7RULE, constants.LISTENERS, a10constants.VTHUNDER
            ]))
        delete_l7rule_flow.add(
            database_tasks.DeleteL7RuleInDB(requires=constants.L7RULE))
        delete_l7rule_flow.add(
            database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
        delete_l7rule_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        delete_l7rule_flow.add(
            vthunder_tasks.WriteMemory(requires=a10constants.VTHUNDER))
        delete_l7rule_flow.add(
            a10_database_tasks.SetThunderUpdatedAt(
                requires=a10constants.VTHUNDER))
        return delete_l7rule_flow