def _iterate_unique_methods(self): for name in self.all_method_names: try: yield self.find_single_method(name) except exceptions.AmbiguousMethodName as e: def func(*args, **kwargs): raise e yield murano_method.MuranoMethod(self, name, func)
def _iterate_unique_methods(self): names = set() for c in self.ancestors(): names.update(c.methods.keys()) for name in names: try: yield self.find_single_method(name) except exceptions.AmbiguousMethodName as e: def func(*args, **kwargs): raise e yield murano_method.MuranoMethod(self, name, func)
def add_method(self, name, payload, original_name=None): method = murano_method.MuranoMethod(self, name, payload, original_name) self._methods[name] = method self._context = None self._exported_context = None return method
def add_method(self, name, payload): method = murano_method.MuranoMethod(self, name, payload) self._methods[name] = method return method
def add_method(self, name, payload): method = murano_method.MuranoMethod(self._namespace_resolver, self, name, payload) self._methods[name] = method return method