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

add ScaleIO storage Sofotware staorage\Volume\DIsk\Pool Info Collection #904

Merged
merged 68 commits into from
Jul 28, 2022

Conversation

luojiagen
Copy link
Contributor

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #904 (38930f2) into master (2756fac) will decrease coverage by 0.15%.
The diff coverage is 61.68%.

@@            Coverage Diff             @@
##           master     #904      +/-   ##
==========================================
- Coverage   71.16%   71.01%   -0.16%     
==========================================
  Files         182      186       +4     
  Lines       21918    22286     +368     
  Branches     3343     3397      +54     
==========================================
+ Hits        15598    15826     +228     
- Misses       5261     5388     +127     
- Partials     1059     1072      +13     
Impacted Files Coverage Δ
delfin/drivers/dell_emc/scaleio/rest_handler.py 56.10% <56.10%> (ø)
delfin/drivers/dell_emc/scaleio/scaleio_stor.py 81.81% <81.81%> (ø)
delfin/drivers/dell_emc/scaleio/alert_consts.py 100.00% <100.00%> (ø)
delfin/drivers/dell_emc/scaleio/consts.py 100.00% <100.00%> (ø)
delfin/drivers/fake_storage/__init__.py 94.67% <0.00%> (+0.25%) ⬆️

alert_model = {
'alert_id': json_alert.get('id'),
'alert_name': alert_type + json_alert.get('name'),
'severity': json_alert.get('severity'),
Copy link
Contributor

@qinwang-murphy qinwang-murphy Jun 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the alarm severity obtained from the device be directly adapted to the alarm servity defined in the code? if not, pls handle the alarm.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added data for determining alarm levels.
image

status = constants.HostStatus.NORMAL
elif 'Disconnected' == status:
status = constants.HostStatus.OFFLINE
initiators_dict = {
Copy link
Contributor

@qinwang-murphy qinwang-murphy Jun 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add the initiator type.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the initiator type and modified the initiator status
image

side_effect=[test_constans.SYSTEM_ALERT_INFO])
storage_alert = ScaleioStorageDriver(**ACCESS_INFO).\
list_alerts(context)
self.assertEqual(storage_alert, test_constans.SYSTEM_ALERT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alarm time is a random value, The constant value in the unit test may be different from the actual value. As a result, the test code reports an error.
image
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the time in the test results,No problem was found with the time conversion in the method
The printed time data is:
image
Converts the millisecond value time:
image

"name": view_name + sdc_id + volume_id,
"description": view_name,
"storage_id": storage_id,
"native_masking_view_id": str(uid) + volume_id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

native_masking_view_id should be a unique value, so the data generated in this way is different.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the random ID with name plus host ID plus volume ID
image

Copy link
Collaborator

@joseph-v joseph-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@wisererik wisererik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wisererik wisererik merged commit 82bd509 into sodafoundation:master Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants