aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/onaptests/steps/cloud/check_status.py12
-rw-r--r--src/onaptests/templates/status/index.html.j210
2 files changed, 12 insertions, 10 deletions
diff --git a/src/onaptests/steps/cloud/check_status.py b/src/onaptests/steps/cloud/check_status.py
index 6962728..cbefa18 100644
--- a/src/onaptests/steps/cloud/check_status.py
+++ b/src/onaptests/steps/cloud/check_status.py
@@ -232,6 +232,8 @@ class CheckK8sResourcesUsingPodsStep(CheckK8sResourcesStep):
class CheckK8sJobsStep(CheckK8sResourcesUsingPodsStep):
+ __logger = logging.getLogger(__name__)
+
def __init__(self, namespace: str):
"""Init CheckK8sJobsStep."""
super().__init__(namespace=namespace, resource_type="job", pods_source=None)
@@ -265,11 +267,14 @@ class CheckK8sJobsStep(CheckK8sResourcesUsingPodsStep):
# timemout job
if not k8s.status.completion_time:
- if any(waiver_elt not in job.name for waiver_elt in settings.WAIVER_LIST):
+ if not any(waiver_elt in job.name for waiver_elt in settings.WAIVER_LIST):
self._add_failing_resource(job)
# completed job
- if any(waiver_elt not in job.name for waiver_elt in settings.WAIVER_LIST):
+ if not any(waiver_elt in job.name for waiver_elt in settings.WAIVER_LIST):
self.all_resources.append(job)
+ else:
+ self.__logger.warn(
+ "Waiver pattern found in job, exclude %s", job.name)
jobs_pods += job_pods
@@ -675,9 +680,6 @@ class CheckK8sDaemonSetsStep(CheckK8sResourcesUsingPodsStep):
for k8s in self.k8s_resources:
daemonset = DaemonSet(k8s=k8s)
- if settings.IGNORE_EMPTY_REPLICAS and k8s.spec.replicas == 0:
- continue
-
if k8s.spec.selector and k8s.spec.selector.match_labels:
(daemonset.pods,
daemonset.failed_pods) = self._find_child_pods(
diff --git a/src/onaptests/templates/status/index.html.j2 b/src/onaptests/templates/status/index.html.j2
index d85c5bb..6c200d7 100644
--- a/src/onaptests/templates/status/index.html.j2
+++ b/src/onaptests/templates/status/index.html.j2
@@ -214,11 +214,11 @@
{% for ds in ns.daemonsets %}
<tr>
<td><a href="./daemoset-{{ ds.name }}.html" title="{{ ds.name }}">{{ ds.name }}</a></td>
- <td>{{ sts.k8s.status.desired_number_scheduled }}</td>
- <td>{{ number_ok(sts.k8s.status.current_number_scheduled, '0', total=sts.k8s.spec.desired_number_scheduled) }}</td>
- <td>{{ number_ok(sts.k8s.status.number_ready, '0', total=sts.k8s.spec.desired_number_scheduled) }}</td>
- <td>{{ number_ok(sts.k8s.status.updated_number_scheduled, '0', total=sts.k8s.spec.desired_number_scheduled) }}</td>
- <td>{{ number_ok(sts.k8s.status.number_available, '0', total=sts.k8s.spec.desired_number_scheduled) }}</td>
+ <td>{{ ds.k8s.status.desired_number_scheduled }}</td>
+ <td>{{ number_ok(ds.k8s.status.current_number_scheduled, '0', total=ds.k8s.spec.desired_number_scheduled) }}</td>
+ <td>{{ number_ok(ds.k8s.status.number_ready, '0', total=ds.k8s.spec.desired_number_scheduled) }}</td>
+ <td>{{ number_ok(ds.k8s.status.updated_number_scheduled, '0', total=ds.k8s.spec.desired_number_scheduled) }}</td>
+ <td>{{ number_ok(ds.k8s.status.number_available, '0', total=ds.k8s.spec.desired_number_scheduled) }}</td>
</tr>
{% endfor %}
</tbody>