Skip to content
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

Adding flexibility to check capacity between ui and cli #10625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ocs_ci/ocs/ui/block_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,17 @@ def cross_check_raw_capacity(self, pool_name):
# python function rounds from .5
# ex. cli is doing 157.5 to 157 where as python round function will do 158
if (
(self.custom_round(float(used_capacity_in_CLI)))
== self.custom_round(float(used_capacity_in_UI))
abs(
self.custom_round(float(used_capacity_in_CLI))
- self.custom_round(float(used_capacity_in_UI))
)
<= 1
) and (unit == used_capacity_unit_in_UI):
logger.info("UI values did match as per CLI for the Raw Capacity")
logger.info(
f"used capacity in cli {used_capacity_in_CLI} and used capacity in UI "
f"{used_capacity_in_UI} are not equal with 1 unit flexibility"
)
return True
else:
logger.error(
Expand Down
Loading