-
- def load_components(self):
- """
- Read cached list of nodes.
- """
- # Read component list from cached file
- self.nodes.load()
- self.timestamp.load()
- time_format = "%Y-%m-%d %H:%M:%S"
- timestamp = self.timestamp['timestamp']
- self.timestamp['timestamp'] = datetime.datetime.fromtimestamp(time.mktime(time.strptime(timestamp, time_format)))
- delta = datetime.timedelta(hours=self.nodes_ttl)
- self.threshold = self.timestamp['timestamp'] + delta
+ nodedict = {'rspec': rspec.toxml(),
+ 'timestamp': hr_timestamp,
+ 'threshold': hr_threshold}
+
+ self.nodes = SimpleStorage(self.nodes.db_filename, nodedict)
+ self.nodes.write()