-
Notifications
You must be signed in to change notification settings - Fork 29
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
[#323] Unity: add advanced dedup support #324
Conversation
Codecov Report
@@ Coverage Diff @@
## master #324 +/- ##
==========================================
+ Coverage 91.70% 91.77% +0.06%
==========================================
Files 99 100 +1
Lines 13929 13998 +69
Branches 1687 1697 +10
==========================================
+ Hits 12774 12846 +72
+ Misses 741 740 -1
+ Partials 414 412 -2
Continue to review full report at Codecov.
|
@@ -76,7 +76,8 @@ def make_compression_body(cli=None, | |||
fastVPParameters=UnityClient.make_body( | |||
tieringPolicy=kwargs.get('tiering_policy')), | |||
ioLimitParameters=UnityClient.make_body( | |||
ioLimitPolicy=kwargs.get('io_limit_policy'))) | |||
ioLimitPolicy=kwargs.get('io_limit_policy')), | |||
isAdvancedDedupEnabled=kwargs.get('is_advanced_dedup_enabled')) |
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.
indent
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.
It is not an indent issue, the level of isAdvancedDedupEnabled is same as ioLimitParameters.
storops/unity/resource/pool.py
Outdated
def is_advanced_dedup_enabled(self): | ||
unity_support_matrix = ['450F', '550F', '650F', '380', '480', '680', | ||
'880', '380F', '480F', '680F', '880F'] | ||
return self.verify_advanced_dedup_by_unity_model(unity_support_matrix) |
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 to check whether it is AFP for 380/480/680/880?
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.
Check the is_all_flash attribute in self.verify_advanced_dedup_by_unity_model.
storops/unity/resource/pool.py
Outdated
@@ -203,6 +206,51 @@ def disk_groups(self): | |||
dgs[pd.disk_group.get_id()] = [pd] | |||
return dgs | |||
|
|||
@version('<5.1') | |||
def is_compression_enabled(self): |
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.
Change is_compression_enabled
to is_compression_supported
? Because cannot enable/disable compression on pool.
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.
storops/unity/resource/pool.py
Outdated
'verifyDataReduction') | ||
resp.raise_if_err() | ||
if resp.body.get('content') and resp.body.get('content').get( | ||
'verifyPass') is True: |
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 True
is redundant.
You could also return resp.body.get('content') and resp.body.get('content').get('verifyPass')
.
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.
storops/unity/resource/pool.py
Outdated
|
||
@version('=4.5') # noqa | ||
def is_advanced_dedup_enabled(self): | ||
unity_support_matrix = ['450F', '550F', '650F'] |
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.
Can we add a decorator for unity_models
like version
?
So, we can share the code in other places where we need to check the unity model.
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, added a UnityModel class to provide model compare operations.
storops/unity/resource/pool.py
Outdated
return self.is_all_flash | ||
|
||
@version('>=5.1') # noqa | ||
def is_compression_enabled(self): |
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.
s/enabled/supported
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.
storops/unity/resource/pool.py
Outdated
return unity_model in unity_support_matrix and self.is_all_flash | ||
|
||
@version('<4.5') | ||
def is_advanced_dedup_enabled(self): |
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.
s/enabled/supported
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.
storops/unity/resource/pool.py
Outdated
return False | ||
|
||
@version('=4.5') # noqa | ||
def is_advanced_dedup_enabled(self): |
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.
s/enabled/supported
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.
storops/unity/resource/pool.py
Outdated
return self.verify_advanced_dedup_by_unity_model(unity_support_matrix) | ||
|
||
@version('=5.0') # noqa | ||
def is_advanced_dedup_enabled(self): |
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.
s/enabled/supported
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.
storops/unity/resource/pool.py
Outdated
return self.verify_advanced_dedup_by_unity_model(unity_support_matrix) | ||
|
||
@version('>=5.1') # noqa | ||
def is_advanced_dedup_enabled(self): |
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.
s/enabled/supported
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.
storops/unity/resource/pool.py
Outdated
'verifyDeduplication') | ||
resp.raise_if_err() | ||
if resp.body.get('content') and resp.body.get('content').get( | ||
'verifyPass') is True: |
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 True
is redundant.
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.
storops/unity/resource/pool.py
Outdated
from storops.unity.resource.system import UnitySystem | ||
unity_system = UnitySystem(cli=self._cli) | ||
unity_model = unity_system.model.split()[-1] | ||
return unity_model in unity_support_matrix and self.is_all_flash |
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_all_flash
is available for OE < 5.0, 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.
Yes.
ba4c8dd
to
c32db14
Compare
storops/unity/resource/lun.py
Outdated
self._cli, self, dest, | ||
is_data_reduction_applied=is_compressed, | ||
is_dest_thin=is_thin, | ||
is_advanced_dedup_enabled=is_advanced_dedup_enabled) |
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_advanced_dedup_enabled
? It should be is_advanced_dedup_applied
? Did pep8 pass?
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.
Please skip this commit, it is not fully tested.
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.
Fixed.
512c069
to
a00ebff
Compare
Add Advanced Deduplication support for Unity LUNs.
0448f92
to
9d23f7d
Compare
Add Advanced Deduplication support for Unity LUNs.