Bug 2108052 - Improve string representation of DB model objects
Summary: Improve string representation of DB model objects
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-octavia
Version: 17.0 (Wallaby)
Hardware: All
OS: Linux
low
low
Target Milestone: Alpha
: 17.0
Assignee: Tom Weininger
QA Contact: Nikolai Ilushko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-18 11:40 UTC by Tom Weininger
Modified: 2022-09-21 12:24 UTC (History)
5 users (show)

Fixed In Version: openstack-octavia-8.0.2-0.20220719170428.3b2f562.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-21 12:24:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 847725 0 None NEW Improve string representation of DB models 2022-07-22 10:17:43 UTC
Red Hat Issue Tracker OSP-17670 0 None None None 2022-07-18 11:46:50 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:24:25 UTC

Description Tom Weininger 2022-07-18 11:40:11 UTC
Description of problem:
Python's default string representation for objects is "<XYClass object at 0xdeadbeeff00>". Apart from the type of the object this does not contain any useful information for debugging or logging.

By implementing __repr__() and/or __str__() in data base model classes one can construct more useful string representations for developers and users.

Comment 6 Nikolai Ilushko 2022-08-18 12:59:56 UTC
Ran the downstream CI:  
https://rhos-ci-jenkins.lab.eng.tlv2.redhat.com/view/DFG/view/network/view/octavia/job/DFG-network-octavia-17.0_director-rhel-virthost-3cont_3comp-ipv4-geneve/45/ 
with puddle: RHOS-17.0-RHEL-9-20220811.n.0 which verifies this bug. 

Moving this bug to verified.

Comment 10 errata-xmlrpc 2022-09-21 12:24:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543


Note You need to log in before you can comment on or make changes to this bug.