commit ae6018c09aaf44cdcde66de7aa038635b9b248e1
Author: Alex Kavanagh <email address hidden>
Date: Mon Aug 1 19:05:23 2022 +0100
Ensure that the _resolved_cluster member is set
In the OpenStackAPIRelationAdapters class, the _resolved_cluster member
is used to determine the cluster relation had been resolved. However,
it's possible that it is accessed prior to be used as it was originally
an dunderscored method (__method). This patch makes it more robust by
switching to a single-underscore (which is inherited and not class-
mangled) and that it is always set to None initially in the __init__
method.
Change-Id: I9b119ba6848923c27844a2f758ae9e3c34c7722d
Closes-Bug: #1981736
(cherry picked from commit c924762a9c92bd97dcb61d1d9e16f41c961ef9db)
Reviewed: https:/ /review. opendev. org/c/openstack /charms. openstack/ +/851723 /opendev. org/openstack/ charms. openstack/ commit/ ae6018c09aaf44c dcde66de7aa0386 35b9b248e1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit ae6018c09aaf44c dcde66de7aa0386 35b9b248e1
Author: Alex Kavanagh <email address hidden>
Date: Mon Aug 1 19:05:23 2022 +0100
Ensure that the _resolved_cluster member is set
In the OpenStackAPIRel ationAdapters class, the _resolved_cluster member
is used to determine the cluster relation had been resolved. However,
it's possible that it is accessed prior to be used as it was originally
an dunderscored method (__method). This patch makes it more robust by
switching to a single-underscore (which is inherited and not class-
mangled) and that it is always set to None initially in the __init__
method.
Change-Id: I9b119ba6848923 c27844a2f758ae9 e3c34c7722d 7dcb61d1d9e16f4 1c961ef9db)
Closes-Bug: #1981736
(cherry picked from commit c924762a9c92bd9