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

Function _execute_command

docker_ksm_utility.py:693–727  ·  view source on GitHub ↗

Execute the specified command. Args: args: Parsed command line arguments Returns: bool: True if successful, False otherwise

(args)

Source from the content-addressed store, hash-verified

691
692
693def _execute_command(args):
694 """
695 Execute the specified command.
696
697 Args:
698 args: Parsed command line arguments
699
700 Returns:
701 bool: True if successful, False otherwise
702 """
703 if args.command == 'process-config':
704 result_path = process_ksm_config(args.ksm_config)
705 if result_path:
706 print(result_path) # Output the final config path
707 return True
708 return False
709
710 elif args.command == 'download':
711 return download_config(
712 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
713 )
714
715 elif args.command == 'upload':
716 return upload_config(
717 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
718 )
719
720 elif args.command == 'monitor':
721 # Monitor runs indefinitely
722 monitor_config(
723 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
724 )
725 return True
726
727 return False
728
729
730def main():

Callers 1

mainFunction · 0.85

Calls 4

process_ksm_configFunction · 0.85
download_configFunction · 0.85
upload_configFunction · 0.85
monitor_configFunction · 0.85

Tested by

no test coverage detected