Skip to content

Commit

Permalink
Rename attribute "name" to "domain_name" for the domains' emitter
Browse files Browse the repository at this point in the history
closes pulp#5134
  • Loading branch information
lubosmj authored and dkliban committed May 9, 2024
1 parent e633283 commit 790b410
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/5134.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Renamed ``name`` to ``domain_name`` in the metric's attributes reporting domain's disk usage.
2 changes: 1 addition & 1 deletion pulpcore/app/models/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
]
3 changes: 2 additions & 1 deletion pulpcore/app/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
)
]

Expand Down

0 comments on commit 790b410

Please sign in to comment.