Merge "Delete amphora regardless of status"

This commit is contained in:
Zuul 2018-08-08 22:35:23 +00:00 committed by Gerrit Code Review
commit 3cc470755f
1 changed files with 2 additions and 5 deletions

View File

@ -17,7 +17,6 @@ import time
from oslo_config import cfg
from oslo_log import log as logging
import six
from stevedore import driver as stevedore_driver
from taskflow import task
from taskflow.types import failure
@ -151,10 +150,8 @@ class DeleteAmphoraeOnLoadBalancer(BaseComputeTask):
"""
def execute(self, loadbalancer):
for amp in six.moves.filter(
lambda amp: amp.status == constants.AMPHORA_ALLOCATED,
loadbalancer.amphorae):
for amp in loadbalancer.amphorae:
# The compute driver will already handle NotFound
try:
self.compute.delete(amp.compute_id)
except Exception: