This replaces the default "<XYClass object at 0xdeadbeeff00>" repr() for DB objects, which is pretty useless. This change makes it easier to identify DB objects in debuggers (and logs, if objects get logged). __repr__() and __str__() have slightly different purposes. The purpose of __repr__() is to return a string that uniquely identifies a single object. __str__(), on the other hand, should produce a human readable string. Another thing that is worth to note is that str() will call __repr__() if __str__() is not implemented, repr() will always call __repr__(). More details can be found under [1]. By implementing a generic __repr__() in the base class there should be no need to override it in the models classes. However, one might not be interested in seeing all the object's attributes in a string representation (which is what the generic __repr__() would do) or certain sensitive information should be hidden from users. In those cases it makes sense to implement __str__() for certain classes specifically. [1]: https://stackoverflow.com/a/2626364/6265131 Change-Id: I4c218793948b0ed7ce0c143d6c794516fdeb224f
Team and repository tags
Octavia
Octavia is an operator-grade open source scalable load balancer for use in large OpenStack deployments.
Octavia provides the load balancing API for OpenStack. It supports multiple "provider drivers" that implement load balancing, including the "amphora" reference driver included with Octavia.
Octavia is distributed under the terms of the Apache License, Version 2.0. The full terms and conditions of this license are detailed in the LICENSE file.
Project resources
Developer documentation for the Octavia project is available at https://docs.openstack.org/octavia/latest/
Release notes for the Octavia project are available at https://docs.openstack.org/releasenotes/octavia/
The project source code repository is located at https://opendev.org/openstack/octavia
Project status, bugs, and requests for feature enhancements are tracked on https://storyboard.openstack.org/#!/project/openstack/octavia
For more information on project direction and guiding principles for contributors, please see the CONSTITUTION.rst file in this directory, or specifications in the specs/ sub-directory.
The project roadmap is available at https://wiki.openstack.org/wiki/Octavia/Roadmap
External Resources
- Octavia Wiki: https://wiki.openstack.org/wiki/Octavia
- For help on usage and hacking of Octavia, please send an email to OpenStack-dev Mailing List <mailto:openstack-discuss@lists.openstack.org> with [Octavia] tag.