MCPcopy Create free account
hub / github.com/ceph/ceph / remote

Method remote

src/pybind/mgr/mgr_module.py:2617–2639  ·  view source on GitHub ↗

Invoke a method on another module. All arguments, and the return value from the other module must be serializable. Limitation: Do not import any modules within the called method. Otherwise you will get an error in Python 2:: RuntimeError('cannot unmars

(self, module_name: str, method_name: str, *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

2615
2616 @API.expose
2617 def remote(self, module_name: str, method_name: str, *args: Any, **kwargs: Any) -> Any:
2618 """
2619 Invoke a method on another module. All arguments, and the return
2620 value from the other module must be serializable.
2621
2622 Limitation: Do not import any modules within the called method.
2623 Otherwise you will get an error in Python 2::
2624
2625 RuntimeError('cannot unmarshal code objects in restricted execution mode',)
2626
2627
2628
2629 :param module_name: Name of other module. If module isn't loaded,
2630 an ImportError exception is raised.
2631 :param method_name: Method name. If it does not exist, a NameError
2632 exception is raised.
2633 :param args: Argument tuple
2634 :param kwargs: Keyword argument dict
2635 :raises RuntimeError: **Any** error raised within the method is converted to a RuntimeError
2636 :raises ImportError: No such module
2637 """
2638 return self._ceph_dispatch_remote(module_name, method_name,
2639 args, kwargs)
2640
2641 def add_osd_perf_query(self, query: Dict[str, Any]) -> Optional[int]:
2642 """

Callers 15

create_pool_if_neededMethod · 0.45
_crash_historyMethod · 0.45
complete_progressMethod · 0.45
_update_progressMethod · 0.45
upgrade_stopMethod · 0.45
serveMethod · 0.45
update_progressMethod · 0.45
_apply_serviceMethod · 0.45
generate_configMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected