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

Function process_data

src/ceph-node-proxy/ceph_node_proxy/redfish.py:242–250  ·  view source on GitHub ↗
(m_id: str, flds: List[str], d: Dict[str, Any])

Source from the content-addressed store, hash-verified

240 result: Dict[str, Dict[str, Optional[Dict]]] = dict()
241
242 def process_data(m_id: str, flds: List[str], d: Dict[str, Any]) -> Dict[str, Any]:
243 out: Dict[str, Any] = {}
244 for field in flds:
245 try:
246 out[to_snake_case(field)] = d[field]
247 except KeyError:
248 log.debug(f"Could not find field: {field} in data: {d}")
249 out[to_snake_case(field)] = None
250 return out
251
252 try:
253 if attribute is not None:

Callers 1

build_dataFunction · 0.85

Calls 2

to_snake_caseFunction · 0.90
debugMethod · 0.45

Tested by

no test coverage detected