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

Method __getitem__

src/ceph-node-proxy/ceph_node_proxy/redfish.py:101–109  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

99 self.log.warning(f"No data could be loaded for {self.url}")
100
101 def __getitem__(self, key: str) -> "Endpoint":
102 if not isinstance(key, str) or not key or "/" in key:
103 raise KeyError(key)
104
105 if key not in self._children:
106 child_url: str = f'{self.url.rstrip("/")}/{key}'
107 self._children[key] = Endpoint(child_url, self.client)
108
109 return self._children[key]
110
111 def list_children(self) -> List[str]:
112 return list(self._children.keys())

Callers

nothing calls this directly

Calls 1

EndpointClass · 0.70

Tested by

no test coverage detected