| 112 | /* *INDENT-ON* */ |
| 113 | |
| 114 | int |
| 115 | main(int argc, char **argv) |
| 116 | { |
| 117 | cib_t *the_cib = NULL; |
| 118 | int rc = pcmk_ok; |
| 119 | |
| 120 | int cib_opts = cib_sync_call; |
| 121 | int argerr = 0; |
| 122 | int flag; |
| 123 | |
| 124 | int option_index = 0; |
| 125 | |
| 126 | crm_log_cli_init("crm_attribute"); |
| 127 | crm_set_options(NULL, "command -n attribute [options]", long_options, |
| 128 | "Manage node's attributes and cluster options." |
| 129 | "\n\nAllows node attributes and cluster options to be queried, modified and deleted.\n"); |
| 130 | |
| 131 | if (argc < 2) { |
| 132 | crm_help('?', EX_USAGE); |
| 133 | } |
| 134 | |
| 135 | while (1) { |
| 136 | flag = crm_get_option(argc, argv, &option_index); |
| 137 | if (flag == -1) |
| 138 | break; |
| 139 | |
| 140 | switch (flag) { |
| 141 | case 'V': |
| 142 | crm_bump_log_level(argc, argv); |
| 143 | break; |
| 144 | case '$': |
| 145 | case '?': |
| 146 | crm_help(flag, EX_OK); |
| 147 | break; |
| 148 | case 'D': |
| 149 | case 'G': |
| 150 | case 'v': |
| 151 | command = flag; |
| 152 | attr_value = optarg; |
| 153 | break; |
| 154 | case 'q': |
| 155 | case 'Q': |
| 156 | BE_QUIET = TRUE; |
| 157 | break; |
| 158 | case 'U': |
| 159 | case 'N': |
| 160 | dest_uname = strdup(optarg); |
| 161 | break; |
| 162 | case 'u': |
| 163 | dest_node = strdup(optarg); |
| 164 | break; |
| 165 | case 's': |
| 166 | set_name = strdup(optarg); |
| 167 | break; |
| 168 | case 'l': |
| 169 | case 't': |
| 170 | type = optarg; |
| 171 | break; |
nothing calls this directly
no test coverage detected