From 790b4103bc577d437ed41e86da2e3a66c8de06ea Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Wed, 8 May 2024 15:26:13 +0200 Subject: [PATCH] Rename attribute "name" to "domain_name" for the domains' emitter closes #5134 --- CHANGES/5134.bugfix | 1 + pulpcore/app/models/domain.py | 2 +- pulpcore/app/util.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 CHANGES/5134.bugfix diff --git a/CHANGES/5134.bugfix b/CHANGES/5134.bugfix new file mode 100644 index 0000000000..bd766a7a7a --- /dev/null +++ b/CHANGES/5134.bugfix @@ -0,0 +1 @@ +Renamed ``name`` to ``domain_name`` in the metric's attributes reporting domain's disk usage. diff --git a/pulpcore/app/models/domain.py b/pulpcore/app/models/domain.py index 9059bd822b..7b07e0718c 100644 --- a/pulpcore/app/models/domain.py +++ b/pulpcore/app/models/domain.py @@ -95,5 +95,5 @@ def disk_usage_callback(domain): distinct_artifacts = Artifact.objects.filter(pulp_domain=domain).distinct() total_size = distinct_artifacts.aggregate(size=models.Sum("size", default=0))["size"] options = yield [ # noqa - Observation(total_size, {"pulp_href": get_url(domain), "name": domain.name}) + Observation(total_size, {"pulp_href": get_url(domain), "domain_name": domain.name}) ] diff --git a/pulpcore/app/util.py b/pulpcore/app/util.py index 00729a6f71..fb0db258f4 100644 --- a/pulpcore/app/util.py +++ b/pulpcore/app/util.py @@ -547,7 +547,8 @@ def _disk_usage_callback(self): total_size = artifacts.aggregate(size=Sum("size", default=0))["size"] options = yield [ # noqa metrics.Observation( - total_size, {"pulp_href": get_url(self.domain), "name": self.domain.name} + total_size, + {"pulp_href": get_url(self.domain), "domain_name": self.domain.name}, ) ]