Ejemplo n.º 1
0
    def get_update_l7rule_flow(self):
        """Create a flow to update an L7 rule

        :returns: The flow for updating an L7 rule
        """
        update_l7rule_flow = linear_flow.Flow(constants.UPDATE_L7RULE_FLOW)
        update_l7rule_flow.add(
            lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
                constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
            ]))
        update_l7rule_flow.add(
            database_tasks.MarkL7RulePendingUpdateInDB(
                requires=constants.L7RULE))
        update_l7rule_flow.add(
            amphora_driver_tasks.ListenersUpdate(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))
        update_l7rule_flow.add(
            database_tasks.UpdateL7RuleInDB(
                requires=[constants.L7RULE, constants.UPDATE_DICT]))
        update_l7rule_flow.add(
            database_tasks.MarkL7RuleActiveInDB(requires=constants.L7RULE))
        update_l7rule_flow.add(
            database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
        update_l7rule_flow.add(
            database_tasks.MarkLBAndListenersActiveInDB(
                requires=[constants.LOADBALANCER, constants.LISTENERS]))

        return update_l7rule_flow
 def get_update_l7rule_flow(self):
     """Create a flow to update an L7 rule
     :returns: The flow for updating an L7 rule
     """
     update_l7rule_flow = linear_flow.Flow(constants.UPDATE_L7RULE_FLOW)
     update_l7rule_flow.add(
         lifecycle_tasks.L7RuleToErrorOnRevertTask(requires=[
             constants.L7RULE, constants.LISTENERS, constants.LOADBALANCER
         ]))
     update_l7rule_flow.add(
         database_tasks.MarkL7RulePendingUpdateInDB(
             requires=constants.L7RULE))
     update_l7rule_flow.add(
         a10_database_tasks.GetVThunderByLoadBalancer(
             requires=constants.LOADBALANCER,
             provides=a10constants.VTHUNDER))
     update_l7rule_flow.add(
         l7rule_tasks.UpdateL7Rule(requires=[
             constants.L7RULE, constants.LISTENERS, a10constants.VTHUNDER,
             constants.UPDATE_DICT
         ]))
     update_l7rule_flow.add(
         database_tasks.UpdateL7RuleInDB(
             requires=[constants.L7RULE, constants.UPDATE_DICT]))
     update_l7rule_flow.add(
         database_tasks.MarkL7RuleActiveInDB(requires=constants.L7RULE))
     update_l7rule_flow.add(
         database_tasks.MarkL7PolicyActiveInDB(requires=constants.L7POLICY))
     update_l7rule_flow.add(
         database_tasks.MarkLBAndListenersActiveInDB(
             requires=[constants.LOADBALANCER, constants.LISTENERS]))
     update_l7rule_flow.add(
         vthunder_tasks.WriteMemory(requires=a10constants.VTHUNDER))
     return update_l7rule_flow
Ejemplo n.º 3
0
    def get_update_l7rule_flow(self):
        """Create a flow to update an L7 rule

        :returns: The flow for updating an L7 rule
        """
        update_l7rule_flow = linear_flow.Flow(constants.UPDATE_L7RULE_FLOW)
        update_l7rule_flow.add(
            model_tasks.UpdateAttributes(
                rebind={constants.OBJECT: constants.L7RULE},
                requires=[constants.UPDATE_DICT]))
        update_l7rule_flow.add(amphora_driver_tasks.ListenersUpdate(
            requires=[constants.LOADBALANCER, constants.LISTENERS]))
        update_l7rule_flow.add(database_tasks.UpdateL7RuleInDB(
            requires=[constants.L7RULE, constants.UPDATE_DICT]))
        update_l7rule_flow.add(database_tasks.MarkLBAndListenersActiveInDB(
            requires=[constants.LOADBALANCER, constants.LISTENERS]))

        return update_l7rule_flow