Skip to content

Commit

Permalink
Fixed AttributeError when adding NICs after intial startup
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed Jul 31, 2024
1 parent 5068243 commit b079421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Released: not yet
- Fixed vulnerabilities in Prometheus server detected by testssl.sh.
(issues #508, #509)

* Fixed AttributeError when adding NICs after intial startup.

**Enhancements:**

* Docs: Added a section about the size of captured terminal output and log
Expand Down
4 changes: 2 additions & 2 deletions zhmc_prometheus_exporter/zhmc_prometheus_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,8 @@ def uri_to_resource(client, uri2resource, uri):
if m is not None:
# Resource URI is for a NIC
partition_uri = m.group(1)
partition_props = client.get(partition_uri)
cpc_uri = partition_props.properties['parent']
partition_props = client.session.get(partition_uri)
cpc_uri = partition_props['parent']
cpc = client.cpcs.resource_object(cpc_uri)
partition = cpc.partitions.resource_object(partition_uri)
nic = partition.nics.resource_object(uri)
Expand Down

0 comments on commit b079421

Please sign in to comment.