예제 #1
0
 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)
예제 #2
0
    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)
예제 #3
0
 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
예제 #4
0
 def add_method(self, name, payload):
     method = murano_method.MuranoMethod(self, name, payload)
     self._methods[name] = method
     return method
예제 #5
0
 def add_method(self, name, payload):
     method = murano_method.MuranoMethod(self._namespace_resolver, self,
                                         name, payload)
     self._methods[name] = method
     return method