Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cterasdk/edge/directoryservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def set_advanced_mapping(self, mappings):
raise CTERAException('Failed to configure advanced mapping. Not connected to directory services.')

domains = self.domains()
advanced_mapping = self._edge.api.get('/config/fileservices/cifs/idMapping/map')
advanced_mapping = []
for mapping in mappings:
if mapping.domainFlatName in domains:
Expand Down
2 changes: 2 additions & 0 deletions docs/source/UserGuides/Edge/Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ Active Directory

edge.directoryservice.set_advanced_mapping(advanced_mapping) # this function will skip domains that are not found

.. note:: This method sets the advanced mapping of domains and requires the full list of mappings.
It does not append to the existing configuration—any existing mappings will be overwritten.
.. note:: to retrieve a list of domain flat names, use :py:func:`cterasdk.edge.directoryservice.domains()`

.. automethod:: cterasdk.edge.directoryservice.DirectoryService.disconnect
Expand Down
8 changes: 7 additions & 1 deletion docs/source/UserGuides/Miscellaneous/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ Improvements

* Added support for enabling or disabling Direct Mode on CTERA Portal Storage Nodes.

Related issues and pull requests on GitHub: `#310 <https://github.com/ctera/ctera-python-sdk/pull/310>`_
Bug Fixes
^^^^^^^^^

* Removed redundant call when retrieving the list of domain mappings.

Related issues and pull requests on GitHub: `#310 <https://github.com/ctera/ctera-python-sdk/pull/310>`_,
`#311 <https://github.com/ctera/ctera-python-sdk/pull/311>`_

2.20.15
-------
Expand Down
5 changes: 1 addition & 4 deletions tests/ut/edge/test_directory_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@ def test_set_advanced_mapping(self):
]
self._init_filer(get_response=0, execute_response=execute_response)
directoryservice.DirectoryService(self._filer).set_advanced_mapping(advanced_mapping)
self._filer.api.get.assert_has_calls([
mock.call('/status/fileservices/cifs/joinStatus'),
mock.call('/config/fileservices/cifs/idMapping/map')
])
self._filer.api.get.assert_called_once_with('/status/fileservices/cifs/joinStatus')
self._filer.api.execute.assert_called_once_with('/status/fileservices/cifs', 'enumDiscoveredDomains')
self._filer.api.put.assert_called_once_with('/config/fileservices/cifs/idMapping/map', mock.ANY)
actual_param = self._filer.api.put.call_args[0][1]
Expand Down