-
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 driver interfaces for Port, Controller, NAS(FS, QTree, Share, Quota) #597
Conversation
…ota) add driver interfaces for Port, Controller, NAS(FS, QTree, Share, Quota)
Codecov Report
@@ Coverage Diff @@
## master #597 +/- ##
==========================================
- Coverage 72.13% 72.09% -0.05%
==========================================
Files 141 141
Lines 12211 12462 +251
Branches 1446 1480 +34
==========================================
+ Hits 8809 8985 +176
- Misses 2909 2976 +67
- Partials 493 501 +8
|
update something
SSH Tool adds a timeout
delfin/drivers/utils/ssh_client.py
Outdated
@@ -241,15 +242,17 @@ def put(self, conn): | |||
super(SSHPool, self).put(conn) | |||
|
|||
def do_exec(self, command_str): | |||
result = None | |||
result = '' | |||
eventlet.monkey_patch() |
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 add monkey_patch()
here, we do this at the entry of every process.
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.
18/5000
This module needs to set this place before setting the timeout
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.
What would happend if we didn't call eventlet.monkey_patch()
here
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.
This is the place to mark this part of the code as a green thread. You don't have to wait for the execution to complete. If the set time exceeds, you can proceed directly.
disks_map = {} | ||
physical_array = physicals_info.split('\r\n') | ||
for i in range(2, len(physical_array), 2): | ||
physicals_list.append(physical_array[i].split()) | ||
for disk_str in disks_array[1:]: | ||
speed = physical_type = firmware = None |
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 change default value from None
to '-'
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.
No local synchronization, has been modified
Restore to None
SSH Tool delete eventlet.monkey_patch()
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
if controller_map['Health'] == 'true' \ | ||
else constants.ControllerStatus.OFFLINE | ||
controller_model = { | ||
'name': controller_map['e'], |
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.
what is value for key 'e' ? do you have an exmplae of command output and parsed map ?
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 sample is:
Node: cl-01
Owner:
Location:
Model: SIMBOX
Serial Number: 4082368-50-7
Asset Tag: -
Uptime: 3 days 21:20
NVRAM System ID: 4082368507
System ID: 4082368507
Vendor: NetApp
Health: true
Eligibility: true
Differentiated Services: false
All-Flash Optimized: false
Here the first Nod is removed as a split string, so 'e' is used as the key
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.
Mappings have been added for easy reading
Modify the Key mapping name to add meaning
Fixed a type error when comparing size
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
this PR is to add driver interfaces for Port, Controller, NAS(FS, QTree, Share, Quota)
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: