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
rough cleanup of the slicemanager business
[sfa.git]
/
sfa
/
storage
/
parameter.py
diff --git
a/sfa/storage/parameter.py
b/sfa/storage/parameter.py
index
dc9d5b5
..
1545cac
100644
(file)
--- a/
sfa/storage/parameter.py
+++ b/
sfa/storage/parameter.py
@@
-10,6
+10,7
@@
from sfa.util.faults import SfaAPIError
from sfa.util.py23 import StringType
from sfa.util.py23 import StringType
+
class Parameter:
"""
Typed value wrapper. Use in accepts and returns to document method
class Parameter:
"""
Typed value wrapper. Use in accepts and returns to document method
@@
-17,11
+18,11
@@
class Parameter:
sub-parameters (i.e., dict fields).
"""
sub-parameters (i.e., dict fields).
"""
- def __init__(self, type, doc
=
"",
- min
= None, max =
None,
- optional
=
None,
- ro
=
False,
- nullok
=
False):
+ def __init__(self, type, doc
=
"",
+ min
=None, max=
None,
+ optional
=
None,
+ ro
=
False,
+ nullok
=
False):
# Basic type of the parameter. Must be a builtin type
# that can be marshalled by XML-RPC.
self.type = type
# Basic type of the parameter. Must be a builtin type
# that can be marshalled by XML-RPC.
self.type = type
@@
-51,6
+52,7
@@
class Parameter:
def __repr__(self):
return repr(self.type)
def __repr__(self):
return repr(self.type)
+
class Mixed(tuple):
"""
A list (technically, a tuple) of types. Use in accepts and returns
class Mixed(tuple):
"""
A list (technically, a tuple) of types. Use in accepts and returns
@@
-75,6
+77,7
@@
def python_type(arg):
else:
return type(arg)
else:
return type(arg)
+
def xmlrpc_type(arg):
"""
Returns the XML-RPC type of the specified argument, which may be a
def xmlrpc_type(arg):
"""
Returns the XML-RPC type of the specified argument, which may be a