def __getitem__(self, key): if key not in self.all_attrs.keys(): raise exception.PowerVMLPARAttributeNotFound(key) return self.all_attrs.get(key)
def __setitem__(self, key, value): if key not in self.all_attrs.keys(): raise exception.PowerVMLPARAttributeNotFound(key) self.all_attrs[key] = value
def __delitem__(self, key): if key not in self.all_attrs.keys(): raise exception.PowerVMLPARAttributeNotFound(key) # We set to None instead of removing the key... self.all_attrs[key] = None