def get_create_l7rule_flow(self):
     """Create a flow to create an L7 rule
     :returns: The flow for creating an L7 rule
     """
     create_l7rule_flow = linear_flow.Flow(constants.CREATE_L7RULE_FLOW)
     create_l7rule_flow.add(
         lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
             constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
         ]))
     create_l7rule_flow.add(
         database_tasks.MarkL7RulePendingCreateInDB(
             requires=constants.L7RULE))
     create_l7rule_flow.add(
         a10_database_tasks.GetVThunderByLoadBalancer(
             requires=constants.LOADBALANCER,
             provides=a10constants.VTHUNDER))
     create_l7rule_flow.add(
         l7rule_tasks.CreateL7Rule(requires=[
             constants.L7RULE, constants.LISTENERS, a10constants.VTHUNDER
         ]))
     create_l7rule_flow.add(
         database_tasks.MarkL7RuleActiveInDB(requires=constants.L7RULE))
     create_l7rule_flow.add(
         database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
     create_l7rule_flow.add(
         database_tasks.MarkLBAndListenersActiveInDB(
             requires=[constants.LOADBALANCER, constants.LISTENERS]))
     create_l7rule_flow.add(
         vthunder_tasks.WriteMemory(requires=a10constants.VTHUNDER))
     create_l7rule_flow.add(
         a10_database_tasks.SetThunderUpdatedAt(
             requires=a10constants.VTHUNDER))
     return create_l7rule_flow
    def get_create_l7rule_flow(self):
        """Create a flow to create an L7 rule

        :returns: The flow for creating an L7 rule
        """
        create_l7rule_flow = linear_flow.Flow(constants.CREATE_L7RULE_FLOW)
        create_l7rule_flow.add(
            lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
                constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
            ]))
        create_l7rule_flow.add(
            database_tasks.MarkL7RulePendingCreateInDB(
                requires=constants.L7RULE))
        create_l7rule_flow.add(
            amphora_driver_tasks.ListenersUpdate(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        create_l7rule_flow.add(
            database_tasks.MarkL7RuleActiveInDB(requires=constants.L7RULE))
        create_l7rule_flow.add(
            database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
        create_l7rule_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))

        return create_l7rule_flow