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

Function _execute_command

docker_ksm_utility.py:728–762  ·  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

726
727
728def _execute_command(args):
729 """
730 Execute the specified command.
731
732 Args:
733 args: Parsed command line arguments
734
735 Returns:
736 bool: True if successful, False otherwise
737 """
738 if args.command == 'process-config':
739 result_path = process_ksm_config(args.ksm_config)
740 if result_path:
741 print(result_path) # Output the final config path
742 return True
743 return False
744
745 elif args.command == 'download':
746 return download_config(
747 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
748 )
749
750 elif args.command == 'upload':
751 return upload_config(
752 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
753 )
754
755 elif args.command == 'monitor':
756 # Monitor runs indefinitely
757 monitor_config(
758 args.ksm_config, args.ksm_token, args.record_uid, args.config_file
759 )
760 return True
761
762 return False
763
764
765def 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