/[pdpsoft]/trunk/grid-mw-security/ees/plugin_examples/ees_dummy_obligations/src/ees_dummy_obligations.c
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/plugin_examples/ees_dummy_obligations/src/ees_dummy_obligations.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1760 - (show annotations) (download) (as text)
Fri Jun 11 15:43:02 2010 UTC (11 years, 5 months ago) by aramv
File MIME type: text/x-chdr
File size: 948 byte(s)
added dummy_obligations plugin for stress testing
1 #include <stdio.h>
2 #include "eef_plugin.h"
3
4 EES_PL_RC plugin_initialize(int argc, char* argv[]){
5 EEF_log(LOG_DEBUG, "Initializing plugin ees_dummy_good!\n");
6 return EES_PL_SUCCESS;
7 }
8
9 EES_PL_RC plugin_run()
10 {
11 int i = 9000;
12 aos_context_t *_context = NULL;
13 aos_attribute_t *_tmp_attr = NULL;
14 while(i){
15 if((_context = createContext(OBLIGATION)) != NULL) {
16 setContextObligationId(_context, "my_obligation");
17 if((_tmp_attr = createAttribute())) {
18 setAttributeId( _tmp_attr, "attrib_id");
19 setAttributeValue(_tmp_attr, "attrib_value", strlen("attrib_value")+1);
20 }
21 addAttribute(_context, _tmp_attr);
22 addContext(_context);
23
24 EEF_log(LOG_DEBUG, "Adding dummy obligation and attribute\n");
25 }
26 i--;
27 }
28
29 return EES_PL_SUCCESS;
30 }
31
32 EES_PL_RC plugin_terminate(){
33 return EES_PL_SUCCESS;
34 }

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28