Skip to content

Commit 55516da

Browse files
committed
Refactor: various: Drop pcmk__rsc_methods_t:parameter()
Nothing calls it Signed-off-by: Reid Wahl <[email protected]>
1 parent d387387 commit 55516da

File tree

4 files changed

+0
-43
lines changed

4 files changed

+0
-43
lines changed

include/crm/common/resources_internal.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,6 @@ typedef struct {
203203
pcmk_resource_t *(*find_rsc)(pcmk_resource_t *rsc, const char *search,
204204
const pcmk_node_t *node, uint32_t flags);
205205

206-
/*!
207-
* \internal
208-
* \brief Get value of a resource instance attribute
209-
*
210-
* \param[in,out] rsc Resource to check
211-
* \param[in] node Node to use to evaluate rules
212-
* \param[in] create Ignored
213-
* \param[in] name Name of instance attribute to check
214-
* \param[in,out] scheduler Scheduler data
215-
*
216-
* \return Value of requested attribute if available, otherwise NULL
217-
* \note The caller is responsible for freeing the result using free().
218-
*/
219-
char *(*parameter)(pcmk_resource_t *rsc, pcmk_node_t *node, gboolean create,
220-
const char *name, pcmk_scheduler_t *scheduler);
221-
222206
/*!
223207
* \internal
224208
* \brief Check whether a resource is active

include/crm/pengine/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ void pe__create_promotable_pseudo_ops(pcmk_resource_t *clone,
5858

5959
bool pe_can_fence(const pcmk_scheduler_t *scheduler, const pcmk_node_t *node);
6060

61-
char *native_parameter(pcmk_resource_t *rsc, pcmk_node_t *node, gboolean create,
62-
const char *name, pcmk_scheduler_t *scheduler);
6361
pcmk_node_t *native_location(const pcmk_resource_t *rsc, GList **list,
6462
uint32_t target);
6563
void native_add_running(pcmk_resource_t *rsc, pcmk_node_t *node,

lib/pengine/complex.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ static pcmk__rsc_methods_t resource_class_functions[] = {
2626
{
2727
native_unpack,
2828
native_find_rsc,
29-
native_parameter,
3029
native_active,
3130
native_resource_state,
3231
native_location,
@@ -39,7 +38,6 @@ static pcmk__rsc_methods_t resource_class_functions[] = {
3938
{
4039
group_unpack,
4140
native_find_rsc,
42-
native_parameter,
4341
group_active,
4442
group_resource_state,
4543
native_location,
@@ -52,7 +50,6 @@ static pcmk__rsc_methods_t resource_class_functions[] = {
5250
{
5351
clone_unpack,
5452
native_find_rsc,
55-
native_parameter,
5653
clone_active,
5754
clone_resource_state,
5855
native_location,
@@ -65,7 +62,6 @@ static pcmk__rsc_methods_t resource_class_functions[] = {
6562
{
6663
pe__unpack_bundle,
6764
native_find_rsc,
68-
native_parameter,
6965
pe__bundle_active,
7066
pe__bundle_resource_state,
7167
native_location,

lib/pengine/native.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -321,27 +321,6 @@ native_find_rsc(pcmk_resource_t *rsc, const char *id,
321321
return NULL;
322322
}
323323

324-
// create is ignored
325-
char *
326-
native_parameter(pcmk_resource_t *rsc, pcmk_node_t *node, gboolean create,
327-
const char *name, pcmk_scheduler_t *scheduler)
328-
{
329-
const char *value = NULL;
330-
GHashTable *params = NULL;
331-
332-
CRM_CHECK(rsc != NULL, return NULL);
333-
CRM_CHECK(name != NULL && strlen(name) != 0, return NULL);
334-
335-
pcmk__rsc_trace(rsc, "Looking up %s in %s", name, rsc->id);
336-
params = pe_rsc_params(rsc, node, scheduler);
337-
value = g_hash_table_lookup(params, name);
338-
if (value == NULL) {
339-
/* try meta attributes instead */
340-
value = g_hash_table_lookup(rsc->priv->meta, name);
341-
}
342-
return pcmk__str_copy(value);
343-
}
344-
345324
gboolean
346325
native_active(pcmk_resource_t * rsc, gboolean all)
347326
{

0 commit comments

Comments
 (0)