Esempio n. 1
0
 def get_delete_member_vrid_internal_subflow(self):
     delete_member_vrid_subflow = linear_flow.Flow(
         a10constants.DELETE_MEMBER_VRID_INTERNAL_SUBFLOW)
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetChildProjectsOfParentPartition(
             rebind={a10constants.LB_RESOURCE: constants.POOL},
             provides=a10constants.PARTITION_PROJECT_LIST))
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetSubnetForDeletionInPool(
             requires=[
                 a10constants.MEMBER_LIST,
                 a10constants.PARTITION_PROJECT_LIST
             ],
             provides=a10constants.SUBNET_LIST))
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetVRIDForLoadbalancerResource(
             requires=a10constants.PARTITION_PROJECT_LIST,
             provides=a10constants.VRID_LIST))
     delete_member_vrid_subflow.add(
         a10_network_tasks.DeleteMultipleVRIDPort(
             requires=[
                 a10constants.VTHUNDER, a10constants.VRID_LIST,
                 a10constants.SUBNET_LIST
             ],
             provides=a10constants.VRID_LIST))
     delete_member_vrid_subflow.add(
         a10_database_tasks.DeleteMultiVRIDEntry(
             requires=a10constants.VRID_LIST))
     return delete_member_vrid_subflow
Esempio n. 2
0
 def test_delete_vrid_entry_with_multi_vrids(self):
     VRID_1 = data_models.VRID(id=2)
     mock_vrid_entry = task.DeleteMultiVRIDEntry()
     mock_vrid_entry.vrid_repo = mock.Mock()
     mock_vrid_entry.execute([VRID, VRID_1])
     mock_vrid_entry.vrid_repo.delete_batch.assert_called_once_with(
         mock.ANY, ids=[VRID.id, VRID_1.id])
Esempio n. 3
0
 def get_delete_member_vrid_internal_subflow(self, pool, pool_members):
     delete_member_vrid_subflow = linear_flow.Flow(
         a10constants.DELETE_MEMBER_VRID_INTERNAL_SUBFLOW)
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetChildProjectsOfParentPartition(
             name='get_child_project_of_parent_partition' + pool,
             rebind={a10constants.LB_RESOURCE: pool},
             provides=a10constants.PARTITION_PROJECT_LIST
         ))
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetSubnetForDeletionInPool(
             name='get_subnet_for_deletion_in_pool' + pool,
             requires=[a10constants.MEMBER_LIST, a10constants.PARTITION_PROJECT_LIST],
             rebind={a10constants.MEMBER_LIST: pool_members},
             provides=a10constants.SUBNET_LIST))
     delete_member_vrid_subflow.add(
         a10_database_tasks.GetVRIDForLoadbalancerResource(
             name='get_vrid_for_loadbalancer_resource' + pool,
             requires=a10constants.PARTITION_PROJECT_LIST,
             provides=a10constants.VRID_LIST))
     delete_member_vrid_subflow.add(
         a10_network_tasks.DeleteMultipleVRIDPort(
             name='delete_multiple_vrid_port' + pool,
             requires=[
                 a10constants.VTHUNDER,
                 a10constants.VRID_LIST,
                 a10constants.SUBNET_LIST],
             rebind={a10constants.LB_RESOURCE: pool},
             provides=a10constants.VRID_LIST))
     delete_member_vrid_subflow.add(a10_database_tasks.DeleteMultiVRIDEntry(
         name='delete_multi_vrid_entry' + pool,
         requires=a10constants.VRID_LIST))
     return delete_member_vrid_subflow