~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/sgeobj/sge_usersetL.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SGE_USERSETL_H
 
2
#define __SGE_USERSETL_H
 
3
 
 
4
/*___INFO__MARK_BEGIN__*/
 
5
/*************************************************************************
 
6
 * 
 
7
 *  The Contents of this file are made available subject to the terms of
 
8
 *  the Sun Industry Standards Source License Version 1.2
 
9
 * 
 
10
 *  Sun Microsystems Inc., March, 2001
 
11
 * 
 
12
 * 
 
13
 *  Sun Industry Standards Source License Version 1.2
 
14
 *  =================================================
 
15
 *  The contents of this file are subject to the Sun Industry Standards
 
16
 *  Source License Version 1.2 (the "License"); You may not use this file
 
17
 *  except in compliance with the License. You may obtain a copy of the
 
18
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
19
 * 
 
20
 *  Software provided under this License is provided on an "AS IS" basis,
 
21
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
22
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
23
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
24
 *  See the License for the specific provisions governing your rights and
 
25
 *  obligations concerning the Software.
 
26
 * 
 
27
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
28
 * 
 
29
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
30
 * 
 
31
 *   All Rights Reserved.
 
32
 * 
 
33
 ************************************************************************/
 
34
/*___INFO__MARK_END__*/
 
35
 
 
36
#include "sge_boundaries.h"
 
37
#include "cull.h"
 
38
 
 
39
#ifdef  __cplusplus
 
40
extern "C" {
 
41
#endif
 
42
 
 
43
#define US_ACL       (1<<0)
 
44
#define US_DEPT      (1<<1)
 
45
 
 
46
/* 
 
47
 * This is the list type we use to hold the 
 
48
 * user set lists in the qmaster. These are also used as 
 
49
 * (x)access lists.
 
50
 */
 
51
 
 
52
/* special list element */
 
53
#define DEADLINE_USERS     "deadlineusers"
 
54
#define DEFAULT_DEPARTMENT "defaultdepartment"
 
55
#define AR_USERS           "arusers"
 
56
 
 
57
/* *INDENT-OFF* */
 
58
 
 
59
enum {
 
60
   US_name = US_LOWERBOUND,
 
61
   US_type,                  /* type of USERSET encoded as bitfield */
 
62
   US_fshare,                /* 960703 svd - SGEEE functional share */
 
63
   US_oticket,               /* SGEEE override tickets */
 
64
   US_job_cnt,               /* SGEEE job count (internal to schedd) */
 
65
   US_pending_job_cnt,       /* SGEEE job count (internal to schedd) */
 
66
   US_entries,
 
67
   US_consider_with_categories /* true, if userset plays role with categories */
 
68
};
 
69
 
 
70
 
 
71
LISTDEF(US_Type)
 
72
   JGDI_ROOT_OBJ(UserSet, SGE_USERSET_LIST, ADD | MODIFY | DELETE | GET | GET_LIST)
 
73
   JGDI_EVENT_OBJ(ADD(sgeE_USERSET_ADD) | MODIFY(sgeE_USERSET_MOD) | DELETE(sgeE_USERSET_DEL) | GET_LIST(sgeE_USERSET_LIST))
 
74
   SGE_STRING(US_name, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_SPOOL | CULL_SUBLIST | CULL_JGDI_CONF)       /* configured name spooled */
 
75
   SGE_ULONG_D(US_type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 1)         /* configured type spooled */
 
76
   SGE_ULONG(US_fshare, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)       /* configured share spooled */
 
77
   SGE_ULONG(US_oticket, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)      /* configured override tickets spooled */
 
78
   SGE_ULONG(US_job_cnt, CULL_DEFAULT | CULL_JGDI_CONF)     /* local to schedd */
 
79
   SGE_ULONG(US_pending_job_cnt, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* local to schedd */
 
80
   SGE_LIST(US_entries, UE_Type, CULL_DEFAULT  | CULL_SPOOL | CULL_JGDI_CONF)     /* UE_Type */
 
81
   SGE_BOOL(US_consider_with_categories, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
82
LISTEND 
 
83
 
 
84
NAMEDEF(USEN)
 
85
   NAME("US_name")
 
86
   NAME("US_type")
 
87
   NAME("US_fshare")
 
88
   NAME("US_oticket")
 
89
   NAME("US_job_cnt")
 
90
   NAME("US_pending_job_cnt")
 
91
   NAME("US_entries")
 
92
   NAME("US_consider_with_categories")
 
93
NAMEEND
 
94
 
 
95
#define USES sizeof(USEN)/sizeof(char*)
 
96
 
 
97
/* 
 
98
 * an USERSET (US) is used to store
 
99
 * a user or a group in an user set list (US)
 
100
 * the flag field indicates whether name
 
101
 * and id specifiy an user or a group
 
102
 */
 
103
enum { 
 
104
   USER_ENTRY, 
 
105
   GROUP_ENTRY 
 
106
};
 
107
 
 
108
enum {
 
109
   UE_name = UE_LOWERBOUND   /* user or @group name */
 
110
};
 
111
 
 
112
LISTDEF(UE_Type)
 
113
   JGDI_PRIMITIVE_OBJ(UE_name)
 
114
   SGE_STRING(UE_name, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_SUBLIST)
 
115
LISTEND 
 
116
 
 
117
NAMEDEF(UEN)
 
118
   NAME("UE_name")
 
119
NAMEEND
 
120
 
 
121
#define UES sizeof(UEN)/sizeof(char*)
 
122
 
 
123
/*
 
124
 * this list is used by schedd to keep the number 
 
125
 * of running jobs per user/group efficiently
 
126
 */
 
127
enum {
 
128
   JC_name = JC_LOWERBOUND,  /* user or group name */
 
129
   JC_jobs                   /* number of running jobs */
 
130
};
 
131
 
 
132
LISTDEF(JC_Type)
 
133
   SGE_STRING(JC_name, CULL_HASH | CULL_UNIQUE)
 
134
   SGE_ULONG(JC_jobs, CULL_DEFAULT)
 
135
LISTEND 
 
136
 
 
137
NAMEDEF(JCN)
 
138
   NAME("JC_name")
 
139
   NAME("JC_jobs")
 
140
NAMEEND
 
141
 
 
142
/* *INDENT-ON* */
 
143
 
 
144
#define JCS sizeof(JCN)/sizeof(char*)
 
145
#ifdef  __cplusplus
 
146
}
 
147
#endif
 
148
#endif                          /* __SGE_USERSETL_H */