dev 851 fencing/commands.c xml2device_params(const char *name, xmlNode *dev) dev 853 fencing/commands.c GHashTable *params = xml2list(dev); dev 890 fencing/commands.c xmlNode *dev = get_xpath_object("//" F_STONITH_DEVICE, msg, LOG_ERR); dev 894 fencing/commands.c device->id = crm_element_value_copy(dev, XML_ATTR_ID); dev 895 fencing/commands.c device->agent = crm_element_value_copy(dev, "agent"); dev 896 fencing/commands.c device->namespace = crm_element_value_copy(dev, "namespace"); dev 897 fencing/commands.c device->params = xml2device_params(device->id, dev); dev 915 fencing/commands.c value = crm_element_value(dev, "rsc_provides"); dev 936 fencing/commands.c target_list_type(stonith_device_t * dev) dev 940 fencing/commands.c check_type = g_hash_table_lookup(dev->params, STONITH_ATTR_HOSTCHECK); dev 944 fencing/commands.c if (g_hash_table_lookup(dev->params, STONITH_ATTR_HOSTLIST)) { dev 946 fencing/commands.c } else if (g_hash_table_lookup(dev->params, STONITH_ATTR_HOSTMAP)) { dev 948 fencing/commands.c } else if(is_set(dev->flags, st_device_supports_list)){ dev 950 fencing/commands.c } else if(is_set(dev->flags, st_device_supports_status)){ dev 1013 fencing/commands.c stonith_device_t *dev = cmd->device ? g_hash_table_lookup(device_list, cmd->device) : NULL; dev 1018 fencing/commands.c if (!dev) { dev 1023 fencing/commands.c mainloop_set_trigger(dev->work); dev 1026 fencing/commands.c crm_trace("Host %s is not known by %s", search->host, dev->id); dev 1029 fencing/commands.c crm_trace("Host %s is known by %s", search->host, dev->id); dev 1033 fencing/commands.c crm_notice("Unknown result when testing if %s can fence %s: rc=%d", dev->id, search->host, dev 1036 fencing/commands.c search_devices_record_result(search, dev->id, can); dev 1044 fencing/commands.c stonith_device_t *dev = cmd->device ? g_hash_table_lookup(device_list, cmd->device) : NULL; dev 1054 fencing/commands.c if (!dev) { dev 1059 fencing/commands.c mainloop_set_trigger(dev->work); dev 1062 fencing/commands.c if (rc != 0 && !dev->targets) { dev 1063 fencing/commands.c crm_notice("Disabling port list queries for %s (%d): %s", dev->id, rc, output); dev 1065 fencing/commands.c g_hash_table_replace(dev->params, strdup(STONITH_ATTR_HOSTCHECK), strdup("status")); dev 1067 fencing/commands.c g_list_free_full(dev->targets, free); dev 1068 fencing/commands.c dev->targets = NULL; dev 1070 fencing/commands.c crm_info("Refreshing port list for %s", dev->id); dev 1071 fencing/commands.c g_list_free_full(dev->targets, free); dev 1072 fencing/commands.c dev->targets = parse_host_list(output); dev 1073 fencing/commands.c dev->targets_age = time(NULL); dev 1076 fencing/commands.c if (dev->targets) { dev 1077 fencing/commands.c const char *alias = g_hash_table_lookup(dev->aliases, search->host); dev 1082 fencing/commands.c if (string_in_list(dev->targets, alias)) { dev 1086 fencing/commands.c search_devices_record_result(search, dev->id, can_fence); dev 1482 fencing/commands.c xmlNode *dev = get_xpath_object("//" F_STONITH_DEVICE, msg, LOG_ERR); dev 1483 fencing/commands.c const char *id = crm_element_value(dev, F_STONITH_DEVICE); dev 1568 fencing/commands.c can_fence_host_with_device(stonith_device_t * dev, struct device_search_s *search) dev 1575 fencing/commands.c CRM_LOG_ASSERT(dev != NULL); dev 1577 fencing/commands.c if (dev == NULL) { dev 1591 fencing/commands.c if (!localhost_is_eligible(dev, "reboot", host, search->allow_suicide) dev 1592 fencing/commands.c && !localhost_is_eligible(dev, "off", host, search->allow_suicide) dev 1593 fencing/commands.c && !localhost_is_eligible(dev, "on", host, FALSE)) { dev 1596 fencing/commands.c } else if (!localhost_is_eligible(dev, search->action, host, dev 1601 fencing/commands.c alias = g_hash_table_lookup(dev->aliases, host); dev 1606 fencing/commands.c check_type = target_list_type(dev); dev 1617 fencing/commands.c if (string_in_list(dev->targets, host)) { dev 1619 fencing/commands.c } else if (g_hash_table_lookup(dev->params, STONITH_ATTR_HOSTMAP) dev 1620 fencing/commands.c && g_hash_table_lookup(dev->aliases, host)) { dev 1627 fencing/commands.c if (dev->targets == NULL || dev->targets_age + 60 < now) { dev 1629 fencing/commands.c check_type, dev?dev->id:"N/A", search->host, search->action); dev 1631 fencing/commands.c schedule_internal_command(__FUNCTION__, dev, "list", NULL, dev 1638 fencing/commands.c if (string_in_list(dev->targets, alias)) { dev 1644 fencing/commands.c check_type, dev?dev->id:"N/A", search->host, search->action); dev 1645 fencing/commands.c schedule_internal_command(__FUNCTION__, dev, "status", search->host, dev 1654 fencing/commands.c crm_notice("%s can%s fence (%s) %s: %s", dev->id, can ? "" : " not", search->action, host, check_type); dev 1656 fencing/commands.c crm_notice("%s can%s fence (%s) %s (aka. '%s'): %s", dev->id, can ? "" : " not", search->action, host, alias, dev 1661 fencing/commands.c search_devices_record_result(search, dev ? dev->id : NULL, can); dev 1667 fencing/commands.c stonith_device_t *dev = value; dev 1670 fencing/commands.c can_fence_host_with_device(dev, search); dev 1852 fencing/commands.c xmlNode *dev = NULL; dev 1871 fencing/commands.c dev = create_xml_node(list, F_STONITH_DEVICE); dev 1872 fencing/commands.c crm_xml_add(dev, XML_ATTR_ID, device->id); dev 1873 fencing/commands.c crm_xml_add(dev, "namespace", device->namespace); dev 1874 fencing/commands.c crm_xml_add(dev, "agent", device->agent); dev 1875 fencing/commands.c crm_xml_add_int(dev, F_STONITH_DEVICE_VERIFIED, device->verified); dev 1888 fencing/commands.c add_action_specific_attributes(dev, action, device); dev 1901 fencing/commands.c add_disallowed(dev, action, device, query->target, dev 1903 fencing/commands.c add_action_reply(dev, "off", device, query->target, dev 1905 fencing/commands.c add_action_reply(dev, "on", device, query->target, FALSE); dev 1910 fencing/commands.c xmlNode *attrs = create_xml_node(dev, XML_TAG_ATTRS); dev 1946 fencing/commands.c xmlNode *dev = get_xpath_object("//@" F_STONITH_ACTION, msg, LOG_DEBUG_3); dev 1949 fencing/commands.c if (dev) { dev 1950 fencing/commands.c const char *device = crm_element_value(dev, F_STONITH_DEVICE); dev 1952 fencing/commands.c target = crm_element_value(dev, F_STONITH_TARGET); dev 1953 fencing/commands.c action = crm_element_value(dev, F_STONITH_ACTION); dev 2066 fencing/commands.c stonith_device_t *dev = g_hash_table_lookup(device_list, cmd->device); dev 2072 fencing/commands.c if(dev) { dev 2073 fencing/commands.c mainloop_set_trigger(dev->work); dev 2274 fencing/commands.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, msg, LOG_ERR); dev 2280 fencing/commands.c device_id = crm_element_value(dev, F_STONITH_DEVICE); dev 2290 fencing/commands.c const char *host = crm_element_value(dev, F_STONITH_TARGET); dev 2519 fencing/commands.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, request, LOG_TRACE); dev 2524 fencing/commands.c crm_element_value(dev, F_STONITH_ACTION), dev 2525 fencing/commands.c crm_element_value(dev, F_STONITH_TARGET)); dev 2538 fencing/commands.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, request, LOG_TRACE); dev 2539 fencing/commands.c const char *target = crm_element_value(dev, F_STONITH_TARGET); dev 2547 fencing/commands.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, request, LOG_TRACE); dev 2548 fencing/commands.c const char *target = crm_element_value(dev, F_STONITH_TARGET); dev 2549 fencing/commands.c const char *action = crm_element_value(dev, F_STONITH_ACTION); dev 2550 fencing/commands.c const char *device = crm_element_value(dev, F_STONITH_DEVICE); dev 2558 fencing/commands.c crm_element_value_int(dev, F_STONITH_TOLERANCE, &tolerance); dev 2607 fencing/commands.c xmlNode *dev = get_xpath_object("//" F_STONITH_DEVICE, request, LOG_ERR); dev 2608 fencing/commands.c const char *device_id = crm_element_value(dev, XML_ATTR_ID); dev 908 fencing/remote.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, msg, LOG_ERR); dev 915 fencing/remote.c crm_element_value(dev, F_STONITH_TARGET)); dev 962 fencing/remote.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, request, LOG_TRACE); dev 971 fencing/remote.c if (peer && dev) { dev 972 fencing/remote.c const char *op_id = crm_element_value(dev, F_STONITH_REMOTE_OP_ID); dev 987 fencing/remote.c if (peer && dev) { dev 988 fencing/remote.c op->id = crm_element_value_copy(dev, F_STONITH_REMOTE_OP_ID); dev 999 fencing/remote.c op->action = crm_element_value_copy(dev, F_STONITH_ACTION); dev 1000 fencing/remote.c op->originator = crm_element_value_copy(dev, F_STONITH_ORIGIN); dev 1001 fencing/remote.c op->delegate = crm_element_value_copy(dev, F_STONITH_DELEGATE); /* May not be set */ dev 1016 fencing/remote.c op->target = crm_element_value_copy(dev, F_STONITH_TARGET); dev 1025 fencing/remote.c && dev) ? "Recorded" : "Generated", op->id, op->action, op->target, op->client_name); dev 1821 fencing/remote.c xmlNode *dev = get_xpath_object("//@" F_STONITH_REMOTE_OP_ID, msg, LOG_ERR); dev 1823 fencing/remote.c CRM_CHECK(dev != NULL, return -EPROTO); dev 1825 fencing/remote.c id = crm_element_value(dev, F_STONITH_REMOTE_OP_ID); dev 1828 fencing/remote.c dev = get_xpath_object("//@" F_STONITH_AVAILABLE_DEVICES, msg, LOG_ERR); dev 1829 fencing/remote.c CRM_CHECK(dev != NULL, return -EPROTO); dev 1830 fencing/remote.c crm_element_value_int(dev, F_STONITH_AVAILABLE_DEVICES, &ndevices); dev 1850 fencing/remote.c result = add_result(op, host, ndevices, dev); dev 1913 fencing/remote.c xmlNode *dev = get_xpath_object("//@" F_STONITH_REMOTE_OP_ID, msg, LOG_ERR); dev 1915 fencing/remote.c CRM_CHECK(dev != NULL, return -EPROTO); dev 1917 fencing/remote.c id = crm_element_value(dev, F_STONITH_REMOTE_OP_ID); dev 1920 fencing/remote.c dev = get_xpath_object("//@" F_STONITH_RC, msg, LOG_ERR); dev 1921 fencing/remote.c CRM_CHECK(dev != NULL, return -EPROTO); dev 1923 fencing/remote.c crm_element_value_int(dev, F_STONITH_RC, &rc); dev 1925 fencing/remote.c device = crm_element_value(dev, F_STONITH_DEVICE); dev 1933 fencing/remote.c const char *client_id = crm_element_value(dev, F_STONITH_CLIENTID); dev 1935 fencing/remote.c op = create_remote_stonith_op(client_id, dev, TRUE); dev 2036 fencing/remote.c xmlNode *dev = get_xpath_object("//@" F_STONITH_TARGET, msg, LOG_TRACE); dev 2039 fencing/remote.c if (dev) { dev 2042 fencing/remote.c target = crm_element_value(dev, F_STONITH_TARGET); dev 60 fencing/standalone_config.c struct device *dev = NULL; dev 62 fencing/standalone_config.c for (dev = dev_list; dev != NULL; dev = dev->next) { dev 63 fencing/standalone_config.c if (!strcasecmp(dev->name, name)) { dev 68 fencing/standalone_config.c return dev; dev 86 fencing/standalone_config.c add_device(struct device *dev) dev 88 fencing/standalone_config.c dev->next = dev_list; dev 89 fencing/standalone_config.c dev_list = dev; dev 102 fencing/standalone_config.c struct device *dev = NULL; dev 112 fencing/standalone_config.c dev = calloc(1, sizeof(struct device)); dev 114 fencing/standalone_config.c dev->name = strdup(device); dev 115 fencing/standalone_config.c dev->agent = strdup(agent); dev 116 fencing/standalone_config.c add_device(dev); dev 124 fencing/standalone_config.c struct device *dev; dev 128 fencing/standalone_config.c } else if (!(dev = find_device(device))) { dev 132 fencing/standalone_config.c } else if (dev->key_vals_count >= STANDALONE_CFG_MAX_KEYVALS) { dev 136 fencing/standalone_config.c dev->key_vals[dev->key_vals_count].key = strdup(key); dev 137 fencing/standalone_config.c dev->key_vals[dev->key_vals_count].val = strdup(value); dev 138 fencing/standalone_config.c dev->key_vals_count++; dev 146 fencing/standalone_config.c struct device *dev; dev 155 fencing/standalone_config.c } else if (!(dev = find_device(device))) { dev 161 fencing/standalone_config.c ptr = &dev->hostlist; dev 165 fencing/standalone_config.c ptr = &dev->hostmap; dev 242 fencing/standalone_config.c struct device *dev = NULL; dev 246 fencing/standalone_config.c dev = dev_list; dev 248 fencing/standalone_config.c free(dev->name); dev 249 fencing/standalone_config.c free(dev->agent); dev 250 fencing/standalone_config.c free(dev->hostlist); dev 251 fencing/standalone_config.c free(dev->hostmap); dev 252 fencing/standalone_config.c for (i = 0; i < dev->key_vals_count; i++) { dev 253 fencing/standalone_config.c free(dev->key_vals[i].key); dev 254 fencing/standalone_config.c free(dev->key_vals[i].val); dev 256 fencing/standalone_config.c dev_list = dev->next; dev 257 fencing/standalone_config.c free(dev); dev 291 fencing/standalone_config.c cfg_register_device(struct device *dev) dev 300 fencing/standalone_config.c if (dev->hostlist) { dev 301 fencing/standalone_config.c params = stonith_key_value_add(params, STONITH_ATTR_HOSTLIST, dev->hostlist); dev 303 fencing/standalone_config.c if (dev->hostmap) { dev 304 fencing/standalone_config.c params = stonith_key_value_add(params, STONITH_ATTR_HOSTMAP, dev->hostmap); dev 306 fencing/standalone_config.c for (i = 0; i < dev->key_vals_count; i++) { dev 307 fencing/standalone_config.c params stonith_key_value_add(params, dev->key_vals[i].key, dev->key_vals[i].val); dev 311 fencing/standalone_config.c data = create_device_registration_xml(dev->name, __FUNCTION__, dev->agent, params); dev 327 fencing/standalone_config.c struct device *dev = NULL; dev 330 fencing/standalone_config.c for (dev = dev_list; dev != NULL; dev = dev->next) { dev 331 fencing/standalone_config.c cfg_register_device(dev);