Skip to content
Snippets Groups Projects
Commit 868959d1 authored by Jason King's avatar Jason King
Browse files

Added header file required for retreiving info from Federation switch

credential.
parent 19308428
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@
#include <slurm/slurm_errno.h>
#include "src/common/slurm_xlator.h"
#include "src/plugins/switch/federation/federation.h"
#include "src/plugins/switch/federation/federation_keys.h"
/*
* Definitions local to this module
......@@ -58,7 +59,7 @@
#define FED_AUTO_WINMEM 0
#define FED_MAX_WIN 15
#define FED_MIN_WIN 0
#define FED_DEBUG 0
#define FED_DEBUG 1
#define ZERO 48
......@@ -1285,13 +1286,24 @@ fed_free_jobinfo(fed_jobinfo_t *jp)
int
fed_get_jobinfo(fed_jobinfo_t *jp, int key, void *data)
{
NTBL **table = (NTBL **)data;
int *job_key = (int *)data;
assert(jp);
assert(jp->magic == FED_JOBINFO_MAGIC);
switch(key) {
case FED_JOBINFO_TABLE:
*table = jp->table;
break;
case FED_JOBINFO_KEY:
*job_key = jp->job_key;
break;
default:
slurm_seterrno_ret(EINVAL);
}
return SLURM_SUCCESS;
}
/* Load a network table on node. If table contains more than
......
/*****************************************************************************\
** federation_keys.h - Key definitions used by the get_jobinfo functions
** $Id$
*****************************************************************************
* Copyright (C) 2004 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Jason King <jking@llnl.gov>
* UCRL-CODE-2002-040.
*
* This file is part of SLURM, a resource management program.
* For details, see <http://www.llnl.gov/linux/slurm/>.
*
* SLURM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along
* with SLURM; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\*****************************************************************************/
#ifndef _FEDERATION_KEYS_INCLUDED
#define _FEDERATION_KEYS_INCLUDED
enum {
/* Federation specific get_jobinfo keys */
FED_JOBINFO_TABLE,
FED_JOBINFO_PROTOCOL,
FED_JOBINFO_MODE,
FED_JOBINFO_KEY
};
#endif /* _FEDERATION_KEYS_INCLUDED */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment