git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d572b6
)
Added comments.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 4 Mar 2009 19:25:51 +0000
(19:25 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 4 Mar 2009 19:25:51 +0000
(19:25 +0000)
geni/util/specdict.py
patch
|
blob
|
history
diff --git
a/geni/util/specdict.py
b/geni/util/specdict.py
index
6c4eb86
..
2036977
100644
(file)
--- a/
geni/util/specdict.py
+++ b/
geni/util/specdict.py
@@
-48,7
+48,12
@@
class SpecDict(dict):
value = [expected(value) for value in spec_dict[plc_field]]
spec[field] = value
return {self.type: spec}
value = [expected(value) for value in spec_dict[plc_field]]
spec[field] = value
return {self.type: spec}
-
+
+#
+# fields = { geni_field: type. Could be class for nested classes, otherwise prob str}
+# plc_fields = {geni_field : plc_field}
+#
+
class IfSpecDict(SpecDict):
type = 'IfSpec'
fields = {'name': '',
class IfSpecDict(SpecDict):
type = 'IfSpec'
fields = {'name': '',
@@
-59,7
+64,7
@@
class IfSpecDict(SpecDict):
'max_rate': '',
'max_kbyte': '',
'ip_spoof': ''}
'max_rate': '',
'max_kbyte': '',
'ip_spoof': ''}
- plc_fields = {'name': 'is_primary',
+ plc_fields = {'name': 'is_primary',
# XXX needs munging to return name instead of True or False
'addr': 'ip',
'type': 'type'}
'addr': 'ip',
'type': 'type'}