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

Function main

tools/crm_attribute.c:114–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112/* *INDENT-ON* */
113
114int
115main(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;

Callers

nothing calls this directly

Calls 15

crm_log_cli_initFunction · 0.85
crm_set_optionsFunction · 0.85
crm_helpFunction · 0.85
crm_get_optionFunction · 0.85
crm_bump_log_levelFunction · 0.85
cib_newFunction · 0.85
pcmk_strerrorFunction · 0.85
safe_str_neqFunction · 0.85
get_local_node_nameFunction · 0.85
query_node_uuidFunction · 0.85
attrd_update_delegateFunction · 0.85
delete_attr_delegateFunction · 0.85

Tested by

no test coverage detected