Skip to content

Commit 79fad51

Browse files
authored
Add NetApp StorageGRID storage type (#119)
1 parent da31a9b commit 79fad51

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

cterasdk/core/enum.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,12 @@ class LocationType:
371371
:ivar str Azure: Azure Blob Storage
372372
:ivar str S3: Amazon Web Services S3
373373
:ivar str S3Compatible: S3 Compatible
374+
:ivar str NetAppStorageGRID: NetApp StorageGRID WebScale (S3)
374375
"""
375376
Azure = 'AzureLocation'
376377
S3 = 'S3Location'
377378
S3Compatible = 'S3Compatible'
379+
NetAppStorageGRID = 'NetAppLocation'
378380

379381

380382
class BucketType:
@@ -389,6 +391,7 @@ class BucketType:
389391
:ivar str Nutanix: Nutanix S3
390392
:ivar str Wasabi: Wasabi S3
391393
:ivar str Google: Google S3
394+
:ivar str NetAppStorageGRID: NetApp StorageGRID WebScale (S3)
392395
"""
393396
Azure = 'Azure'
394397
Scality = 'ScalityS3'
@@ -398,6 +401,7 @@ class BucketType:
398401
Nutanix = 'Nutanix'
399402
Wasabi = 'WasabiS3'
400403
Google = 'GoogleS3'
404+
NetAppStorageGRID = 'NTAP'
401405

402406

403407
class EnvironmentVariables:

cterasdk/core/types.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,19 @@ def __init__(self, bucket, access_key, secret_key,
329329
super().__init__(bucket, BucketType.S3Compatible, access_key, secret_key, endpoint, https, direct)
330330

331331

332+
class NetAppStorageGRID(S3Compatible):
333+
334+
def __init__(self, bucket, access_key, secret_key,
335+
endpoint, https=False, direct=False, tags=False):
336+
super().__init__(bucket, BucketType.NetAppStorageGRID, access_key, secret_key, endpoint, https, direct)
337+
self.tagBlocks = tags
338+
339+
def to_server_object(self):
340+
param = super().to_server_object()
341+
param._classname = LocationType.NetAppStorageGRID # pylint: disable=protected-access
342+
return param
343+
344+
332345
class AmazonS3(HTTPBucket):
333346

334347
def __init__(self, bucket, access_key, secret_key, endpoint='s3.amazonaws.com', https=True, direct=True):

0 commit comments

Comments
 (0)