summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-14 19:37:33 +0000
committerGerrit Code Review <review@openstack.org>2018-11-14 19:37:33 +0000
commita64d435de8210cda9c5a5fb25885209c33801cd9 (patch)
tree352ac73354679e2401ac158df14973469c0f3482
parent9a92abe1d76b695f9637670877fb59528ca5a113 (diff)
parent5cafd027b51eb989fd9d734d1684e2a25bd69492 (diff)
Merge "tiller: Remove unused params from delete_resources"
-rw-r--r--armada/handlers/tiller.py26
1 files changed, 8 insertions, 18 deletions
diff --git a/armada/handlers/tiller.py b/armada/handlers/tiller.py
index 10df89b..02b7bcd 100644
--- a/armada/handlers/tiller.py
+++ b/armada/handlers/tiller.py
@@ -327,12 +327,7 @@ class Tiller(object):
327 labels = action.get('labels', None) 327 labels = action.get('labels', None)
328 328
329 self.delete_resources( 329 self.delete_resources(
330 release_name, 330 action_type, labels, namespace, timeout=timeout)
331 name,
332 action_type,
333 labels,
334 namespace,
335 timeout=timeout)
336 except Exception: 331 except Exception:
337 LOG.excpetion( 332 LOG.excpetion(
338 "Pre-action failure: could not delete %(res_type)s " 333 "Pre-action failure: could not delete %(res_type)s "
@@ -620,21 +615,18 @@ class Tiller(object):
620 raise ex.ReleaseException(release, status, 'Delete') 615 raise ex.ReleaseException(release, status, 'Delete')
621 616
622 def delete_resources(self, 617 def delete_resources(self,
623 release_name,
624 resource_name,
625 resource_type, 618 resource_type,
626 resource_labels, 619 resource_labels,
627 namespace, 620 namespace,
628 wait=False, 621 wait=False,
629 timeout=const.DEFAULT_TILLER_TIMEOUT): 622 timeout=const.DEFAULT_TILLER_TIMEOUT):
630 ''' 623 '''
631 :param release_name: release name the specified resource is under 624 Delete resources matching provided resource type, labels, and
632 :param resource_name: name of specific resource 625 namespace.
633 :param resource_type: type of resource e.g. job, pod, etc.
634 :param resource_labels: labels by which to identify the resource
635 :param namespace: namespace of the resource
636 626
637 Apply deletion logic based on type of resource 627 :param resource_type: type of resource e.g. job, pod, etc.
628 :param resource_labels: labels for selecting the resources
629 :param namespace: namespace of resources
638 ''' 630 '''
639 timeout = self._check_timeout(wait, timeout) 631 timeout = self._check_timeout(wait, timeout)
640 632
@@ -709,8 +701,8 @@ class Tiller(object):
709 handled = True 701 handled = True
710 702
711 if not handled: 703 if not handled:
712 LOG.error("Unable to execute name: %s type: %s ", resource_name, 704 LOG.error('No resources found with labels=%s type=%s namespace=%s',
713 resource_type) 705 resource_labels, resource_type, namespace)
714 706
715 def rolling_upgrade_pod_deployment(self, 707 def rolling_upgrade_pod_deployment(self,
716 name, 708 name,
@@ -759,8 +751,6 @@ class Tiller(object):
759 751
760 # delete pods 752 # delete pods
761 self.delete_resources( 753 self.delete_resources(
762 release_name,
763 name,
764 'pod', 754 'pod',
765 resource_labels, 755 resource_labels,
766 namespace, 756 namespace,