def handle(self): with closing(self.odb.session()) as session: self.request.input.require_any('id', 'name') item = http_soap(session, self.request.input.cluster_id, self.request.input.id, self.request.input.name) out = get_dict_with_opaque(item) self.response.payload = out
def get(self, name): # type: (str) -> object item = self.session.query(self.model_class).\ filter(self.model_class.name==name).\ filter(self.model_class.type_==self.type_).\ filter(self.model_class.cluster_id==self.cluster_id).\ first() return get_dict_with_opaque(item) if item else None