From: Faiyaz Ahmed Date: Wed, 4 Mar 2009 19:25:51 +0000 (+0000) Subject: Added comments. X-Git-Tag: sfa-0.9-0@14641~613 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=887ac0d8e5f7a0bd11bff2ea0451ef60c654301c;p=sfa.git Added comments. --- diff --git a/geni/util/specdict.py b/geni/util/specdict.py index 6c4eb862..2036977b 100644 --- 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} - + +# +# 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': '', @@ -59,7 +64,7 @@ class IfSpecDict(SpecDict): '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'}