MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / main

Function main

tools/crm_ticket.c:655–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653/* *INDENT-ON* */
654
655int
656main(int argc, char **argv)
657{
658 pe_working_set_t data_set;
659 xmlNode *cib_xml_copy = NULL;
660 xmlNode *cib_constraints = NULL;
661
662 cib_t *cib_conn = NULL;
663 int rc = pcmk_ok;
664
665 int option_index = 0;
666 int argerr = 0;
667 int flag;
668
669 crm_log_init(NULL, LOG_CRIT, FALSE, FALSE, argc, argv, FALSE);
670 crm_set_options(NULL, "(query|command) [options]", long_options,
671 "Perform tasks related to cluster tickets.\nAllows ticket attributes to be queried, modified and deleted.\n");
672
673 if (argc < 2) {
674 crm_help('?', EX_USAGE);
675 }
676
677 while (1) {
678 flag = crm_get_option(argc, argv, &option_index);
679 if (flag == -1)
680 break;
681
682 switch (flag) {
683 case 'V':
684 crm_bump_log_level(argc, argv);
685 break;
686 case '$':
687 case '?':
688 crm_help(flag, EX_OK);
689 break;
690 case 'Q':
691 BE_QUIET = TRUE;
692 break;
693 case 't':
694 ticket_id = optarg;
695 break;
696 case 'l':
697 case 'L':
698 case 'w':
699 case 'q':
700 case 'c':
701 ticket_cmd = flag;
702 break;
703 case 'g':
704 case 'r':
705 case 's':
706 case 'a':
707 ticket_cmd = flag;
708 break;
709 case 'G':
710 case 'S':
711 case 'D':
712 attr_name = optarg;

Callers

nothing calls this directly

Calls 15

crm_log_initFunction · 0.85
crm_set_optionsFunction · 0.85
crm_helpFunction · 0.85
crm_get_optionFunction · 0.85
crm_bump_log_levelFunction · 0.85
set_working_set_defaultsFunction · 0.85
cib_newFunction · 0.85
pcmk_strerrorFunction · 0.85
filename2xmlFunction · 0.85
get_cib_copyFunction · 0.85
cli_config_updateFunction · 0.85
crm_time_newFunction · 0.85

Tested by

no test coverage detected