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

Class Config

src/ceph-node-proxy/ceph_node_proxy/util.py:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76class Config:
77 def __init__(
78 self,
79 path: str,
80 defaults: Optional[Dict[str, Any]] = None,
81 ) -> None:
82 self.path = path
83 self.defaults = defaults or {}
84 self._data = load_config(self.path, self.defaults)
85
86 def get(self, key: str, default: Any = None) -> Any:
87 return self._data.get(key, default)
88
89 def __getitem__(self, key: str) -> Any:
90 return self._data[key]
91
92 def reload(self, path: Optional[str] = None) -> None:
93 if path is not None:
94 self.path = path
95 self._data = load_config(self.path, self.defaults)
96
97
98class BaseThread(threading.Thread):

Callers 2

get_node_proxy_configFunction · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected