MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / ScimDeleteCommand

Class ScimDeleteCommand

keepercommander/commands/scim.py:282–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282class ScimDeleteCommand(EnterpriseCommand):
283 def get_parser(self): # type: () -> argparse.ArgumentParser | None
284 return scim_delete_parser
285
286 def execute(self, params, target=None, **kwargs):
287 scim = find_scim(params, target)
288 answer = 'y' if kwargs.get('force') else \
289 user_choice(bcolors.FAIL + bcolors.BOLD + '\nALERT!\n' + bcolors.ENDC +
290 'You are about to delete SCIM endpoint {0}'.format(scim['scim_id']) +
291 '\n\nDo you want to proceed with deletion?', 'yn', 'n')
292 if answer.lower() != 'y':
293 return
294
295 rq = {
296 'command': 'scim_delete',
297 'scim_id': scim['scim_id'],
298 }
299 api.communicate(params, rq)
300 api.query_enterprise(params)
301 logging.info('SCIM endpoint \"%d\" at node \"%d\" deleted', scim['scim_id'], scim['node_id'])
302
303
304def get_scim_url(params, node_id): # type: (KeeperParams, int) -> any

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected