Execute the specified command. Args: args: Parsed command line arguments Returns: bool: True if successful, False otherwise
(args)
| 726 | |
| 727 | |
| 728 | def _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 | |
| 765 | def main(): |
no test coverage detected