Skip to content

Commit 8c28c2b

Browse files
committed
PIM-6485 Few renamings
1 parent 7763a0e commit 8c28c2b

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

cterasdk/core/cloudfs.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
'openFabricStorageStatus',
2121
'openFabricStorageStatusDetails',
2222
]
23-
CLOUD_DRIVE_OPEN_FABRIC_INCLUDE = CLOUD_DRIVE_FUSION_DIRECT_INCLUDE # legacy alias
2423

2524

2625
def _worm_period(amount, duration_type):
@@ -242,7 +241,7 @@ def _build_cloud_drive_create_params(self, name, group, owner, winacls=True, des
242241
return param
243242

244243
@staticmethod
245-
def _apply_fusion_direct_storage_params(param, open_fabric_settings, open_storage_enabled):
244+
def _apply_fusion_direct_add_params(param, open_fabric_settings, open_storage_enabled):
246245
if open_fabric_settings is not None:
247246
if open_storage_enabled is False:
248247
raise CTERAException(
@@ -254,7 +253,7 @@ def _apply_fusion_direct_storage_params(param, open_fabric_settings, open_storag
254253
param.openStorageEnabled = open_storage_enabled
255254

256255
@staticmethod
257-
def _apply_fusion_direct_storage_modify_params(param, open_fabric_settings, open_storage_enabled):
256+
def _apply_fusion_direct_modify_params(param, open_fabric_settings, open_storage_enabled):
258257
if open_fabric_settings is not None:
259258
if open_storage_enabled is False:
260259
raise CTERAException(
@@ -297,7 +296,7 @@ def add(self, name, group, owner, winacls=True, description=None, # pylint: dis
297296
param = self._build_cloud_drive_create_params(
298297
name, group, owner, winacls, description, quota, compliance_settings, xattrs, gfl, lock_extensions,
299298
archive_settings=archive_settings)
300-
self._apply_fusion_direct_storage_params(param, open_fabric_settings, open_storage_enabled)
299+
self._apply_fusion_direct_add_params(param, open_fabric_settings, open_storage_enabled)
301300

302301
try:
303302
response = self._core.api.execute('', 'addCloudDrive', param)
@@ -332,7 +331,7 @@ def add_return_id(self, name, group, owner, winacls=True, description=None, # p
332331
param = self._build_cloud_drive_create_params(
333332
name, group, owner, winacls, description, quota, compliance_settings, xattrs, gfl, lock_extensions,
334333
archive_settings=archive_settings)
335-
self._apply_fusion_direct_storage_params(param, open_fabric_settings, open_storage_enabled)
334+
self._apply_fusion_direct_add_params(param, open_fabric_settings, open_storage_enabled)
336335

337336
try:
338337
response = self._core.api.execute('', 'addCloudDriveReturnID', param)
@@ -403,7 +402,7 @@ def modify(self, current_name, owner, new_name=None, # pylint: disable=too-many
403402
lock_extensions if lock_extensions else CloudDrives.default_extensions
404403
)
405404

406-
self._apply_fusion_direct_storage_modify_params(param, open_fabric_settings, open_storage_enabled)
405+
self._apply_fusion_direct_modify_params(param, open_fabric_settings, open_storage_enabled)
407406

408407
try:
409408
response = self._core.api.put(f'/{param.baseObjectRef}', param)

cterasdk/core/fusion_direct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
22
Fusion Direct cloud folder API payload builders.
33
4-
Schema ``_classname`` values remain ``OpenFabricS3DataStorage`` and ``OpenFabricSettings`` (portal legacy names).
4+
These produce :class:`cterasdk.common.object.Object` trees with ``_classname`` set for portal
5+
``OpenFabricS3DataStorage`` and ``OpenFabricSettings`` schema types (legacy type names).
56
"""
67

78
from .enum import OpenFabricStorageMode
@@ -10,7 +11,6 @@
1011

1112
# Default when ``storage`` is omitted; matches portal ``LocationsType.GenericS3`` name.
1213
DEFAULT_FUSION_DIRECT_S3_STORAGE = 'GenericS3'
13-
DEFAULT_OPEN_FABRIC_S3_STORAGE = DEFAULT_FUSION_DIRECT_S3_STORAGE # legacy alias
1414

1515
# Matches portal ``com.ctera.infra.dataset.SimpleType.DONT_CHANGE_PASSWORD`` for ``dataStorage.secretKey``
1616
# on :meth:`cterasdk.core.cloudfs.CloudDrives.modify` when the secret should stay unchanged.

docs/source/UserGuides/Portal/Administration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ Team Portal administrators with permission to manage cloud folders can create a
14241424
cloud folder backed by a customer-managed S3-compatible bucket by passing ``open_fabric_settings``.
14251425
The bucket must have object **versioning** enabled, as enforced by the portal.
14261426
1427-
Use :data:`cterasdk.core.cloudfs.CLOUD_DRIVE_FUSION_DIRECT_INCLUDE` (legacy alias ``CLOUD_DRIVE_OPEN_FABRIC_INCLUDE``) with
1427+
Use :data:`cterasdk.core.cloudfs.CLOUD_DRIVE_FUSION_DIRECT_INCLUDE` with
14281428
:meth:`cterasdk.core.cloudfs.CloudDrives.all` or :meth:`cterasdk.core.cloudfs.CloudDrives.find` to retrieve
14291429
``openFabricSettings`` and related status fields.
14301430

0 commit comments

Comments
 (0)