-
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
unity fix the issue which when filesystem is None in get_share #696
Conversation
fix the issue which when filesystem is None in get_share
Codecov Report
@@ Coverage Diff @@
## master #696 +/- ##
==========================================
+ Coverage 70.22% 70.41% +0.19%
==========================================
Files 163 163
Lines 15627 15836 +209
Branches 1939 1960 +21
==========================================
+ Hits 10974 11151 +177
- Misses 3992 4010 +18
- Partials 661 675 +14
|
fix some compatibility issue
do some optimize
change fcport connect_status
change fcport localtion
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
@@ -81,44 +83,47 @@ def login(self): | |||
LOG.error("Login error: %s", six.text_type(e)) | |||
raise e | |||
|
|||
def call_with_token(self, url, data, method): | |||
def call_with_token(self, url, data, method, calltimeout): |
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.
data can set default ot None, method default to GET, calltimeout default to consts.DEFAULT_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.
done
self.call(RestHandler.REST_LOGOUT_URL, method='POST') | ||
self.call(RestHandler.REST_LOGOUT_URL, | ||
consts.DEFAULT_TIMEOUT, | ||
data={}, method='POST') |
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.
parameter data can use default value of method call().
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
if res.status_code == 200: | ||
result_json = res.json() | ||
return result_json | ||
|
||
def call(self, url, data=None, method=None): | ||
def call(self, url, calltimeout, data=None, method=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.
Since the parameters of call() is the same as the parameters of call_with_token(), these parameters should be in the same order.
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
'messageId,message,description,' | ||
'descriptionId', | ||
page_number) | ||
result_json = self.get_rest_info(url, consts.ALERT_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.
The second parameter of get_rest_info() is data, not calltimeout.
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
auth_key = None | ||
if self.session: | ||
auth_key = self.session.headers.get(RestHandler.AUTH_KEY, None) | ||
if auth_key: | ||
self.session.headers[RestHandler.AUTH_KEY] \ | ||
= cryptor.decode(auth_key) | ||
res = self.do_call(url, data, method) | ||
res = self.do_call(url, data, method, calltimeout) |
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 default value of parameter calltimeout in do_call() is from driver code of HPE 3par, method do_call() is a common method, I think its default value should be also from common module or from its own.
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
…into unity_0916
remove the disk when it's slot is empty
change disk physicaltype
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
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:
1.fix the issue which when filesystem is None in get
2.fix some compatibility issue
3.change fcport localtion and connect_status
4.change get alarm's timeout
5.change port speed and disk name
6.remove the disk when it's slot is empty
7.change disk physicaltype
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: