-
Notifications
You must be signed in to change notification settings - Fork 354
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 VMAX driver support for controller & port resources #663
Add VMAX driver support for controller & port resources #663
Conversation
0d394f1
to
a276148
Compare
Codecov Report
@@ Coverage Diff @@
## master #663 +/- ##
==========================================
- Coverage 70.13% 70.07% -0.07%
==========================================
Files 156 156
Lines 14434 14536 +102
Branches 1741 1764 +23
==========================================
+ Hits 10124 10186 +62
- Misses 3756 3778 +22
- Partials 554 572 +18
|
status = constants.ControllerStatus.OFFLINE | ||
|
||
controller = { | ||
'name': 'director_' |
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 think we dont need to append 'director'.. lets pick director_id as name, if there is no name available
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.
Thanks, Done.
'slot_' + | ||
str(director_info.get('director_slot_number')), | ||
'soft_version': None, | ||
'cpu_info': 'number_of_cores_' |
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.
expecting a model here.. having 'number_of_cores_' here does not looks good for me..
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.
Changed to 'Cores-*'
'connection_status': connection_status, | ||
'health_status': constants.PortHealthStatus.NORMAL, | ||
'type': port_type, | ||
'logical_type': 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.
Port logical type is required to distuinquish FA, RDF , etc
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.
Updated
cf3e7d2
to
26d5e87
Compare
directors = self.rest.get_director_list(self.array_id, | ||
self.uni_version) | ||
switcher = { | ||
'A': constants.PortLogicalType.MANAGEMENT, |
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 is the switcher keys (A,B,C,D) . It has to be (FA, RF, SE ) etc right?
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.
In VMAX director name, (Eg. FA-1D
) last letter is for Slice. Slice A is for Infrastructure Manager system emulation. Slice B is for HYPERMAX OS Data Services, Slice C for Backend emulation, Slice D-H remaining emulation.
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.
That means D-H slice can be anything (Front End (FA), RDF( RF).. So I might see a port number RF-1D also.. I still believe the the first 2 letters should be used.. below are my understanding.. though I dont see any document explain this..
[DF,DA,DX]-> backend
[RF.RA,RE]-> RDF replication
[FA, FE, EA, EF, SE]-> Front End
[IM] - Infrastrucre manager
This doc has some info https://psrathore244.wordpress.com/2020/09/18/vmax-3-emulation/
3843d8c
to
877cb2f
Compare
director_emulation, constants.PortLogicalType.OTHER) | ||
if logical_type == constants.PortLogicalType.OTHER: | ||
port_prefix = port_key['directorId'][:2] | ||
if port_prefix in ['FA', 'FE', 'EA', 'EF', 'SE']: |
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 guess it is safe to have one more comparison here to map backend directors [DF,DA,DX]-> backend. becasue D-H directors are universal.
a36d6b7
to
193bb93
Compare
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
193bb93
to
b85588b
Compare
except Exception as err: | ||
msg = "Failed to get controller metrics from VMAX: {}".format(err) | ||
LOG.error(msg) | ||
raise exception.ControllerNotFound(self.array_id) |
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.
Is it correct to wrap all the exception except SSLCertificateFailed to ControllerNotFound?
For example, if user modify the password on the device but not modify the access info in delfin, it would throw ControllerNotFound here.
Same as other list API.
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.
Thanks, updated to raise generated exception.
delfin/drivers/dell_emc/vmax/rest.py
Outdated
resource_type = None | ||
if args: | ||
resource_type = args[2] | ||
elif not args and kwargs: |
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.
When comes to this elif
, it means that the first if
in line 397 not match, so I think there is no need to add the condition not args
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.
Done
} | ||
port_list = [] | ||
for director in directors: | ||
port_keys = self.rest.get_port_list( |
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.
get_port_list
would raise NotImplementedError when version < 84, I think we need to handle this exception in this function seperately, to raise NotImplementedError or just write a log without exception raised.
Now it will raise a PortNotFound
exception.
Same as other API.
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 to output error log
b2c3293
to
dc3ec7f
Compare
dc3ec7f
to
4faf004
Compare
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
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
What this PR does / why we need it:
Add VMAX driver support for controller & port resources
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #662Special notes for your reviewer:
Release note:
LIST CONTROLLERS
LIST PORTS