-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Feature Automation] RHSTOR-4624 ODF used capacity trend #10520
base: master
Are you sure you want to change the base?
Changes from all commits
f17c92e
f9e79c1
e0682bd
9f39cc2
725faaa
8d0b4bb
76f744e
8a0e55b
c113788
48e8caf
08ecf65
5931a5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3855,7 +3855,7 @@ def get_pod_used_memory_in_mebibytes(podname): | |
podname: (str) name of the pod to get used memory of it | ||
|
||
Returns: | ||
memory_value: (int) the used memory of the pod in Mebibytes (MiB) | ||
int: the used memory of the pod in Mebibytes (MiB) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably a leftover. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got this suggestion from @PrasadDesala. What do you think Prasad? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is written as per google doc string format. Also I had referred previously written functions https://github.com/red-hat-storage/ocs-ci/blob/master/ocs_ci/ocs/ui/page_objects/block_and_file.py#L172 |
||
|
||
""" | ||
logger.info("Retrieve raw resource utilization data using oc adm top command") | ||
|
@@ -3927,3 +3927,24 @@ def get_container_images(pod_obj): | |
raise ValueError(f"Didn't find images for the pod {pod_obj.name} containers") | ||
|
||
return images | ||
|
||
|
||
def get_prometheus_pods( | ||
prometheus_label=constants.PROMETHEUS_POD_LABEL, | ||
namespace=constants.MONITORING_NAMESPACE, | ||
): | ||
""" | ||
Fetches info about prometheus pods in the cluster | ||
|
||
Args: | ||
prometheus_label (str): label associated with prometheus pods | ||
namespace (str): Namespace in which prometheus pods lives | ||
|
||
Returns: | ||
list : of prometheus pod objects | ||
|
||
""" | ||
namespace = namespace | ||
pods_with_label_match = get_pods_having_label(prometheus_label, namespace) | ||
prometheus_pod_objs = [Pod(**prometheus) for prometheus in pods_with_label_match] | ||
return prometheus_pod_objs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have get_ceph_capacity and get_ceph_free_capacity. Please check if they can be re-used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot use these functions due to below concerns.
get_ceph_capacity = 799.984375
get_ceph_free_capacity = 761.4427757263184 --> I want used capacity where I need to do total minus free again in a function and multiply with replica
get_used_and_total_capacity_in_gibibytes = (115.62479782104492, 2399.953125)