git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replacing get_gids with GetGids
[sfa.git]
/
sfa
/
methods
/
get_gids.py
diff --git
a/sfa/methods/get_gids.py
b/sfa/methods/get_gids.py
index
359a947
..
c54af0a
100644
(file)
--- a/
sfa/methods/get_gids.py
+++ b/
sfa/methods/get_gids.py
@@
-1,21
+1,12
@@
-# * require certificate as an argument
-# * lookup gid in db
-# * get pubkey from gid
-# * if certifacate matches pubkey from gid, return gid, else raise exception
-# if not peer.is_pubkey(gid.get_pubkey()):
-# raise ConnectionKeyGIDMismatch(gid.get_subject())
-
from sfa.util.faults import *
from sfa.util.faults import *
-from sfa.util.misc import *
from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
-from sfa.trust.auth import Auth
-from sfa.trust.gid import GID
-from sfa.trust.certificate import Certificate
-from sfa.util.genitable import GeniTable
+from sfa.methods.GetGids import GetGids
-class get_gids(
Method
):
+class get_gids(
GetGids
):
"""
"""
+ Deprecated. Use GetGids instead.
+
Get a list of record information (hrn, gid and type) for
the specified hrns.
Get a list of record information (hrn, gid and type) for
the specified hrns.
@@
-28,18
+19,12
@@
class get_gids(Method):
accepts = [
Parameter(str, "Certificate string"),
accepts = [
Parameter(str, "Certificate string"),
- Mixed(Paramter(str, "Human readable name (hrn)"),
- Parameter([str], "List of Human readable names (hrn)")),
- Mixed(Parameter(str, "Request hash"),
- Parameter(None, "Request hash not specified"))
+ Mixed(Parameter(str, "Human readable name (hrn or xrn)"),
+ Parameter(type([str]), "List of Human readable names (hrn or xrn)"))
]
returns = [Parameter(dict, "Dictionary of gids keyed on hrn")]
]
returns = [Parameter(dict, "Dictionary of gids keyed on hrn")]
- def call(self, cred, hrns, request_hash=None):
- self.api.auth.authenticateCred(cred, [cred, hrns], request_hash)
- self.api.auth.check(cred, 'getgids')
- table = GeniTable()
- records = table.find({'hrn': [hrns]}, columns=['hrn','type','gid'])
+ def call(self, cred, xrns):
- return
records
+ return
GetGids.call(self, xrns, cred)