Skip to content

Commit fe3c88a

Browse files
authored
Merge pull request #79 from tucked/sdk
Add isi_sdk_8_2_2
2 parents 8b6c2ea + 8e66706 commit fe3c88a

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'isi-sdk-8-1-1 ~= 0.2.7',
3434
'isi-sdk-8-2-0 ~= 0.2.7',
3535
'isi-sdk-8-2-1 ~= 0.2.7',
36+
'isi-sdk-8-2-2 ~= 0.2.7',
3637
'requests >= 2.20.0',
3738
'setuptools >= 41.0.0',
3839
],

src/isilon_hadoop_tools/onefs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
'8.1.3.0': 0x80103500000000D,
7171
'8.2.0.0': 0x80200500000000B,
7272
'8.2.1.0': 0x802015000000004,
73-
'8.2.2.0': 0x802025000000000,
73+
'8.2.2.0': 0x802025000000007,
74+
'8.2.3.0': 0x802035000000000,
7475
}
7576

7677

@@ -523,13 +524,16 @@ def sdk_for_revision(revision, strict=False):
523524
if ONEFS_RELEASES['8.2.1.0'] <= revision < ONEFS_RELEASES['8.2.2.0']:
524525
import isi_sdk_8_2_1
525526
return isi_sdk_8_2_1
527+
if ONEFS_RELEASES['8.2.2.0'] <= revision < ONEFS_RELEASES['8.2.3.0']:
528+
import isi_sdk_8_2_2
529+
return isi_sdk_8_2_2
526530
# At this point, either the cluster is too old or too new;
527531
# however, new clusters still support old SDKs,
528532
# so, unless the caller asks to fail here, we'll fall back to the newest supported SDK.
529533
if strict:
530534
raise UnsupportedVersion('There is no SDK for OneFS revision {0}!'.format(hex(revision)))
531-
import isi_sdk_8_2_1
532-
return isi_sdk_8_2_1 # The latest SDK available.
535+
import isi_sdk_8_2_2
536+
return isi_sdk_8_2_2 # The latest SDK available.
533537

534538

535539
def accesses_onefs(func):

tests/test_onefs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import isi_sdk_8_1_1
2323
import isi_sdk_8_2_0
2424
import isi_sdk_8_2_1
25+
import isi_sdk_8_2_2
2526
import pytest
2627

2728
from isilon_hadoop_tools import IsilonHadoopToolError, onefs
@@ -68,7 +69,7 @@ def test_api_error_str(api_error):
6869
@pytest.mark.parametrize(
6970
'revision, expected_sdk',
7071
[
71-
(0, isi_sdk_8_2_1),
72+
(0, isi_sdk_8_2_2),
7273
(onefs.ONEFS_RELEASES['7.2.0.0'], isi_sdk_7_2),
7374
(onefs.ONEFS_RELEASES['8.0.0.0'], isi_sdk_8_0),
7475
(onefs.ONEFS_RELEASES['8.0.0.4'], isi_sdk_8_0),
@@ -79,8 +80,9 @@ def test_api_error_str(api_error):
7980
(onefs.ONEFS_RELEASES['8.1.2.0'], isi_sdk_8_1_1),
8081
(onefs.ONEFS_RELEASES['8.2.0.0'], isi_sdk_8_2_0),
8182
(onefs.ONEFS_RELEASES['8.2.1.0'], isi_sdk_8_2_1),
82-
(onefs.ONEFS_RELEASES['8.2.2.0'], isi_sdk_8_2_1),
83-
(float('inf'), isi_sdk_8_2_1),
83+
(onefs.ONEFS_RELEASES['8.2.2.0'], isi_sdk_8_2_2),
84+
(onefs.ONEFS_RELEASES['8.2.3.0'], isi_sdk_8_2_2),
85+
(float('inf'), isi_sdk_8_2_2),
8486
],
8587
)
8688
def test_sdk_for_revision(revision, expected_sdk):

0 commit comments

Comments
 (0)