-
Notifications
You must be signed in to change notification settings - Fork 355
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 emc vnx block driver #392
Add emc vnx block driver #392
Conversation
Codecov Report
@@ Coverage Diff @@
## v0.8.0-maint #392 +/- ##
================================================
+ Coverage 66.88% 67.27% +0.38%
================================================
Files 88 99 +11
Lines 6025 7490 +1465
Branches 690 914 +224
================================================
+ Hits 4030 5039 +1009
- Misses 1784 2129 +345
- Partials 211 322 +111
|
Use proper template and put PR description |
if used_map: | ||
used_cap = used_map.get('used_cap') | ||
if used_cap == 0: | ||
status = constants.StorageStatus.ABNORMAL |
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.
Why the status be abnormal if used_cap is 0?
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.
The state of vnx block storage is determined by whether the usage and the remaining amount can be fetched. The usage is the amount allocated or used by all Lun. If the remaining amount or usage is 0, it means that the command line may not be able to obtain the stored related information, so it is set to abnormal
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.
But then the storage status being abnormal is misleading. It means the storage system is down
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.
Cancelled
else: | ||
# If no data is returned, it indicates that there | ||
# may be a problem with the network or the device. | ||
# Default return OFFLINE |
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.
If the data is not available, it doesn't mean storage is OFFLINE. It maybe a temporary network issue from Client. This is misleading
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.
Modified
return self.handler_volume(volumes, pool_ids, storage_id) | ||
|
||
except Exception as e: | ||
err_msg = "Failed to get list volumes from EmcVnxStor: %s" % ( |
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.
err_msg = "Failed to get list volumes from EmcVnxStor: %s" % ( | |
err_msg = "Failed to get list of volumes from EmcVnxStor: %s" % ( |
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.
Modified
@@ -0,0 +1,469 @@ | |||
# Copyright 2020 The SODA Authors. | |||
# Copyright (c) 2016 Huawei Technologies Co., Ltd. |
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.
Why this copyright?
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.
Modified
def get_agent(self): | ||
"""get agent info""" | ||
agent_model = {} | ||
try: |
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.
How about moving the whole try catch block into common function and here simply call that common function. This common function can return result
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.
Implementation method self.navi_ Exe is a public method, but different resource contents return different processing.
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.
Yes, i got that..i was saying that there is lots of code repetition which can be avoided by simply getting the result and processing separately
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.
Modified
re = out.strip() | ||
if re: | ||
result = re | ||
if 'Caller not privileged' in result: |
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.
To avoid multiple if elif, can we not keep a map of string and the exception?
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.
Many exceptions are judged by the returned value content, while some information in the returned content is to change, such as IP, etc., so only a part of the keywords can be intercepted to judge, so map and other methods cannot be used at present.
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 doubt
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.
Modified
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.
LGTM
After redis config change restart service
add emc vnx storage driver to community