]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
node-proxy: fix a regression when processing the RedFish API 59981/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 25 Sep 2024 14:28:01 +0000 (14:28 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 25 Sep 2024 14:32:04 +0000 (14:32 +0000)
ce360a4a5f6 introduced a regression.

`Endpoint()` doesn't take a `EndpointMgr` object as parameter.
The call `e = Endpoint(self, _url, self.client)` obviously throws the
following error:

```
TypeError: __init__() takes 3 positional arguments but 4 were given
```

This commit fixes it.

Fixes: https://tracker.ceph.com/issues/68231
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-node-proxy/ceph_node_proxy/baseredfishsystem.py

index 674a7427e850de7ed89f6fff94e52b8052782627..cc1a56055b9f4608c20e032838f50cd73c3caefd 100644 (file)
@@ -34,7 +34,7 @@ class EndpointMgr:
                     self.log.debug(f'entrypoint found: {to_snake_case(k)} = {v["@odata.id"]}')
                     _name: str = to_snake_case(k)
                     _url: str = v['@odata.id']
-                    e = Endpoint(self, _url, self.client)
+                    e = Endpoint(_url, self.client)
                     setattr(self, _name, e)
             setattr(self, 'session', json_data['Links']['Sessions']['@odata.id'])  # TODO(guits): needs to be fixed
         except (URLError, KeyError) as e: