1
/*___INFO__MARK_BEGIN__*/
2
/*************************************************************************
4
* The Contents of this file are made available subject to the terms of
5
* the Sun Industry Standards Source License Version 1.2
7
* Sun Microsystems Inc., March, 2001
10
* Sun Industry Standards Source License Version 1.2
11
* =================================================
12
* The contents of this file are subject to the Sun Industry Standards
13
* Source License Version 1.2 (the "License"); You may not use this file
14
* except in compliance with the License. You may obtain a copy of the
15
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
17
* Software provided under this License is provided on an "AS IS" basis,
18
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
19
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
20
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
21
* See the License for the specific provisions governing your rights and
22
* obligations concerning the Software.
24
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
26
* Copyright: 2001 by Sun Microsystems, Inc.
28
* All Rights Reserved.
30
************************************************************************/
31
/*___INFO__MARK_END__*/
35
#include <sys/types.h>
37
#include "basis_types.h"
39
#include "sge_string.h"
42
#include "sge_answer.h"
43
#include "sge_hostname.h"
46
#include "sge_hgroup.h"
47
#include "sge_object.h"
48
#include "sge_stdlib.h"
51
#include "msg_common.h"
52
#include "msg_sgeobjlib.h"
54
#define HOSTATTR_LAYER BASIS_LAYER
56
#define TEMPLATE_ATTR_IMPL(PREFIX, TYPE, INTERNAL_TYPE, \
57
DESCRIPTOR, HREF_NM, VALUE_NM) \
60
PREFIX##_create(lList **answer_list, const char *href, TYPE value) \
62
return attr_create(answer_list, href, &value, \
63
DESCRIPTOR, HREF_NM, VALUE_NM); \
67
PREFIX##_list_find(const lList *this_list, const char *href) \
69
return lGetElemHost(this_list, HREF_NM, href); \
73
PREFIX##_list_add(lList **this_list, lList **answer_list, lListElem **attr, \
74
int flags, lList **ambiguous_href_list) \
76
return attr_list_add(this_list, answer_list, attr, flags, \
77
ambiguous_href_list, \
78
DESCRIPTOR, HREF_NM, VALUE_NM); \
82
PREFIX##_list_add_set_del(lList **this_list, lList **answer_list, \
83
const char *hostname, void *value, bool remove) \
85
return attr_list_add_set_del(this_list, answer_list, hostname, \
86
value, remove, DESCRIPTOR, HREF_NM, VALUE_NM); \
90
PREFIX##_list_find_value(const lList *this_list, lList **answer_list, \
91
const char *hostname, INTERNAL_TYPE *value, \
92
const char **mastching_host_or_group, \
93
const char **matching_group, \
96
return attr_list_find_value(this_list, answer_list, hostname, \
97
value, mastching_host_or_group, \
98
matching_group, is_ambiguous, \
99
DESCRIPTOR, HREF_NM, VALUE_NM); \
103
PREFIX##_list_find_value_href(const lList *this_list, lList **answer_list, \
104
const char *hostname, INTERNAL_TYPE *value, \
107
return attr_list_find_value_href(this_list, answer_list, hostname, \
108
value, found, DESCRIPTOR, HREF_NM, \
113
PREFIX##_list_append_to_dstring(const lList *this_list, dstring *string) \
115
return attr_list_append_to_dstring(this_list, string, \
116
DESCRIPTOR, HREF_NM, VALUE_NM); \
120
PREFIX##_list_parse_from_string(lList **this_list, lList **answer_list, \
121
const char *string, int flags) \
123
return attr_list_parse_from_string(this_list, answer_list, string, \
124
flags, DESCRIPTOR, HREF_NM, VALUE_NM); \
128
PREFIX##_list_locate(const lList *this_list, const char *host_or_group) \
130
return attr_list_locate(this_list, host_or_group, HREF_NM); \
134
attr_create(lList **answer_list, const char *href, void *value,
135
const lDescr *descriptor, int href_nm, int value_nm);
138
attr_list_add(lList **this_list, lList **answer_list, lListElem **attr,
139
int flags, lList **ambiguous_href_list,
140
const lDescr *descriptor, int href_nm, int value_nm);
143
attr_list_add_set_del(lList **this_list, lList **answer_list,
144
const char *hostname, void *value_buffer, bool remove,
145
const lDescr *descriptor, int href_nm, int value_nm);
148
attr_list_find_value(const lList *this_list, lList **answer_list,
149
const char *hostname, void *value_buffer,
150
const char **matching_host_or_group,
151
const char **matching_group,
152
bool *is_ambiguous, const lDescr *descriptor,
153
int href_nm, int value_nm);
156
attr_list_find_value_href(const lList *this_list, lList **answer_list,
157
const char *hostname, void *value_buffer,
158
bool *found, const lDescr *descriptor,
159
int href_nm, int value_nm);
162
attr_list_parse_from_string(lList **this_list, lList **answer_list,
163
const char *string, int flags,
164
const lDescr *descriptor, int href_nm,
168
attr_list_locate(const lList *this_list, const char *host_or_group,
171
/****** sgeobj/attr/attr_create() *********************************************
173
* attr_create() -- Returns a new attribute element
177
* attr_create(lList **answer_list, const char *href, void *value,
178
* const lDescr *descriptor, int href_nm, int value_nm)
181
* If an error occures "answer_list" will be filled with an error
182
* message. "href" is the hostname or hgroupname of the new element.
183
* "value" is a pointer to the new value for that attribute. "descriptor"
184
* is the CULL descriptor wich will be used to create the new element.
185
* "href_nm" is the CULL name of the field where the "href" name will
186
* be stored and "value_nm" defines the value of the field which
187
* will be filled with the "value".
190
* lList **answer_list - AN_Type list
191
* const char *href - host oder hgroupname
192
* void *value - pointer to the attributes value
193
* const lDescr *descriptor - CULL descriptor
194
* int href_nm - CULL field name host or hgroupname
195
* int value_nm - CULL field name for the value
198
* lListElem * - new CULL element or NULL in case on an error
201
* There are typesafe versions of this function. Have a look into
202
* the headerfile and look for TEMPLATE_ATTR_PROTO. These macro
203
* creates the typesafe versions. E.g.
209
* strlist_attr_create()
211
* MT-NOTE: attr_create() is MT safe
212
******************************************************************************/
214
attr_create(lList **answer_list, const char *href, void *value,
215
const lDescr *descriptor, int href_nm, int value_nm)
217
lListElem *ret = NULL;
219
DENTER(HOSTATTR_LAYER, "attr_create");
221
lListElem *new_attr = lCreateElem(descriptor);
223
if (new_attr != NULL) {
224
lSetHost(new_attr, href_nm, href);
226
object_set_any_type(new_attr, value_nm, value);
230
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_NONEWATTRSETTING_S, href));
231
answer_list_add(answer_list, SGE_EVENT,
232
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
235
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_INAVLID_PARAMETER_IN_S, SGE_FUNC));
236
answer_list_add(answer_list, SGE_EVENT,
237
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
243
/****** sgeobj/attr/attr_list_add() *******************************************
245
* attr_list_add() -- Add a new attribute entry to a list
249
* attr_list_add(lList **this_list, lList **answer_list, lListElem **attr,
250
* int flags, lList **ambiguous_href_list,
251
* const lDescr *descriptor, int href_nm, int value_nm)
254
* "this_list" and "attr" must have the same "descriptor". "href_nm"
255
* defines one cull field within "attr" which containes a hostname
256
* or hgroup-name. "value_nm" containes the value of that concerned
258
* "answer_list" will be filled in case of an error.
259
* "flags" can be used to influence the behaviour of this function
260
* in case of duplicates or other ambiguities within the resulting
262
* "ambiguous_href_list" might be used as output parameter for this
263
* function. Find more detailes in the description of the flags
267
* lList **this_list - attribute list
268
* lList **answer_list - AN_Type list
269
* lListElem **attr - attribute pointer
270
* int flags - behaviour bitmask
272
* HOSTATTR_OVERWRITE - If there is already an element in "this_list"
273
* which has the same hostname or hgroup, then the value of this
274
* element will be overwritten if this flag is set.
275
* If this flag is not given and the function should add a
276
* duplicate, then this will be counted as function error.
278
* HOSTATTR_ALLOW_AMBIGUITY - If the resulting "this_list" would
279
* result in an ambigous configuration for a ceratin host then
280
* this is allowed if the flag is given. Otherwise it will
281
* be rejected. In that case "ambiguous_href_list" will be
282
* filled with the conflicting hostnames.
284
* lList **ambiguous_href_list - HR_Type list
285
* const lDescr *descriptor - CULL descriptor
286
* int href_nm - CULL field name
287
* int value_nm - CULL value name
290
* static bool - error state
295
* MT-NOTE: attr_list_add() is not MT safe
296
*******************************************************************************/
298
attr_list_add(lList **this_list, lList **answer_list, lListElem **attr,
299
int flags, lList **ambiguous_href_list,
300
const lDescr *descriptor, int href_nm, int value_nm)
304
DENTER(HOSTATTR_LAYER, "attr_list_add");
306
if (this_list != NULL && attr != NULL && *attr != NULL) {
307
lListElem *attr_elem = NULL;
308
const char *href = NULL;
309
bool is_hgroup = false;
310
bool created_list = false;
312
href = lGetHost(*attr, href_nm);
313
is_hgroup = is_hgroup_name(href);
315
if (*this_list == NULL) {
316
*this_list = lCreateList("", descriptor);
319
attr_elem = attr_list_locate(*this_list, href, href_nm);
323
* HOSTREF_DEFAULT and host reference values can be added/changed
324
* Hostgroup entries already contained in the list might be changed.
326
* New hostgroup references might cause a conflict. We have to
327
* make additional checks.
329
if (!strcmp(href, HOSTREF_DEFAULT) ||
331
(is_hgroup && attr_elem != NULL)) {
332
const char *value = NULL;
334
object_get_any_type(*attr, value_nm, &value);
335
if (attr_elem != NULL) {
336
if (flags & HOSTATTR_OVERWRITE) {
337
object_set_any_type(attr_elem, value_nm, &value);
342
SGE_ADD_MSG_ID(sprintf(SGE_EVENT,
343
MSG_ATTR_VALUEMULDEFINED_S, href));
344
answer_list_add(answer_list, SGE_EVENT,
345
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
348
lAppendElem(*this_list, *attr);
352
lList *href_list = NULL;
353
lList *host_list = NULL;
354
lList *new_host_list = NULL;
358
* Create list of ambiguous hosts only
359
* - if ambiguious entries are not allowed or
360
* - if the the caller of this functions expects this
361
* function to return it
363
if (!(flags & HOSTATTR_ALLOW_AMBIGUITY) &&
364
ambiguous_href_list != NULL) {
367
* Create host reference list of all used hostgroups
368
* (except HOSTREF_DEFAULT, and host entries)
371
for_each(attr_elem, *this_list) {
372
const char *href = lGetHost(attr_elem, ASTR_href);
374
if (strcmp(href, HOSTREF_DEFAULT) &&
375
is_hgroup_name(href)) {
376
lret &= href_list_add(&href_list, NULL, href);
382
* Find all directly or indirectly referenced hosts for all
385
if (lret && href_list != NULL) {
386
lList *master_list = *(hgroup_list_get_master_list());
387
lList *tmp_href_list = NULL;
389
lret &= href_list_find_all_references(href_list, NULL,
390
master_list, &host_list,
392
lret &= href_list_add(&tmp_href_list, NULL, href);
393
lret &= href_list_find_all_references(tmp_href_list, NULL,
395
&new_host_list, NULL);
396
lFreeList(&tmp_href_list);
400
* Find all host references which already have a value attached.
401
* For all these hosts the new value in ambiguious.
403
if (lret && ambiguous_href_list != NULL && host_list != NULL &&
404
new_host_list != NULL) {
405
lret = href_list_compare(new_host_list, NULL, host_list,
406
NULL, NULL, ambiguous_href_list,
411
if (ambiguous_href_list != NULL &&
412
lGetNumberOfElem(*ambiguous_href_list) >= 1 &&
413
!(flags & HOSTATTR_ALLOW_AMBIGUITY)) {
414
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_RESULTUNAMBIGUOUS_S));
415
answer_list_add(answer_list, SGE_EVENT,
416
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
418
lAppendElem(*this_list, *attr);
423
if (created_list == true && ret == false) {
424
lFreeList(this_list);
430
/****** sgeobj/attr/attr_list_add_set_del() ***********************************
432
* attr_list_add_set_del() -- add/replace/delete an attribute entry
436
* attr_list_add_set_del(lList **this_list, lList **answer_list,
437
* const char *hostname, void *value,
438
* bool remove, const lDescr *descriptor,
439
* int href_nm, int value_nm)
442
* This function can be used to remove an entry from "this_list"
443
* or it can add a new entry or replace an existing one. Find a
444
* more detailed description in sgeobj/attr/attr_create()
447
* lList **this_list - cull list of type "descriptor"
448
* lList **answer_list - AN_Type list
449
* const char *hostname - hostname or hgroup name
450
* void *value - pointer to value
451
* bool remove - true -> remove the element
452
* const lDescr *descriptor - CULL descriptor
453
* int href_nm - CULL field name
454
* int value_nm - CULL value name
457
* static bool - error status
462
* MT-NOTE: attr_list_add_set_del() is MT safe
465
* sgeobj/attr/attr_create()
466
*******************************************************************************/
468
attr_list_add_set_del(lList **this_list, lList **answer_list,
469
const char *hostname, void *value, bool remove,
470
const lDescr *descriptor,
471
int href_nm, int value_nm)
474
lListElem *attr = NULL;
476
if (this_list && *this_list) {
478
attr = attr_list_locate(*this_list, hostname, href_nm);
479
lRemoveElem(*this_list, &attr);
481
attr = attr_create(answer_list, hostname, value, descriptor,
483
ret = attr_list_add(this_list, answer_list,
484
&attr, HOSTATTR_OVERWRITE, NULL,
485
descriptor, href_nm, value_nm);
497
attr_list_find_value(const lList *this_list, lList **answer_list,
498
const char *hostname, void *value_buffer,
499
const char **matching_host_or_group,
500
const char **matching_group,
501
bool *is_ambiguous, const lDescr *descriptor,
502
int href_nm, int value_nm)
506
DENTER(HOSTATTR_LAYER, "attr_list_find_value");
508
if (this_list != NULL && hostname != NULL) {
509
lListElem *href = NULL;
512
* Try to find a value for the concerned host
514
href = attr_list_locate(this_list, hostname, href_nm);
516
object_get_any_type(href, value_nm, value_buffer);
517
DPRINTF(("Found value for host "SFQ"\n", hostname));
520
bool already_found = false;
522
*is_ambiguous = false;
524
* Try to find a value for all hgroup definitions
525
* if there was no host related value
527
* Exit the loop as soon as possible! This will be the case if
528
* an ambiguous value for the concerned host will be found.
530
for_each(href, this_list) {
531
const char *href_name = lGetHost(href, href_nm);
532
lList *master_list = *(hgroup_list_get_master_list());
535
if (strcmp(href_name, HOSTREF_DEFAULT) &&
536
is_hgroup_name(href_name)) {
537
lList *tmp_href_list = NULL;
538
lListElem *tmp_href = NULL;
539
lList *host_list = NULL;
541
href_list_add(&tmp_href_list, NULL, href_name);
542
lret &= href_list_find_all_references(tmp_href_list, NULL,
543
master_list, &host_list,
545
tmp_href = href_list_locate(host_list, hostname);
546
if (tmp_href != NULL) {
547
if (already_found == false) {
548
already_found = true;
549
object_get_any_type(href, value_nm, value_buffer);
550
*matching_host_or_group = href_name;
551
DPRINTF(("Found value for domain "SFQ"\n", href_name));
554
*is_ambiguous = true;
555
*matching_group = href_name;
556
DPRINTF(("Found ambiguous value in domain "SFQ"\n",
559
lFreeList(&host_list);
560
lFreeList(&tmp_href_list);
561
break; /* leave for_each loop */
564
lFreeList(&host_list);
565
lFreeList(&tmp_href_list);
569
lListElem *tmp_href = NULL;
572
* Use the default value
574
tmp_href = attr_list_locate(this_list, HOSTREF_DEFAULT, href_nm);
575
if (tmp_href != NULL) {
576
DPRINTF(("Using default value\n"));
577
object_get_any_type(tmp_href, value_nm, value_buffer);
581
* Should never happen.
583
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_NOCONFVALUE));
584
answer_list_add(answer_list, SGE_EVENT,
585
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
603
attr_list_find_value_href(const lList *this_list, lList **answer_list,
604
const char *hostname, void *value_buffer,
605
bool *found, const lDescr *descriptor,
606
int href_nm, int value_nm)
610
DENTER(HOSTATTR_LAYER, "attr_list_find_value");
612
if (this_list != NULL && hostname != NULL) {
613
lListElem *href = NULL;
616
* Try to find a value for the concerned host
618
href = attr_list_locate(this_list, hostname, href_nm);
620
object_get_any_type(href, value_nm, value_buffer);
625
lListElem *tmp_href = NULL;
628
* Use the default value
630
tmp_href = attr_list_locate(this_list, HOSTREF_DEFAULT, href_nm);
631
if (tmp_href != NULL) {
632
object_get_any_type(tmp_href, value_nm, value_buffer);
638
* Should never happen.
640
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_NOCONFVALUE));
641
answer_list_add(answer_list, SGE_EVENT,
642
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
655
attr_list_append_to_dstring(const lList *this_list, dstring *string,
656
const lDescr *descriptor, int href_nm, int value_nm)
658
bool found_default = false;
659
bool found_group = false;
660
bool found_host = false;
661
lListElem *attr = NULL;
662
dstring host_string = DSTRING_INIT;
664
DENTER(HOSTATTR_LAYER, "attr_list_append_to_dstring");
666
if ((attr = attr_list_locate(this_list, HOSTREF_DEFAULT, href_nm)) != NULL) {
667
found_default = true;
668
object_append_field_to_dstring(attr, NULL, string, value_nm,
672
for_each(attr, this_list) {
675
href = lGetHost(attr, href_nm);
677
if (href == NULL || (found_default && !strcmp(href, HOSTREF_DEFAULT))) {
680
dstring *ds; /* will be reference to the corresponding dstring container */
682
if (is_hgroup_name(href)) {
684
if (found_group || found_default) {
685
sge_dstring_append_char(ds, ',');
691
sge_dstring_append_char(ds, ',');
696
sge_dstring_append_char(ds, '[');
697
sge_dstring_append(ds, href);
698
sge_dstring_append_char(ds, '=');
699
object_append_field_to_dstring(attr, NULL, ds, value_nm,
701
sge_dstring_append_char(ds, ']');
705
if (found_default || found_group) {
706
sge_dstring_append_char(string, ',');
708
sge_dstring_append_dstring(string, &host_string);
710
if (!found_default && !found_group && !found_host) {
711
sge_dstring_append(string, "NONE");
713
sge_dstring_free(&host_string);
723
attr_list_parse_from_string(lList **this_list, lList **answer_list,
724
const char *string, int flags,
725
const lDescr *descriptor, int href_nm,
729
DENTER(TOP_LAYER, "attr_list_parse_from_string");
731
if (this_list != NULL && string != NULL) {
732
struct saved_vars_s *strtok_context = NULL;
734
char *next_token = NULL;
735
bool is_first_token = true;
736
bool is_last_token = false;
739
* start := value {',' group_value} .
740
* group_value := '[' group_or_host '=' value ']' .
741
* group_or_host := ['@'] name .
742
* value := <depends on listtype>
744
* example: lic=5,fast=1,[@group=lic=4,fast=0],[b=lic=0]
747
* @group=lic=4,fast=0],
751
* @group=lic=4,fast=0
754
* default lic=5,fast=1
755
* @group lic=4,fast=0
760
next_token = sge_strtok_r(string, "[", &strtok_context);
761
while (ret && (token = next_token)) {
764
next_token = sge_strtok_r(NULL, "[", &strtok_context);
765
if (next_token == NULL) {
766
is_last_token = true;
770
* There might be white space at the end of each token.
772
sge_strip_white_space_at_eol(token);
773
length = strlen(token);
776
const char *href_name = NULL;
778
bool first_is_default = true;
781
* All except the last token has to conatin a ',' as last
782
* character in the string. This ',' has to be removed.
784
if (ret && !is_last_token) {
785
if (token[length - 1] == ',') {
786
token[length - 1] = '\0';
789
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_MISSINGCOMMA_S,
791
answer_list_add(answer_list, SGE_EVENT,
792
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
796
else if (ret && is_last_token && (token[length - 1] == ',')) {
797
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_TRAILINGCOMMA_S,
799
answer_list_add(answer_list, SGE_EVENT,
800
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
805
* There might be space after a closing brace ']'
807
sge_strip_white_space_at_eol(token);
808
length = strlen(token);
811
* All except the first token has to end with a ']'. Also
812
* this charcter has to be removed.
814
if (ret && !is_first_token) {
815
if (token[length - 1] == ']') {
816
token[length - 1] = '\0';
819
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_MISSINGBRACKET_S,
821
answer_list_add(answer_list, SGE_EVENT,
822
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
828
* If the first token containes a ']' as last charcter than
829
* a default value is missing! This is not a error but
830
* we have to parse a group or host additionally
832
if (ret && is_first_token) {
833
if (token[length - 1] == ']') {
834
token[length - 1] = '\0';
836
first_is_default = false;
841
* All but the first token has to contain a hostgroup
842
* or a host reference in the beginning of the string
845
if (!is_first_token || !first_is_default) {
846
value = strchr(token, '=');
853
SGE_ADD_MSG_ID(sprintf(SGE_EVENT,
854
MSG_ATTR_EQUALSIGNEXPRECTED));
855
answer_list_add(answer_list, SGE_EVENT,
856
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
860
href_name = HOSTREF_DEFAULT;
866
* Parsing the token was successfull. We can create a new
870
lListElem *attr_elem = NULL;
872
attr_elem = attr_create(answer_list, href_name, NULL,
873
descriptor, href_nm, value_nm);
874
if (attr_elem != NULL) {
875
ret &= object_parse_field_from_string(attr_elem,
879
ret &= attr_list_add(this_list, answer_list,
880
&attr_elem, flags, NULL,
881
descriptor, href_nm, value_nm);
883
SGE_ADD_MSG_ID(sprintf(SGE_EVENT,
884
MSG_ATTR_PARSINGERROR_S, value));
885
answer_list_add(answer_list, SGE_EVENT,
886
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
889
lFreeElem(&attr_elem);
896
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_ATTR_NOVALUEGIVEN));
897
answer_list_add(answer_list, SGE_EVENT,
898
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
901
is_first_token = false;
903
sge_free_saved_vars(strtok_context);
904
strtok_context = NULL;
906
SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_INAVLID_PARAMETER_IN_S, SGE_FUNC));
907
answer_list_add(answer_list, SGE_EVENT,
908
STATUS_ERROR1, ANSWER_QUALITY_ERROR);
920
attr_list_locate(const lList *this_list, const char *host_or_group, int href_nm)
922
lListElem *ret = NULL;
924
DENTER(HOSTATTR_LAYER, "attr_list_locate");
925
if (this_list != NULL && host_or_group != NULL) {
926
ret = lGetElemHost(this_list, href_nm, host_or_group);
932
TEMPLATE_ATTR_IMPL(str_attr, const char *, const char *, ASTR_Type, ASTR_href, ASTR_value)
934
TEMPLATE_ATTR_IMPL(ulng_attr, u_long32, u_long32, AULNG_Type, AULNG_href, AULNG_value)
936
TEMPLATE_ATTR_IMPL(bool_attr, bool, bool, ABOOL_Type, ABOOL_href, ABOOL_value)
938
TEMPLATE_ATTR_IMPL(time_attr, const char *, const char *, ATIME_Type, ATIME_href, ATIME_value)
940
TEMPLATE_ATTR_IMPL(mem_attr, const char *, const char *, AMEM_Type, AMEM_href, AMEM_value)
942
TEMPLATE_ATTR_IMPL(inter_attr, const char *, const char *, AINTER_Type, AINTER_href, AINTER_value)
944
TEMPLATE_ATTR_IMPL(qtlist_attr, u_long32, u_long32, AQTLIST_Type, AQTLIST_href, AQTLIST_value)
947
TEMPLATE_ATTR_IMPL(strlist_attr, const char *, lList *, ASTRLIST_Type, ASTRLIST_href, ASTRLIST_value)
949
TEMPLATE_ATTR_IMPL(usrlist_attr, const char *, lList *, AUSRLIST_Type, AUSRLIST_href, AUSRLIST_value)
951
TEMPLATE_ATTR_IMPL(prjlist_attr, const char *, lList *, APRJLIST_Type, APRJLIST_href, APRJLIST_value)
953
TEMPLATE_ATTR_IMPL(celist_attr, const char *, lList *, ACELIST_Type, ACELIST_href, ACELIST_value)
955
TEMPLATE_ATTR_IMPL(solist_attr, const char *, lList *, ASOLIST_Type, ASOLIST_href, ASOLIST_value)