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

Function create_fake_resource

lib/pengine/unpack.c:1016–1033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014}
1015
1016static resource_t *
1017create_fake_resource(const char *rsc_id, xmlNode * rsc_entry, pe_working_set_t * data_set)
1018{
1019 resource_t *rsc = NULL;
1020 xmlNode *xml_rsc = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);
1021
1022 copy_in_properties(xml_rsc, rsc_entry);
1023 crm_xml_add(xml_rsc, XML_ATTR_ID, rsc_id);
1024 crm_log_xml_debug(xml_rsc, "Orphan resource");
1025
1026 if (!common_unpack(xml_rsc, &rsc, NULL, data_set)) {
1027 return NULL;
1028 }
1029
1030 set_bit(rsc->flags, pe_rsc_orphan);
1031 data_set->resources = g_list_append(data_set->resources, rsc);
1032 return rsc;
1033}
1034
1035extern resource_t *create_child_clone(resource_t * rsc, int sub_id, pe_working_set_t * data_set);
1036

Callers 1

process_orphan_resourceFunction · 0.85

Calls 4

create_xml_nodeFunction · 0.85
copy_in_propertiesFunction · 0.85
crm_xml_addFunction · 0.85
common_unpackFunction · 0.85

Tested by

no test coverage detected