Skip to content

Commit 9975000

Browse files
Revert "[ENG-23767] Support backing up all policies of a given type"
This reverts commit 4da023d.
1 parent 4da023d commit 9975000

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

onefuse/backups.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def key_exists(self, in_dict: dict, key: str):
214214
else:
215215
return False
216216

217-
def backup_policies(self, backups_path: str, type: str = None):
217+
def backup_policies(self, backups_path: str):
218218
"""
219219
Back up all OneFuse policies from the OneFuse instance used when
220220
instantiating the OneFuseBackups class
@@ -225,19 +225,9 @@ def backup_policies(self, backups_path: str, type: str = None):
225225
Path to back the files up to. Examples:
226226
Windows: 'C:\\temp\\onefuse_backups\\'
227227
Linux: '/tmp/onefuse_backups/'
228-
type: str
229228
"""
230229
# Gather policies from OneFuse, store them under BACKUPS_PATH
231-
policy_types = self.policy_types
232-
if type:
233-
if type in policy_types:
234-
policy_types = [type]
235-
else:
236-
error_string = (
237-
f'Policy type not found. Type {type} should be one of {policy_types}'
238-
)
239-
raise OneFuseError(error_string)
240-
for policy_type in policy_types:
230+
for policy_type in self.policy_types:
241231
self.ofm.logger.info(f'Backing up policy_type: {policy_type}')
242232
response = self.ofm.get(f'/{policy_type}/')
243233
next_exists = self.create_json_files(response, policy_type,

0 commit comments

Comments
 (0)