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