added refresh()
[plcapi.git] / PLC / NovaTable.py
1 from PLC.Storage.Record import Record
2 from PLC.Logger import logger
3
4 class NovaObject(Record):
5     
6     def __init__(self, api, fields = {}, object=None):
7         Record.__init__(self, dict=fields, object=object) 
8         self.api = api
9
10     def __getattr__(self, name):
11         return getattr(self.object, name)
12
13  
14 class NovaTable(list):
15
16     def dicts(self):
17         result = []
18         for obj in self:
19             result.append(dict(obj))
20         return result